Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there any way to run script before the computer running Windows 7 or 2008 shuts down without using local group policy editor or domain based policy? Regedit tool should be OK if possible.

share|improve this question
    
Do you mean the local group policy editor or domain based policy? –  joeqwerty Jan 28 '12 at 16:35
    
Yes sorry for the weak description. –  Mat Banik Jan 28 '12 at 16:38
    
All that regedit would do is directly manipulate the registery keys that the local security policy or group policy consoles would. I recommend using those tools instead. –  MDMarra Jan 28 '12 at 17:22

1 Answer 1

up vote 3 down vote accepted

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Shutdown

this is the location I think you are looking for.

share|improve this answer
    
When I go to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\" I do not see any "Scripts" key under Windows 7. –  Mat Banik Jan 28 '12 at 17:53
    
do this use the local policies tool to create the proper key then just copy the results. –  tony roth Jan 28 '12 at 18:15
    
I can seem to be able to fined Local Policy Tool. Only thing I have is Local Security Policy Tool. –  Mat Banik Jan 28 '12 at 18:19
    
MMC... File... Add/Remove Snap-in... Group Policy Object Editor... Add... Local Computer... Finish... OK –  joeqwerty Jan 28 '12 at 19:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.