You are here

Portable Apps Launchers Suggestion

5 posts / 0 new
Last post
SmithTech
SmithTech's picture
Offline
Last seen: 2 years 2 weeks ago
Developer
Joined: 2006-11-24 18:06
Portable Apps Launchers Suggestion

The PortableApps launchers already get the process id in order to monitor for the process close to do cleanup. The launchers also already support getting and passing arguments.
I would like to suggest that the launchers support a /exit argument which if received would use the same close process command that windows uses when shutting down.
This would allow menu apps like PAM/PStart/ASuite to close the applications when the menu is closed. Assuming the functionality will be added to PAM eventually.

Klonk
Offline
Last seen: 12 years 3 weeks ago
Joined: 2006-04-21 03:08
Do you have an idea where

the ProcessID is stored? Or in which variable?
Then I think it would be definitely possible.

SmithTech
SmithTech's picture
Offline
Last seen: 2 years 2 weeks ago
Developer
Joined: 2006-11-24 18:06
I wish I knew. It has to be

I wish I knew.
It has to be storing it somewhere though, else how does it know which process to wait for to finish running and do the cleanup?

-----------------------------------------------------------------------------------------------
Because they stand on a wall and say nothing is going to hurt you tonight. Not on my watch.

"Because they stand on a wall and say, 'Nothing is going to hurt you tonight. Not on my watch.'" (A Few Good Men)
Coincidence is God's way of remaining anonymous.(Albert Einstein)

Klonk
Offline
Last seen: 12 years 3 weeks ago
Joined: 2006-04-21 03:08
I think this

is a built-in windows API function. (a shell command of some sort) But I'm not too sure about that.

edyshor
Offline
Last seen: 7 years 9 months ago
Joined: 2007-01-11 15:39
its a nsis feature :)

I haven't studied the portable template, but i tested a nsis script once that unpacked the contents of the launcher in a directory, the run the file (using shellexecute - the file was a html) and it erased it after the file was closed. I suspected that the portable app tmplate uses the same functionality. But i can't be shure of it as i haven't studied the temnplate script. As for the Launcher, it closes even if one of the portable app is running. The windows menu command "Safely remove hardware" refuses to execute (with a coresponding message in a baloon tip) when the exe (the package) is still in memory. Its sad that it doesn't close when i start to remove my thumbdrive, but its understandable Wink

The process, i susspect, works like this:
- the package (launcher) sets the environment
- it copies the files in the corresponding directories
- it runs the exe (that was copied on the hdd in the previous step)
- and after the exe closes it resets the environment to its previous state
- it copies the files back on the thumbdrive from the corresponding directories (including newly created files)
- its shuts down

If it doesn't act exactly this way, than it does in a similar way, according to this lines of behaviour

Log in or register to post comments