WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: jkjk12 on September 17, 2015, 09:03:16 AM

Title: RunWithLogin
Post by: jkjk12 on September 17, 2015, 09:03:16 AM
I am trying to use the RunWithLogon command and it fails.   No matter who I run this compiled .EXE as it fails, even when I run it as myself or by doing a "run as administrator" it fails.   Is my logic wrong? 

runas_user = "MyID"
runas_domain = "Company.org"
runas_pswd = "welcome123"
RunWithLogon("\\Server\Share\ChargeCapture_DesktopConfig.exe", "", "", @NORMAL, @NOWAIT, runas_user, runas_domain, runas_pswd,0)
Title: Re: RunWithLogin
Post by: td on September 17, 2015, 09:20:19 AM
Please specify the version of Windows and WinBatch you are using.  Also provide the systems current UAC settings.  Do not simply repeat that UAC is off, unless you are using Windows 7/Vista, because turning off the UAC prompt is not the same thing as turning off UAC on Windows 8 and newer.  The only way to turn it off is to either modify the registry directly or through group policy on these newer systems.

You may also find the following Tech Support article useful:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/UAC+RunWithLogon~and~UAC.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/UAC+RunWithLogon~and~UAC.txt)
Title: Re: RunWithLogin
Post by: jkjk12 on September 17, 2015, 09:35:34 AM
Windows 7 x86.   WinBatch 2014A.  Via GPO UAC is off. 
Title: Re: RunWithLogin
Post by: td on September 17, 2015, 09:43:18 AM
Also please provide the error number displayed by the WinBatch error dialog box when RuneWithLogin fails and provide any additional error information provided in the More Error Info message if and when the More Error Info button is enabled. In addition please  provide the OS information of the server hosting the share including its UAC status, if applicable.