Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logoff Script

Status
Not open for further replies.

aldovalerio

Programmer
Mar 29, 2001
36
CH
I'm trying to create a logoff script to deletes any files left in a particular folder. I need to create it for 2 specific Win2K workstations in our domain. I've tried doing the following from the domain server and from one of the workstations, but neither method succeeds in getting the script to run at logoff. The script does work when I run it manually.

In the MMC, I added the Group Policy snap-in, selected Local Computer (on the server: the specific workstation). In User Configuration->Windows Settings->Scripts (Login/Logoff), I clicked on Logoff and browsed to my script to add it. Permissions seem OK, since I've set it to Authenticated User.

 
Do you have any error message in your Event viewer? Also, you need to copy the script to the ....\scripts\logoff folder
 
Yes, in fact I lots of the following 2 application events:

Event: 1000, Source: Userenv
Windows cannot query for the list of Group Policy objects. A message that describes the reason for this was previously logged by this policy engine.

Event: 1000, Source: Userenv
Windows cannot establish a connection to {domain name} with (10054).


The script is already in C:\WINNT\system32\GroupPolicy\User\Scripts\Logoff. I think it was copied there when I selected it for the Logoff script in GPO.
 
How about setup the local group policy by using: gpedit.msc on your local machine?
 
I actually did go into the MMC locally and set up the local compter's GPO.

As you suggested, I ran gpedit.msc locally, went into the User Configuration->Windows Settings->Scripts (Login/Logoff). In Logoff, it shows my Logoff script's name and "Show files..." opens the C:\WINNT\system32\GroupPolicy\User\Scripts\Logoff folder which has the command file.
 
Hi aldovalerio,

You should have a file named registry.pol under C:\WINNT\system32\GroupPolicy\UserYou can check the permission on this file.

Good luck to you.
 
registry.pol only exists under the \Machine folder, but not under \User. This is the same as on my other PC. The permissions on the registry.pol and the \User and \Machine folder all have Read&Execute, List Folder Contents, and Read for Authenticated Users. Does I need Modify or Write privileges on it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top