Home / Microsoft / Microsoft DOS / Run a exe file from a USB
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: Run a exe file from a USB  (Read 406 times)
KaMaKaZi_KiNg
Guest
« on: November 27, 2006, 03:56:44 PM »

I have a program that I want to load up everytime I plug in my USB stick but I am having trouble finding a way to do that, I was thinking that I could do a batch script to run the program but because I use the USB stick in many different computers that all assign it a different drive letter I am finding it difficult to acheive what I am after.

Does anyone have any ideas on what I could do to get the program to either auto load or show up in the AutoRun selection screen when I plug it in. All the computers that I will be running it off are winXP SP2

This is what I have so far for the batch script. But when I try and run it, it tells me that it is an unrecognized internal or external command.

Code: [Select]
@ECHO OFF
ECHO Running Portable Applications Menu.....
\applications\portable application Menu\startPortableAppsMenu.exe
pause

Can anyone help me out?
« Last Edit: November 27, 2006, 03:58:58 PM by KaMaKaZi_KiNg » IP logged
DaveLembke
Mentor



Thanked: 41
Posts: 1,422

Computer: Specs
Experience: Expert
OS: Windows XP

« Reply #1 on: November 27, 2006, 04:00:36 PM »

Add autorun routine to it from Karenware Tools at http://www.karenware.com/powertools/ptautorun.asp maybe .... Never used it for pen drives, might only work for CD's and DVD's, but couldn't hurt to try it and its free...  :-/

Also because of the spaces maybe try this:    "\applications\portable application Menu\startPortableAppsMenu.exe" in your code.... just as seen with " "  and @Echo. vs Echo   :-/


@ECHO OFF
@ECHO. Running Portable Applications Menu.....
"\applications\portable application Menu\startPortableAppsMenu.exe"
pause
« Last Edit: November 27, 2006, 04:07:34 PM by DaveLembke » IP logged
KaMaKaZi_KiNg
Guest
« Reply #2 on: November 27, 2006, 04:26:29 PM »

I created an Autorun file with the software that you suggested but when I run it I get an error saying E:\ Not Accessable.

and adding the " " to that line of code still comes up with the same error.

This is the autorun.ini file

Code: [Select]
[Autorun]
open=\Applications\Portable Application Menu\StartPortableApps.exe
Action=Start PortableApps
label=Storage
« Last Edit: November 27, 2006, 04:26:45 PM by KaMaKaZi_KiNg » IP logged
Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / Run a exe file from a USB « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.07 seconds with 20 queries.