Windows 2003: Adding Batch Script to "Run" key causes it to run immediately, rather than on Startup

Răspuns Windows 2003: Adding Batch Script to "Run" key causes it to run immediately, rather than on Startup

  • Wednesday, February 27, 2013 11:04 PM
     
     

    I use batch scripts to automate the installation of software on our Windows 2003 servers such as Citrix XenApp and other software on my server.  The software that requires a restart and some post config once the server has restarted, I use this key to continue setup:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

    For some reason, if I add anything to this key while Windows logs in, shortly after it is added, it begins to run the script I added to that key.

    So if I add a value called "runthis" and the value is C:\runthis.bat it will run it, shortly after I add it.  Not when I reboot and log in, no, shortly after 

    Is it supposed to do this? If so, why? This makes no sense.  This is the key where you take stuff out that runs on startup. It's supposed to run on startup, when you log in but before the desktop loads. So what's the deal? Why would it run simply by adding it?


    • Edited by Sephethus Wednesday, February 27, 2013 11:05 PM
    •  

All Replies