I'm trying to use the RUNAS command to run a batch file with admin rights and using Sanur.exe to pipe the password in. Whenever I test the script by running my login script from NETLOGON, it works. However, when I'm logging in and the login script fires automatically, it doesn't work. I've been able to get the RUNAS command work fine without the Sanur.exe part, where it will prompt me for a password during the login process. Any ideas??
Here's the runas command I'm using.
code:
 SHELL '%COMSPEC% /c runas /env /user:VANACORE\Scripts "\\server1\netlogon\GamesXP.bat" | C:\sanur.exe Password' 

And here's the batch file:
code:
CMD.exe /c "sysocmgr /i:%windir%\inf\sysoc.inf /u:c:\ocm.txt /q"