![]() |
|
|
|||||||
| Petri.co.il is happy to award auglan the title of Most Valuable Member !!! |
| Register | Calendar |
Search |
Today's Posts |
Mark Forums Read |
| Notices |
|
|
Logoff Script Not Runningthis thread has 6 replies and has been viewed 12241 times
|
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||||||
|
||||||||
|
I have a simple logoff scipt to delete the contents of the Temp folder applied in group policy. It runs fine when applied locally or from the command line, but not when applied through gp. It is in the right folder but just never runs. I checked the registry and there are no keys listed that indicate the script knows to run. Nothing happens even after the client computer says 'running logoff scripts'.
Contents of deletetempfiles.bat @echo off del /s /q /f c:\temp\* |
|
#2
|
|||||||||
|
|||||||||
|
This is not related to this forum, but anyway...
"checked the registry and there are no keys listed that indicate the script knows to run" - what do you mean by that? Some few points: 1. If you appiled the script as a COMPUTER log-off script you might want to check if the COMPUTER account has permissions to delete files from that directory. 2. Where is the script stored? If it is stored in a share, you might want to check that the COMPUTER account has permissions to read data from there (in case you are using log-off script). 3. I would add a line that writes to the event log (in the script you can use EventCreate) to see if the script really loads or not. Regards, Syslog. |
|
#3
|
||||||||
|
||||||||
|
Considering that it involves a script I would say it is, but anyway...
The Group Policy script's CSE determines which scripts to add or delete and stores this information in registry keys. There are four different registry keys of interest, one each for startup, logon, logoff, and shutdown. • HKLM\SOFTWARE\Policies\Microsoft\Windows\System\Sc ripts\Startup • HKLM\SOFTWARE\Policies\Microsoft\Windows\System\Sc ripts\Shutdown • HKCU\Software\Policies\Microsoft\Windows\System\Sc ripts\Logon • HKCU\Software\Policies\Microsoft\Windows\System\Sc ripts\Logoff You will see them only when Group Policy scripts exist for your Active Directory user or computer account and since the keys have not been added to any of the client machines I assumed that the script is not running and the CSE is not editing the registry to point to the location of the script. The question is why? To answer your other points: 1)That is a good point which might affect some of the users, but even when administrators log in the script does not execute. 2)The script is stored on the Primary Domain Controller. Looks something like... \sysvol\(domainname)\Policies\{id number}\User\Scripts\Logoff I made sure to click the Show Files button in the Logoff Properties dialog box in group policy and stored the script in the folder it opened. 3)Good idea, but wouldn't using EventCreate imply the use of VBS? I was trying to keep it in DOS just for simplicity. Thanks for the help. Also, I tried adding it as a logon script to avoid the worries of user permissions, but still no luck. Last edited by Jason; 8th December 2006 at 00:08.. |
|
#4
|
||||||||||
|
||||||||||
|
Quote:
@Jason: The user in question has to have the log off script applied to it and as such must be in the OU where the gp is applied... not the computer.
__________________
Server 2000 MCP Development: ASP, ASP.Net, PHP, VB, VB.Net, MySQL, MSSQL - Check out my blog http://tonyyeb.blogspot.com ** Remember to give credit where credit is due and leave reputation points |
|
#5
|
||||||||
|
||||||||
|
The script is saved in the gp of the OU I want it to apply to but still nothing. I tried applying it in the gp of the domain and in the gp of the OU with no results.
|
|
#6
|
|||||||||
|
|||||||||
|
Run RSoP in logging mode. See if the policy is being applied properly.
__________________
Regards, Jeremy Network Consultant/Engineer Baltimore - Washington area and beyond www.gma-cpa.com |
|
#7
|
||||||||||
|
||||||||||
|
Or try gpresult on the workstation and with the user being applied to.
__________________
Server 2000 MCP Development: ASP, ASP.Net, PHP, VB, VB.Net, MySQL, MSSQL - Check out my blog http://tonyyeb.blogspot.com ** Remember to give credit where credit is due and leave reputation points |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| force logoff on xp | zilcali | GPO | 3 | 30th August 2007 19:30 |
| Logoff script takes too much time for it's process | S2002 | Windows Server 2000 / 2003 | 4 | 14th February 2006 17:25 |
| Running a Script | bwebber | Windows Server 2000 / 2003 | 1 | 28th October 2005 14:50 |
| running a VB script as a service | chris | General Scripting | 4 | 31st August 2005 16:31 |
| Cannot logoff | Willi123 | Windows 2000 Pro, XP Pro | 4 | 8th September 2004 03:07 |