%windir%\...\scripts\shutdown Q

P

Pop`

In another thread, Wesley Vogel said, for XP Pro, there is a:
%windir%\system32\GroupPolicy\Machine\Scripts\Shutdown
path.

I note also a Start thread also.

I assume batch files will suffice for "scripts" there?

When would they execute during the ShutDown or StartUp process? I assume
early during shutdown and late during startup?

TIA

Pop`
 
D

David H. Lipman

From: "Pop`" <[email protected]>

| In another thread, Wesley Vogel said, for XP Pro, there is a:
|| path.
|
| I note also a Start thread also.
|
| I assume batch files will suffice for "scripts" there?
|
| When would they execute during the ShutDown or StartUp process? I assume
| early during shutdown and late during startup?
|
| TIA
|
| Pop`
|


ShutDown Scripts and StartUp Scripts can be a batch file, VBS, KiXtart or any other
scripting language as long as you include the the correct information for their respective
executeion.

ShutDown Scripts are executed after you indicate to the system you want to shutdown the PC
and subsquent to programs being unloaded and the user logged off.

StartUp Scripts are executed prior to the Logon Screen.
 
W

Wesley Vogel

..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
 
W

Wesley Vogel

Of course after all of that messing around I found that I had this link..

How to assign scripts in Windows 2000
http://support.microsoft.com/kb/322241

After some searching I also found these.

Overview of Logon, Logoff, Startup, and Shutdown Scripts in Windows 2000
http://support.microsoft.com/kb/198642

How to Assign a Logon Script to a Profile for a Local User
http://support.microsoft.com/kb/315245

How To Assign a Logon Script to a Profile for a Local User in Windows Server
2003
http://support.microsoft.com/kb/324803

How To Assign a Logon Script to a Profile for a Local User in Windows 2000
http://support.microsoft.com/kb/258286

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
P

Pop`

lol, ain't that the way? On first pass that all makes lots of sense; now
I'll have to actually -read- it to see what it's really saying in detail
:). Definitely -keeper- info here.

Thanks, Wes; outstanding response, as usual.

Pop`
 
W

Wesley Vogel

Keep having fun, Pop.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top