You are here

PortableApps Detector

3 posts / 0 new
Last post
Jacob Mastel
Offline
Last seen: 1 month 1 day ago
Developer
Joined: 2007-06-13 19:36
PortableApps Detector

Okay I heard a request for a progam a while ago that automatically detected StartPortableApps.exe on a flash drive and then auto started it on a computer you commonly use and don't want to bother with the nag screen. I've made a program that auto detects it when ran. The problem is I can't get it to auto repeat. My thought is to have it always running in the background with a script similar to how our launchers constantly check if their app is running. Obviously I will also have to make it so it doesn't keep running portable apps if it's already running. Currently it's only checking each CD drive and Removable disk 1. I can't seem to get it to repeat. It's written in the official Portable Apps language NSIS so if you have any suggestions please chime in. I should be on messenger later this evening (jacob _ m001@ hotmail. com) and the portable apps channel.

;=== BEGIN: BASIC INFORMATION
!define NAME "PortableApps Detector"
!define SHORTNAME "PortableAppsDetector"
!define VERSION "1.0.0.0"
!define FILENAME "PortableAppsDetector_1.0.0.0"
!define CHECKRUNNING "PortableAppsDetector.exe"
!define CLOSENAME "PortableApps Detector Portable"
!define ADDONSDIRECTORYPRESERVE ""
!define PORTABLEAPPSINSTALLERVERSION "0.9.9.0"
!define INSTALLERCOMMENTS "For additional details, visit PortableApps.com"
!define INSTALLERADDITIONALTRADEMARKS "" ;end this entry with a period and a space if used
!define INSTALLERLEGALCOPYRIGHT "PortableApps.com and contributors"
;!define LICENSEAGREEMENT "eula.rtf"
; NOTE: For no license agreement, comment out the above line by placing a semicolon at the start of it
;=== END: BASIC INFORMATION

;=== Program Details
Name "${NAME}"
OutFile "${FILENAME}.exe"
InstallDir "\${SHORTNAME}"
Caption "${NAME} | PortableApps.com Installer"
VIProductVersion "${VERSION}"
VIAddVersionKey ProductName "${NAME}"
VIAddVersionKey Comments "${INSTALLERCOMMENTS}"
VIAddVersionKey CompanyName "PortableApps.com"
VIAddVersionKey LegalCopyright "${INSTALLERLEGALCOPYRIGHT}"
VIAddVersionKey FileDescription "${NAME}"
VIAddVersionKey FileVersion "${VERSION}"
VIAddVersionKey ProductVersion "${VERSION}"
VIAddVersionKey InternalName "${NAME}"
VIAddVersionKey LegalTrademarks "${INSTALLERADDITIONALTRADEMARKS}PortableApps.com is a Trademark of Rare Ideas, LLC."
VIAddVersionKey OriginalFilename "${FILENAME}.paf.exe"
VIAddVersionKey PortableApps.comInstallerVersion "${PORTABLEAPPSINSTALLERVERSION}"
;VIAddVersionKey PrivateBuild ""
;VIAddVersionKey SpecialBuild ""

;=== Runtime Switches
SetCompress Auto
SetCompressor /SOLID lzma
SetCompressorDictSize 32
SetDatablockOptimize On
CRCCheck on
AutoCloseWindow True
RequestExecutionLevel user
SilentInstall Silent

;=== Include
!include MUI.nsh
!include FileFunc.nsh
!include LogicLib.nsh
!insertmacro DriveSpace
!insertmacro GetOptions
!insertmacro GetDrives
!insertmacro GetRoot
!insertmacro GetSize
!insertmacro GetParent

;=== Program Icon
Icon "appicon.ico"

Section Main
	Call CheckDrives
SectionEnd

Function CheckDrives
	Sleep 2000
	${GetDrives} "FDD+CDROM" "Run"
FunctionEnd

Function Run
	Exec "$9StartPortableApps.exe"
	Push $0
FunctionEnd

Function Next
	Call CheckDrives
FunctionEnd
digitxp
digitxp's picture
Offline
Last seen: 13 years 3 months ago
Joined: 2007-11-03 18:33
To have it constantly run in the background I'd

suggest using AHK...
Hm...
I'll try doing it too.

Insert original signature here with Greasemonkey Script.

John T. Haller
John T. Haller's picture
Online
Last seen: 54 min 24 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
PortableApps.com Autorun

Ok, you inspired me to post a first test of mine Smile
https://portableapps.com/node/13770

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments