am trying to copy the login script on to the desktop of some laptops at login (dont ask)
using the command
if %computername:~0,3% == LAP xcopy /Y /D \\lsahtc_win2k1\netlogon\ntstaff.bat "c:\documents and settings\%username%\desktop"
if i run the login script in a cmd window after login has occurred it works fine. it doesnt work when the login script runs normally. is this something to do with profiles not being initialised or something? any thoughts on what to do to get it to work
Try putting something like:
at the top of your script while you're testing and see if you get the output you'd expect. It won't fix it, but it's where I'd start.Code:echo computer name begins with echo %computername:~0,3% echo check for batch file if exist \\lsahtc_win2k1\netlogon\ntstaff.bat echo batch file exists echo path to desktop is echo "c:\documents and settings\%username%\desktop" pause
There are currently 1 users browsing this thread. (0 members and 1 guests)