Question : Shortcut to run application with local admin privileges.

I've got a program which from time to time needs to be run with local administrator privileges, I tried changing registry and folders permissions, but it seems that it just has to be run as admin .  

So maybe I can change the shortcut to this application so it will be always run as another user ( with admin privileges ) ?

I cannot use the password in plain text like echo password | run as ... etc ..

Answer : Shortcut to run application with local admin privileges.

On above code, CMD will execute with your local admin user id and password.

Two more sample added.

Thanks
Saugata
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
Code 2>Notepad
---
Local $sUserName = "Username"
Local $sPassword = "Password"

; Run a command prompt as the other user.
RunAs($sUserName, @ComputerName, $sPassword, 0, "notepad.exe", @SystemDir)


Code 3 > Using Path from ProgramFiles
Local $sUserName = "Username"
Local $sPassword = "Password"

; Run a command prompt as the other user.
RunAs($sUserName, @ComputerName, $sPassword, 0, @ProgramFilesDir & '\WinSCP\WinSCP.exe')
Random Solutions  
 
programming4us programming4us