using Group Policy (run gpedit.msc) you can specify shutdown and/or logoff scripts.
Computer Configuration->Windows Settings->Scripts
and
User Configuration->Windows Settings->Scripts
create a script that runs scandisk and defrag and place it in one of these areas.
hope that helps!
I put a batch file in the registry entry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
so it will run when a user logs on.
is there a way to have this run in the background, so that the black dos window doesn't appear?
thanks in advance...
I did try that. (C:\WINNT\system32\GroupPolicy\User\Scripts\Logoff)
The script was't executed.
There's also a registry entry that the Group Policy editor creates:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\Scripts\Logoff
but the value is the "Scripts" directory...
is there a way to do this programmatically?
When my software installs, I need to register a process to be run at logoff. There are registry keys that will execute scripts/commands/etc. at logon, but I haven't had any luck finding a way to launch something at logoff.
thanks in advance...
I'm actually using Win2K right now for testing (will eventually need it to work for XP too), and this is what I'm seeing:
I create a Logoff script using the Group Policy GUI.
the windows registry key:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\Scripts\Logoff
gets created with...
Is there a way to set a logoff script without using the GUI?
My project, when installed, needs to perform a certain function when the user logs off. I would like to register this script programmatically at install time.
Is there a command line interface to the Group Policy settings? Or...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.