aldovalerio
Programmer
Windows 2000 Workstation client, Windows 2000 Advanced Server. SP4 on both.
I'm trying to get a logoff script to work, but in certain cases it's not being executed when I log off. It's a simple 1 line IF EXIST C:\XYZ DEL /Q C:\XYZ\*.* and it works when executed manually, but not when I create a policy for it. I tried 2 ways:
1) Creating a local policy on the workstation with gpedit.msc: User Configuration->Windows Settings->Scripts(Logon/Logoff)->Logoff. I clicked on Logoff and specified the Script Name as C:\WINNT\system32\GroupPolicy\User\Scripts\Logoff\Delete_ExportedFiles.cmd. The permissions on the command file and its folder are Full Control for Authenticated Users.
When I log off as a domain user, it's not run, but when I log off as the local workstation administrator, it runs! In the latter case I see the message, "Running logoff scripts", when logging off. Note: no domain policy logoff script existed at this time.
2) After removing the above local policy script, I set up a domain group policy. On the domain server, I launched Active Directory Users and Computers, right clicked on the domain name, selected Properties and Group Policy tab, clicked Edit for Default Domain Policy, User Configuration->Windows Settings->Scripts(Logon/Logoff)->Logoff. I clicked on Logoff and specified the Script Name as \\<SERVER_NAME>\sysvol\<DOMAIN>\Policies\<GUID>\USER\Scripts\Logoff\Delete_ExportedFiles.cmd. This pathname is the one I get when I click on the Show Files button, and the command file exists in that folder. The permissions on the command file and its folder are Read and Read&Execute for Authenticated Users. Note: I can run the above path and command file from the workstation and ti executes ok.
When I log off as a domain user, it's not run.
Does the workstation or server have to be rebooted for the policy to take effect? What am I missing? There must be something blocking it from the domain user.
I'm trying to get a logoff script to work, but in certain cases it's not being executed when I log off. It's a simple 1 line IF EXIST C:\XYZ DEL /Q C:\XYZ\*.* and it works when executed manually, but not when I create a policy for it. I tried 2 ways:
1) Creating a local policy on the workstation with gpedit.msc: User Configuration->Windows Settings->Scripts(Logon/Logoff)->Logoff. I clicked on Logoff and specified the Script Name as C:\WINNT\system32\GroupPolicy\User\Scripts\Logoff\Delete_ExportedFiles.cmd. The permissions on the command file and its folder are Full Control for Authenticated Users.
When I log off as a domain user, it's not run, but when I log off as the local workstation administrator, it runs! In the latter case I see the message, "Running logoff scripts", when logging off. Note: no domain policy logoff script existed at this time.
2) After removing the above local policy script, I set up a domain group policy. On the domain server, I launched Active Directory Users and Computers, right clicked on the domain name, selected Properties and Group Policy tab, clicked Edit for Default Domain Policy, User Configuration->Windows Settings->Scripts(Logon/Logoff)->Logoff. I clicked on Logoff and specified the Script Name as \\<SERVER_NAME>\sysvol\<DOMAIN>\Policies\<GUID>\USER\Scripts\Logoff\Delete_ExportedFiles.cmd. This pathname is the one I get when I click on the Show Files button, and the command file exists in that folder. The permissions on the command file and its folder are Read and Read&Execute for Authenticated Users. Note: I can run the above path and command file from the workstation and ti executes ok.
When I log off as a domain user, it's not run.
Does the workstation or server have to be rebooted for the policy to take effect? What am I missing? There must be something blocking it from the domain user.