..bat or .cmd files are also called scripts. .cmd files are Windows NT
Command Script files. .cmd files work the same way as .bat files, but do
not work on non-NT systems, like Windows 98, ME, etc. .vbs, .js, etc. files
are also called scripts.
Script from XP's Glossary...
A type of program consisting of a set of instructions to an application or
tool program. A script usually expresses instructions by using the
application's or tool's rules and syntax, combined with simple control
structures such as loops and if/then expressions. "Batch program" is often
used interchangeably with "script" in the Windows environment.
To see: To assign computer shutdown scripts,
Paste the following line into Start | Run and click OK...
hh SPconcepts.chm::/gptext_assigncomputershutdownscripts.htm
Open the Group Policy snap-in.
Start | Run | Type: gpedit.msc | Click OK |
Navigate to >
Computer Configuration\Windows Settings\Scripts (Startup/Shutdown)
I have no idea when they actually execute.
I just tried both of these so I could see what went on in the registry.
When you use Group Policy to add a startup script...
Place your script in...
%windir%\system32\GroupPolicy\Machine\Scripts\Startup
Navigate to >
Computer Configuration\Windows Settings\Scripts (Startup/Shutdown)
Double click on Startup
Click the Add button
Type or paste in the name
OK | Apply, etc.
The startup script gets added here...
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\0
and here...
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\
System\Scripts\Startup\0\0
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run is about
number eight in the execution order at startup, so I always use it for my
start up stuff.
When you use Group Policy to add a shutdown script...
Place your script in...
%windir%\system32\GroupPolicy\Machine\Scripts\Shutdown
Navigate to >
Computer Configuration\Windows Settings\Scripts (Startup/Shutdown)
Double click on Shutdown
Click the Add button
Type or paste in the name
OK | Apply, etc.
The shutdown script gets added here...
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
CurrentVersion\Group Policy\State\Machine\Scripts\Shutdown\0\0
and here...
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\
Windows\System\Scripts\Shutdown\0\0
There is a ExecTime (I assume Execute Time) value, but I do not know what it
means.
--
Hope this helps. Let us know.
Wes
MS-MVP Windows Shell/User
In