Hello everybody!
I am trying to use "runas" command to launch ssms.exe by another user using the following command:
runas /noprofile /env /user:user /savecred "C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe"
The message that the command shell returns is the following:
Attempting to start C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe as user "My-PC\user" ...
and then nothing happens, i.e. the program will not start up. I look up in the task manager and the process ssms.exe shows up for a very short time (few milliseconds) and then exits immediately automatically. I also have removed the /savecred and /noprofile switches, and tried the following commands too, but I can't achieve the aim that I need:
runas /noprofile /env /user:user /savecred "\"C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe\""
output:
Attempting to start "C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe" as user "My-PC\user" ...
runas /noprofile /env /user:user /savecred "cmd /C \"C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe\""
runas /noprofile /env /user:user /savecred "cmd /K \"C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe\""
but again, nothing happens. I appreciate your help so much
Regards,
Ali