If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Windows Logoff and Shutdown scipts
Hi, First of all i would like to let you know im new to MMC scripts, (if
thats what you refer them to) Basically im trying to ask windows to automatically perform Scandisk and Defrag through MMC scripts, when i run the batch files ive written they perform as i want them to, but i have used MMC and started a new console then ive added a new snap-in ( Snap-ins added to: Console root ) then clicked add.. Group Policy Object Editor, Group Policy Object = Local computer then finish, close the dialog box click ok then drill down. Local computer Policy Computer Configuration Windows settings Scripts Startup and shutdown then i open the shutdown script properties in which i have added the Defrag and scandisk scripts then saved as console1 and ive changed Run shutdown scripts visible to enable to be able to view them when they start Then nothing happens at all its like they dont exist and i dont know how to assign them to to the computer when its shuts down if anyone can help to see if i havent done something correct it would be appreciated, Thanks for reading, Mike |
Ads |
#2
|
|||
|
|||
Windows Logoff and Shutdown scipts
"mike2288" wrote in message ... Hi, First of all i would like to let you know im new to MMC scripts, (if thats what you refer them to) Basically im trying to ask windows to automatically perform Scandisk and Defrag through MMC scripts, when i run the batch files ive written they perform as i want them to, but i have used MMC and started a new console then ive added a new snap-in ( Snap-ins added to: Console root ) then clicked add.. Group Policy Object Editor, Group Policy Object = Local computer then finish, close the dialog box click ok then drill down. Local computer Policy Computer Configuration Windows settings Scripts Startup and shutdown then i open the shutdown script properties in which i have added the Defrag and scandisk scripts then saved as console1 and ive changed Run shutdown scripts visible to enable to be able to view them when they start Then nothing happens at all its like they dont exist and i dont know how to assign them to to the computer when its shuts down if anyone can help to see if i havent done something correct it would be appreciated, Thanks for reading, Mike The policy you used allows you to run "shutdown" scripts. It says nothing about "logoff" scripts. The scripts must reside in the folder C:\WINDOWS\System32\GroupPolicy\Machine\Scripts\Sh utdown. Why they do not work for you is hard to say unless you post them here. A good way to debug them is to make them really, really simple, e.g. like so: @echo off echo %UserName% %date% %time% c:\Mike.txt [add your own code here] |
Thread Tools | |
Display Modes | |
|
|