View Single Post
Old 11-17-2008   #7 (permalink)
validation


Premium 32bit SP1
 
 

Re: Make a command prompt run a command as soon as it opens?

This reminds me of a "virus" that was popular before.
Whenever a command prompt was opened, even in safe mode, cmd.exe would exicute a bat file, causing Windows to shut down.

Here is how its done. (I trust this will be used for good, not evil.)

First create a bat file containing the command you wish to run.
Then, in the registry, navigate to
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
and create a string named autorun and give it the value of where your bat file is located.
For example C:\mybat.bat

To remove this functionality, delete the autorun string in the registry.
My System SpecsSystem Spec