AutoEject Pstart on Exit

Discuss anything related to portable freeware here.
Post Reply
Message
Author
crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

AutoEject Pstart on Exit

#1 Post by crownixx » Sun Jul 15, 2007 4:02 pm

AutoEject Pstart on Exit

PStart store portable application shortcut in usb stick.Everytime we want to unplug the usbstick we must exit our PStart first.Now reduce 2 work into 1 work.
Easy and more simple guide. No confusing script and the ejecting will work on both Admin rights and No admin rights
Cool huh, 8)

Guide
-------

1.Download RemoveDrive from Uwe Sieber

Code: Select all

http://www.uwe-sieber.de/files/removedrive.zip
2. Insert RemoveDrive.exe into your usb stick.. this can be in any place


3.Make a shortcut for RemoveDrive.exe in your PStart menu

Image

4. Right click and choose edit

Image

5. In General tab, insert %pdrive% under the Command line parameters

Image

6. Go to Advanced tab, on Autorun, choose on exit

Image

7. Done.. was that hard?

More explaination?
----------------------

In step [6], the RemoveDrive.exe will execute after the PStart exit.
In step [5], those parameter is enough to make it work but you can add more RemoveDrive parameters as you like. Read the RemoveDrive Readme for more info.
Usage:
RemoveDrive DriveSpec: [-l][-h][-w:nnnn]

DriveSpec: is the drive to remove, e.g. U:
[-l] loop until success
[-b] let Windows show the "it's save now" balloon tip
[-h] show open handles (admin rights required, exprimental, may freeze!)
[-w:nnnn] wait nnnn milliseconds before close
[-d] show debug information
Below is the screenshort for my parameters

Image

Code: Select all

%pdrive% -l -h -w:3000
How it work?
---------------

RemoveDrive.exe will copy itself into the temp folder, ejecting your pendrive correspond the the parameter you had
set and delete itself in the temp folder.

Have a nice day
JauntePE the portable maker: <<JauntePE Google Site >>

User avatar
Kaonashi
Posts: 8
Joined: Wed Feb 15, 2006 2:26 am
Contact:

#2 Post by Kaonashi » Mon Aug 06, 2007 12:25 pm

Hi crownixx,

Very nice guide! I had just implemented RemoveDrive a week or two before you posted this. However, I use a command line script that is run upon exitting PStart, which first copies RemoveDrive.exe to %tmp%, runs it from there and finally deletes it. I'm missing this in your guide, still you state
RemoveDrive.exe will copy itself into the temp folder, ejecting your pendrive correspond the the parameter you had
set and delete itself in the temp folder.
Am I overlooking something or did you forget something?

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#3 Post by crownixx » Mon Aug 06, 2007 3:32 pm

you miss the removedrive readme..it can copy itself to the temp folder
Returns Errorlevels:
4 - RemoveDrive.exe located on the drive to remove -> temporary copy created and executed
JauntePE the portable maker: <<JauntePE Google Site >>

User avatar
Kaonashi
Posts: 8
Joined: Wed Feb 15, 2006 2:26 am
Contact:

#4 Post by Kaonashi » Mon Aug 06, 2007 11:58 pm

Aha! That is very useful, thanks!

back-slap
Posts: 1
Joined: Fri Sep 07, 2007 12:42 am

#5 Post by back-slap » Fri Sep 07, 2007 12:49 am

Hi crownixx,

Excellent job! Thanks! :D

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#6 Post by crownixx » Fri Sep 07, 2007 4:03 pm

you're welcome :D
credits to uwe-sieber making this great tiny app,
and PStart coz making this %pdrive% parameter..make our live easy
JauntePE the portable maker: <<JauntePE Google Site >>

Ttech
Posts: 9
Joined: Sat Aug 11, 2007 1:40 pm

#7 Post by Ttech » Fri Sep 07, 2007 6:04 pm

Nice...
Question though, whats the Close All Windows app? :)

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

#8 Post by crownixx » Fri Sep 07, 2007 6:28 pm

aah, that one is another helper lazy tools for me before ejecting my thumbdrive. get it here
http://www.ntwind.com/software/utilities/close-all.html
This tool helps you to close all running applications with one click. It does not use system resources because it only flashes a ‘close’ signal to all open windows on the desktop and then ceases.
JauntePE the portable maker: <<JauntePE Google Site >>

Post Reply