Likewise, you can implement this solution for all users rather than just
the current user by adding the Registry value to HKEY_LOCAL_MACHINE\
Software\Microsoft\Windows\CurrentVersion\Run instead.
Use the Group Policy Editor. This is probably the coolest solution, as it
gives you the most control over precisely when the script is run, and it??™s
the only way to facilitate a shutdown or logoff script as well. Open the
Group Policy Editor (gpedit.msc), and expand the branches to Computer
Configuration\Windows Settings\Scripts (Startup/Shutdown). Doubleclick
the Startup entry on the right side, and then click Add. Click
Browse to locate a script file, and click OK when you??™re done. The
script will be run every time you start your computer, but before the
logon or Welcome screen appears (and before scripts specified in the
Registry or Start menu are ever run).
Likewise, double-click the Shutdown entry to specify a script to be run
every time your computer shuts down.
Now, there??™s a similar setting called Scripts (Logon/Logoff), located in
the User Configuration branch. Like everything in the User
Configuration branch, these settings apply only to the currently loggedon
user (as opposed to all users). If you specify your startup script here
(under Logon), instead of under Computer Configuration, the script will
run after you log in. And, of course, a script specified under Logoff will
be run when you log off, whether or not you actually shut down the
computer.
Pages:
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760