You are here

Autorun help

8 posts / 0 new
Last post
tokelove
Offline
Last seen: 17 years 2 weeks ago
Joined: 2007-06-04 15:21
Autorun help

Im using Pstart and pam but want autorun to give me the option to open pstart or pam. so i can pick pstart if im at college cuz it has no icon try for pam, or open pam if im at home or something and i have an icon try.

thanks

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 12 hours 12 min ago
Joined: 2006-11-18 10:26
I'd suggest you write a

I'd suggest you write a script that will let you pick between the two and then launch that app. A little VBscript would do it or even a batch file.

This is the best reference for building an autorun.inf file:

[edit]
Stupid Microshaft broke the link! The first link for the Wikipedia entry is the link I posted too. It was *THE* reference out there on the internet...and I didn't make a copy. Sad

http://en.wikipedia.org/wiki/Autorun
[/edit]

Here' the autorun file I'm using on a project of mine:

[autorun]
icon=icons\wi0111-48.ico

action=Howto Update the e-Tool
shellexecute=notepad.exe bin\howto-message.txt

label=e-Tool Update

shell\a\command=notepad.exe bin\howto-message.txt
shell\a=Howto Update the eTool

shell\b\command=wscript bin\update-etool.vbs
shell\b=Update eTool

shell\c\command=wscript bin\update-portable-hd.vbs
shell\c=Update portable hard drive

Another option you could do is to reverse engineer my file above with the reference and then make two menu entries, one for each of your launchers. Then you right click on the drive in Explorer and pick from the menu entries you created.

A third idea could be to code a script to autorun, determine the machine name or network you're on, and then launch the correct program for college or elsewhere. Look at the output of the "set" command in a command prompt window at college (if you can get to it) to see if there's something unique you can filter or make a determination on and code the script from there.

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

Ed_P
Offline
Last seen: 5 years 8 months ago
Joined: 2007-02-19 09:09
Suggestion

Rename the drive's autorun.inf to be autorun.old.

Create a new autorun.inf, using notepad or your favorite text editor that looks like this:

[Autorun]
Open=MyMenu.cmd
Action=Open my menu
Label=Tokelove's drive

Then create another text file named MyMenu.cmd which looks like this:

@echo off&Title Tokelove's menu
:DATE
echo.
echo. | date | find "cur"

:OPTIONS
echo.
echo Menu selections
echo.
echo 1. PStart 
echo 2. Portable Apps
echo.
set /p Option=   Enter menu selection (1,2) or Q to quit: 
if /I "%Option%" == "Q" exit
if /I "%Option%" == "1" start PStart.exe
if /I "%Option%" == "2" start PortableApps\PortableAppsMenu\PortableAppsMenu.exe
goto OPTIONS 

Place both files in the root of your USB drive.

This assumes that PStart.exe is in the root of the drive also. Adjust the path accordingly if it's not.

hth
Ed

Ed

tokelove
Offline
Last seen: 17 years 2 weeks ago
Joined: 2007-06-04 15:21
hey, it works. but i want it

hey, it works. but i want it to be on the normal autoplay thing where it says open folder, take no action or open portableapps or pstart. is there anyway of putting them both on this starting thing.

if not i suppose i could just set it to open the drive in windows explorer when it autoplays and then ill put everything as hidden apart from pam and pstart. what do you think?

and it wont give me the option to "chose this option everytime" on autoplay cause it greyed out. can i fix this?

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 5 months ago
Developer
Joined: 2006-12-06 18:07
AutoHotKey Script

download AutoHotKey, a fairly easy to use scripting and automation program. Then use the Gui Builder that comes with it to make a little GUI, then write the script, giving you the options as to which program to load. After that's done, use the compiler to create and exe, and use autorun.inf to display that exe. I'd offer to write it for you, but I'm working all day. If I have time, i'll take a look though. Are StartPortableApps.exe and PStart.exe both on the root? If not, what directories are they in?

The developer formerly known as ZGitRDun8705

tokelove
Offline
Last seen: 17 years 2 weeks ago
Joined: 2007-06-04 15:21
hey thanks for the offer but

hey thanks for the offer but ive decided to let the autoplay let me chose between pam, open folder, or take no action. this way if i have no icon tray i can just open the folder and do it that way and i wont bother using pstart now im doing this.

thanks for everybody's help.

Ed_P
Offline
Last seen: 5 years 8 months ago
Joined: 2007-02-19 09:09
Open my menu

i want it to be on the normal autoplay thing where it says open folder, take no action or open portableapps or pstart.

Open my menu is what you should see in that menu. The words are in the auotrun.inf and you can change them to be whatever you want. You could have for example:

[Autorun]
Open=MyMenu.cmd
Action=Open Tokelove's USB selections
Label=Tokelove's drive

Adding each of the apps to the Windows autoplay menu is not an option.

Ed

Ed

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 12 hours 12 min ago
Joined: 2006-11-18 10:26
Actually, it is an option,

Actually, it is an option, but only on his home machine since you need admin access to create your own Autoplay handlers using TweakUI.

http://windowsxp.mvps.org/addautoplay.htm

BTW: If Autorun/Autoplay is turned of on any of the machines, my way of customizing the right click menu for the drive letter would be the "cleanest" way to launch the app you want.

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

Log in or register to post comments