|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Auto run script on USB device
Okay I want to write a script that I put on a jump drive. And when you plug the USB in this script executes. How would i go about doing this? I don't care what the program does right now. I just want to know how this would be done. Any ideas?
|
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Will the computer your intending to run this from have a shell to execute your script? If not you will need to put a copy of the shell on the USB drive too. Use autorun.inf: Code:
[autorun] open=ksh -c myscript action=Invoke MyScript in ksh shell icon=myscript.ico label=My USB Application Note: This is a popular way for viruses to propagate themselves, so a lot of computers are now setup to not autorun USB devices. This may mean you user will still need to manually start the script so it's probably best to put a shortcut that does that for them (eg Setup.lnk or Install.lnk). |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to Install jdk.bin using shell script with auto yes/no? | sandeepbharmori | Shell Programming and Scripting | 6 | 03-08-2010 08:15 AM |
| Script to auto restart a service | ajazshariff | HP-UX | 2 | 02-19-2010 02:26 AM |
| auto login script | mohankasi | Windows & DOS: Issues & Discussions | 1 | 02-03-2009 05:23 AM |
| Auto answer ( Yes or No) from unix script | Nayanajith | Shell Programming and Scripting | 3 | 08-22-2006 01:29 AM |
| Auto Alias Script | coolboarderguy | Shell Programming and Scripting | 3 | 12-25-2005 08:11 AM |
|
|