Jump to content

Recommended Posts

Posted

how can i set a startup/shutdown script/batch file without using the gpedit console?

is there a way to do it through the registry, programatically, etc?

so i can assign one with my unattended installation


Posted

dun worry ppl.. i figured it out myself already...

i found a way... but its rather sloppy

you need to first add entries into the ini file, you can do it here through batch file like this

>> %SYSTEMROOT%\SYSTEM32\GroupPolicy\Machine\Scripts\scripts.ini ECHO [Shutdown]

using same method add following lines, of course use your own file

0CmdLine=C:\Documents and Settings\TestUser\Desktop\2004 April\WINXP\update.bat

0Parameters=

-------------------------------------------------

after that you must enter registry settings

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System\Scripts\Shutdown]

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System\Scripts\Shutdown\0]
"GPO-ID"="LocalGPO"
"SOM-ID"="Local"
"FileSysPath"="C:\\WINDOWS\\System32\\GroupPolicy\\Machine"
"DisplayName"="Local Group Policy"
"GPOName"="Local Group Policy"

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System\Scripts\Shutdown\0\0]
"Script"="C:\\Documents and Settings\\TestUser\\Desktop\\2004 April\\WINXP\\update.bat"
"Parameters"=""
"ExecTime"=hex(b):00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00


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

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Shutdown\0]
"GPO-ID"="LocalGPO"
"SOM-ID"="Local"
"FileSysPath"="C:\\WINDOWS\\System32\\GroupPolicy\\Machine"
"DisplayName"="Local Group Policy"
"GPOName"="Local Group Policy"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Shutdown\0\0]
"Script"="C:\\Documents and Settings\\TestUser\\Desktop\\2004 April\\WINXP\\update.bat"
"Parameters"=""
"ExecTime"=hex(b):00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

well hope it doesnt confuse any1.. but if you guys got something better pls post it... cheers

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...