UAC

Installing .MSI Application without Admin Privileges and UAC turned on

So I ran into an issue today where I had a user that needed to work from home but did not have our VPN client installed on her machine. She needed the client to be able to connect to a mapped drive on one of the servers. I was able to connect to her machine using TeamViewer (which is a great tool!) and interact with her files and folders. I downloaded the VPN client but when I went to install it I was prompted by UAC and I was unabled to interact with the dialog box. It seems that the UAC prompt is on a different layer of the GUI that you can’t reach when using a remote connect tool like TeamViewer or Join.me. So I had to get creative (this often happens when you work in IT).

There is a program within Windows XP, Windows 7, and Windows 8/8.1 called runas.exe. If you go to the command prompt (cmd.exe) and type runas /? this will give you the list of options for this command. The command output is below.

C:\>runas /?
RUNAS USAGE:

RUNAS [ [/noprofile | /profile] [/env] [/savecred | /netonly] ]
/user:<UserName> program

RUNAS [ [/noprofile | /profile] [/env] [/savecred] ]
/smartcard [/user:<UserName>] program

RUNAS /trustlevel:<TrustLevel> program

/noprofile specifies that the user’s profile should not be loaded.
This causes the application to load more quickly, but
can cause some applications to malfunction.
/profile specifies that the user’s profile should be loaded.
This is the default.
/env to use current environment instead of user’s.
/netonly use if the credentials specified are for remote
access only.
/savecred to use credentials previously saved by the user.
This option is not available on Windows 7 Home or Windows 7 Starter Editions
and will be ignored.
/smartcard use if the credentials are to be supplied from a
smartcard.
/user <UserName> should be in form USER@DOMAIN or DOMAIN\USER
/showtrustlevels displays the trust levels that can be used as arguments
to /trustlevel.
/trustlevel <Level> should be one of levels enumerated
in /showtrustlevels.
program command line for EXE. See below for examples

Examples:
> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin “mmc %windir%\system32\dsa.msc”
> runas /env /user:user@domain.microsoft.com “notepad \”my file.txt\””

NOTE: Enter user’s password only when prompted.
NOTE: /profile is not compatible with /netonly.
NOTE: /savecred is not compatible with /smartcard.

*******************************

Using this command I was able to work around UAC and get the .msi file I needed installed. Here is the complete command I used:
runas /user:domain\username “msiexec /i \”full file path\program name.msi\””