I am running a kiosk type system where the user has almost zero permissions. I want to place an icon on their desktop that would run a specific program as their Active Directory credentials. I am familiar with SysInternals ShellRunAs, but it would require a right-click which means retraining users. Could I accomplish the same thing by having them double-click on the icon that they would get a prompt for username/password and then execute the program as that?
If PowerShell is an option for you, a PowerShell script can prompt for credentials and then use those credentials to start a process.
The user sees this prompt, and then the process is started.
You can modify the shortcut to use the command-line
The /user argument can also accept domain credentials (either hard-coded, or using the %USERDOMAIN% environment variable:
The username can be an assigned to the
Or, with both the domain and username coming from the environment:
Once the shortcut is opened, a
If you need the user to enter a username, then things get a little hackish and you have to put this in a .bat file:
|show 1 more comment|
ShellRunAs doesn't strictly require a right-click; it can be (and in fact is) called as an ordinary tool with the original program given in the command-line – just like the built-in
This could be used in a shortcut.