![]() |
IOBit Software
|
|
|
||||||
| Programming Place to discuss programming including HTML, Java, C++, MySQL and others. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
So I'm starting to learn some basic batch file stuff and I'll admit that I'm not very good. Hopefully someone can help me. My ideal solution would be to have a USB drive, that when plugged in will start running applications sequentially. I've already adopted Ninite to install programs for me, and I'd like for the script to start running the programs immediately after each other. So I would like the USB to be plugged in, immediately run Ninite installer, then run Program 1, when that finishes run Program 2, etc. And then I would like a second batch that will uninstall all the said programs. So here are my questions
1. I know how to get the batch to run an individual program, but I was wondering how to make the batch run sequentially, waiting for the prior program to finish before starting. 2. Is there a way to create a batch that will uninstall several programs. If it could be dynamic by uninstalling anything installed within the past 24 hours that would be great, but I would be happy if I determined which programs got uninstalled. And can this be done w/o user interaction? 3. Does anyone know of a good website that gives you a good tutorial of creating your own batch files? 4. Is it still possible to create the autorun.inf to auto-launch programs upon USB plug-in?
__________________
"...next time someone asks you if you’re a god, you say YES!" |
| Sponsored links |
|
|
|
#2
|
||||
|
||||
|
1.
Code:
start "" /wait "yourInstall.exe" [comand line options] No, there is no universal uninstaller.
3. I'm not a native English. Hence I know some German tutorials but I'm afraid that doesn't help. 4. Depends on what OS you're working. On XP it was possible to reactivate the autorun for removable drives. I'm virtually certain it's completely disabled/removed on Vista and newer versions due to security leaks. Regards GermanOne |
|
#3
|
||||
|
||||
|
maybe these can help
http://www.tarma.com/support/uninstall.htm and nircmd (nirsoft.net) has a wait command Wait until Firefox is closed, and then say "Firefox was closed" waitprocess firefox.exe speak text "Firefox was closed" |
|
#4
|
|||
|
|||
|
Quote:
Code:
@echo off :: variables /min cd %userprofile%\desktop\VR USB Drive start Toolbox.exe <---- my Ninite installer start ccleaner.bat start mbam.bat
__________________
"...next time someone asks you if you’re a god, you say YES!" |
|
#5
|
||||
|
||||
|
I don't know where you heard that the /wait option (it's not a command) is removed on Win7. I'm on Win7 and it works fine for me. Have a look at the help message for that command (type START /? into the command prompt and hit Enter).
What is the /min good for? (I guess it would display an error message.) If you have spaces in your path you have to enclose the path in qoutation marks. If the drive letter differs from the current drive you have to use option /d. Code:
cd /d "x:\wherever\VR USB Drive" Don't use START for other Batch files because the new window won't close if the Batch code reaches the end. Try the CALL command instead. If you need to START a Batch file for whatever reason use Code:
start "" /wait cmd /c "your file.bat" GermanOne |
| Sponsored links |
|
|
![]() |
| Tags |
| batch file |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with a batch file | jkipp82 | Software | 4 | 11-04-06 13:09 |
| batch file | wickedtaylor | Programming | 10 | 07-21-04 23:36 |
| Batch File time stamp and appending to the end of a file | question2ask | Programming | 2 | 06-18-04 07:28 |
| Batch File Help Please! | Adrynalyne | Programming | 4 | 06-08-04 20:37 |
| Batch File to remove a space at the end of a charcter in a txt file | rcmathen | Programming | 2 | 05-14-04 09:04 |