-
Batch File Questions
Hey everyone it's been a while. Been workin my butt off so that's why I'm not as frequent and probably less coherent when I post.
So anyway I'm tasked with "assisting" my boss at a law firm removing virii and spyware without using his method of wipe and reinstall. Seeing this is just a ploy so he can look over my shoulder and try to learn how I do my job I need to streamline things. I am curious how can I make a batch file that will start the command prompt and then type in a command for me?
Example: start cmd, then enter the dos command to start the file c:\cleaner\special.exe
Basically I'm making an auto-extractor in WinRAR and I need it to run a batch file that will execute my programs in dos. Thus avoiding any wandering eyes from seeing what tools I use to assist me in taking care of the issues. I don't care much if he looks over my shoulder as I clean a registry or the windows directory by hand but the utilities are my little handy secret to cut my time down. I just don't need him mindlessly using them and ruining PCs only to have him come to the conclusion that if he can't do it I must not be doing my job right.
Thanks in advance.
-
I believe it would look like this:
start /wait cleaner\special.exe
The 'wait' entry asks it to keep the dos window open until the executable finishes as I understand it.
edit: MS$ example - http://support.microsoft.com/kb/885885
-
Played with this today:
cd\
cd \Program Files\Ccleaner\
copy ccleaner.exe C:\
copy lang-1033.dll C:\
cd\
start /wait /min ccleaner.exe
rem I would like to execute an alt+R keypress here to activate the Ccleaner 'Run Cleaner' button but don't know how
pause 'press any key'
del C:\ccleaner.exe
del C:\lang-1033.dll
-
Sweet, and thanks! I read it this morning and forgot to hit the submit reply. However you thought of the next phase I was toying with making. To tell the truth it works a lot more effectively than I thought. I encrypted the files, packaged them, and have them set to auto run the executables once extracted all while the process is set to be hidden. It seems it also automatically closes the dos window when done so my dos programs I had running for my work went away without them having a chance to review them.
-
Did you figure this out: 'rem I would like to execute an alt+R keypress here to activate the Ccleaner 'Run Cleaner' button but don't know how" ?
-
Not yet but I'm taking the day off tomorrow so I'll toy with it time to time to see what I get.