You are here

Howto: Fix absolute paths, create shortcut to portable docs, safely dismount drive

5 posts / 0 new
Last post
Anonymous (not verified)
Howto: Fix absolute paths, create shortcut to portable docs, safely dismount drive

I made a nice little .vbs script that can do the following:

- Set an environmental variable to the drive letter of your portable drive, so you can use programs/shortcuts that need an absolute path by changing the drive letter to %portabledrive%:

- Creates a shortcut in the computer's My Documents folder to a directory on your portable drive, so you can just click on it as a folder in most open/save dialogue boxes. It removes it when you remove the drive.

- Starts PStart (or whatever you change it to)

- Can start a program before/after/at the same time as running pstart.

- Safely dismounts the drive (if you are an administrator on the computer) when you close the menu program.

Originally it was a collection of batch files to dismount the drive, but I wanted to play with the VBscript that I learnt last semester.

The script is posted here: https://portableapps.com/node/639#comment-2238

Please let me know what you think in that thread.

Rob Loach
Rob Loach's picture
Offline
Last seen: 16 years 3 months ago
Developer
Joined: 2005-12-09 17:29
Problems

There are two problems with that:

  1. On some computers, vbs files are disallowed to run (I don't allow their execution on my home computer) for security reasons (virtuses are often shipped in vbs form).
  2. If you create a shortcut in the computer's My Documents, you're getting rid of the "Portable" aspect on not leaving any traces of your using the computer behind.

Rob Loach [Website] [Projects]

grantemsley (not verified)
1. Unfortunately, nothing I

1. Unfortunately, nothing I can do about that. It would also be a problem if you disabled autorun, the usb ports, etc. But in most cases it works.

2. It actually deletes the shortcut when you close pstart and dismount the drive. I made sure it cleans up after itself.

aussie_usb
Offline
Last seen: 14 years 5 months ago
Joined: 2006-01-31 05:35
Good script.

Well Done.... A good script. I have been using it for a bit now. I removed the "my documents" part and the dismount part since i am usually using non admin_user profiles.

Unfortunately, not all apps like %portabledisk% in path statements. I find separate batch environment modifications before starting the application a little easier.

Keep up the good work!

Aussie_USB
Ever used USB "downunder"?

Aussie_USB
Ever used USB "downunder"?

cyberpunksi (not verified)
suggestion

i think if a version of this script would be made using the app at www.autohotkey.com you could compile a portable exe that could do this and more ie. both an auto start and an auto stop for portable drives. A user could have one app to start all the programs they need and also stop all the programs running on the drive conveniently ejecting the drive after all apps are stopped

Topic locked