title: Running a batch file on windows 7 enterprise before logon
body: <p>I am the systems administrator at my university, and I have just switched from Ghost to Clonezilla. I am able to successfully image the computers, and I have successfully created 1 single .bat file that will rename the computer depending on the DNS server, and then use the shutdown -r -f -t 150 command to restart the computer. It also deletes a registry key once the renaming is done, and when the computer restarts it should run it again and when the first registry key is gone, it runs a second file and joins the computer to the domain, then restarts it again. I have this all working perfectly from one single bat file. All I need is for that single bat file to be run at startup before logon every single time in the background.</p>
  
  <p>I have registered it as a service and I have used the registry startup keys to run wscript.exe as seen on this site, and neither of them will run the script as soon as the login screen appears. I have even tried using GPO to do this... and still the computer refuses to run the dang bat file. (I forced gpupdate too). I'm not sure if it's because the bat file is so complex and that it calls other bat files or not... but any advice would be greatly appreciated.</p>
  
  <p>Thanks,</p>
  
  <p>Vince</p>