Code:
$nul = SetOption("NoVarsInStrings", "On")
$nul = SetOption("NoMacrosInStrings", "On")
$network="@lserver\netlogon\sms\client.bat"
if @error<>0 'Map Error was server: ' + $network + ' ' + @ERROR + ' - ' + @SERROR ? endif
;$runaspath = @lserver + "\netlogon\runnas.exe"
$runaspath = "@lserver\netlogon\runnas.exe"
if @error<>0 'Map Error was runaspath: ' + $runaspath + ' ' + @ERROR + ' - ' + @SERROR ? endif
$cmd = '"' + $runaspath + '" user:domain\helpdesk "' + $network + '" /pass:password'
Shell $cmd
if @error<>0 'Map Error was execute: ' + @ERROR + ' - ' + @SERROR ? endif
$network + '  ' + $runaspath


Map Error was execute: 2 - The system cannot find the file specified.
@lserver\netlogon\sms\client.bat @lserver\netlogon\runnas.exe

I have verified client.bat is in that location.


Edited by ShaneEP (2017-05-11 05:50 PM)