Re: %windir%\...\scripts\shutdown Q

Tech-Archive recommends: Fix windows errors by optimizing your registry



Keep having fun, Pop.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In news:eVzDf%23MEHHA.4132@xxxxxxxxxxxxxxxxxxxx,
Pop` <nodoby@xxxxxxxxxxxxxxxxxxx> hunted and pecked:
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`


Wesley Vogel wrote:
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


In news:%23cTMGpMEHHA.4256@xxxxxxxxxxxxxxxxxxxx,
Wesley Vogel <123WVogel955@xxxxxxxxxxx> hunted and pecked:
.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 news:uQpFmzKEHHA.3668@xxxxxxxxxxxxxxxxxxxx,
Pop` <nodoby@xxxxxxxxxxxxxxxxxxx> hunted and pecked:
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`
.


Quantcast