wflohr
Posts: 9
Joined: Tue Aug 09, 2005 7:30 am

Run-As Shortcut

how can i create a shortcut during install which prompts the user for username and password?

The normal way in windows explorer is to Right-click on the shortcut and select Properties. In the center area of the Properties dialog box find the checkbox labeled, "Run as different user". Select the checkbox and click OK to close the Properties dialog box.

thanks in advance,
wolfgang
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi Wolfgang,

You cannot create a shortcut that prompts for a username and password, as Windows Installer doesn't support this.

However, you can create a shortcut that will run an application as a specific user. For this, you can use a Windows utility, Runas.exe.

In your project, you should create a shortcut to an external file.

The "Shortcut Target" should be:

[SystemFolder]runas.exe

The "Arguments" should be something like:

/user:MyUserName "[#EXEINPACKAGE.EXE]"

The quotes are required in case the path to the EXE contains spaces.

When you run this shortcut you will be prompted to enter the password for that account.

Best,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”