Jump to content

Recommended Posts

Posted

I am new to AutoIT & need to run application with different user credentials.

I am using below script with RunAs() but the application is not invoking.

#include <AutoItConstants.au3>
$sUserName = $CMDLine[1]
$sDomain = $CMDLine[2]
$sPassword = $CMDLine[3]
RunAs($sUserName, $sDomain, $sPassword, $RUN_LOGON_NOPROFILE,"ssms.exe")

Kindly assist! Thank you

  • Solution
Posted

Working. 

I used below Script :

RunAs($sUserName, $sDomain, $sPassword, $RUN_LOGON_NOPROFILE,Run("C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Ssms.exe"))

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...