Ok i'm having a bit of a problem deleting a file (LMHOSTS) from stations via startup script. This is what i've done so far:
1. Created a knew GPO with a startup script pointing to a batch file in \\serveripaddress\netlogon\ called deleteLMHOSTS.bat (command line of: del c:\windows\system32\drivers\etc\LMHOSTS /q)
2. Allocated relevant groups to GPO and ticked "Apply GPO"
3. Rebooted station
When booting the station now says "Running Startup Scripts" but the file is still present on the station. If i log in and run from the run command \\serveripaddress\netlogon\deleteLMHOSTS.bat the file deletes fine so why doesn't it do this from startup script?
The RM system seems to stop certain scripts from working. I can get a log off script to work but not a log on. Create a test script that just copied a text file or something then you know it is working. It could be that the script does not have security privileges to carry out the operation. Scripting is advanced (for an RM system anyway) you are pushing at the edge of the RM system by the sounds of it.

Have you tried doing this using a VBScript instead?
It will run the command as nt authority\system so security shouldn't be an issue. If I'd done this I'd have:
* Added the script to the existing 'Script Actions' GPO and left the permissions alone (has Authenticated Users read, apply).
* Made the path \\schooldomain.internal\netlogon\somescript.bat
* Used commands like this:
echo Running my script > c:\logss.txt
del /f /q "c:\windows\system32\drivers\etc\lmhosts" >>c:\logss.txt 2>&1
This is no more advanced than anywhere else - CC3 has management apps, a lot of preconfiguration and uhh.. one or two bugs.. but it's still Windows!
Damn it it didn't think of using the FQDN. The stations could map via this i even tested it but didn't think to try it. I just tried it from it's netbios name and IP. I'm sure it would have worked aswell.
Never mind, in the end i just recreated the old scope and rebooted all the stations. They then saw the startup script and ran it successfully. Once this was done i re-created the new scope and rebooted all clients again. All stations are now over to the new scope and working fine.
@nicholab: I've never had any issues getting scripts running on CC3 other than this obviously but this was down to IP Scopes not the RM system
There are currently 1 users browsing this thread. (0 members and 1 guests)