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 »

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

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

#2 Post by Kaonashi »

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 »

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

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

#4 Post by Kaonashi »

Aha! That is very useful, thanks!

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

#5 Post by back-slap »

Hi crownixx,

Excellent job! Thanks! :D

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

#6 Post by crownixx »

you're welcome :D
credits to uwe-sieber making this great tiny app,
and PStart coz making this %pdrive% parameter..make our live easy

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

#7 Post by Ttech »

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

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

#8 Post by crownixx »

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.

Post Reply