| |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Page Last Updated: 21/02/2010
It is often useful to see whether a login script has run correctly. Not only is this useful for troubleshooting while testing a new script, once the script is live it allows you or other IT personnel to verify that the script ran correctly. Create a login script batch file (for example called login2.bat) with the following line What this does is call your main login script so that it runs as normal. However it also uses the "systemdrive" variable from Windows (usually C:\) to find a path and and then creates a txt file with the results of the login script. A new file is created each time. In User Manager you enter the name of the login script with this single line ("login2.bat") and not your main script. Copy both scripts to the Netlogon share. You can also append the date and time to the results file. Change the "login2.bat" file to something like this: If you want to record a complete log of all logins (rather than replacing the file each time) on the local machine, then change the first line of the above script to The file will never be overwritten, just new text appended to it. Using this method also has the advantage that if you have to change the name of your machine login script for any reason, you only need to change it in one place - and not have to change the properties of every user. If you are using this in a Citrix or Terminal Server environment, or a machine that has multiple users then you should change the path the login script information is logged to. Otherwise you will not be able to diagnose who was writing to the script when using it as a troubleshooting tool. The most convenient location will be "%userprofile%", making the script look like this instead: About this site This information originally started life as a page on amset.info, our community assistance site. However that site is targeted at Microsoft Exchange server, as Sembee Ltd. is a Microsoft Exchange consultancy. Therefore it was moved to its own domain in early 2010. Traffic from amset.info is directed here. Other sites that are owned and operated by Sembee Ltd include kbsearch.info, certificatesforexchange.com, dosprompt.info, office-recovery.info, wuauclt.info, blog.sembee.co.uk, exbpa.com and amset.info.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||