Windows 7 compatibility mode set for Windows XP SP3 for an executable from the command line and bypass User Account Control Prompt

2

I'm trying to package an application called Boss and is intended to be deployed through SCCM 2012 and seems that is an old Windows 2K application so it doesn't has all the properties I wish it could have to modify inside an MSI so I have the Setup.exe and a bunch of DLL's to register to make it work for Windows 7.

I finished installing with the regular setup.exe but the application requires Admin Rights to run.

I tried to set the following command on my .CMD installer sequence:

reg.exe Add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /f /v "C:\Boss2K\Boss.exe" /d "WINXPSP3"

And it will run the application only with the Admin account but when a single user without an elevated account will try it it just prompt to enter the Admin credentials to run it.

This is the main installer sequence:

@echo off

start /wait C:\Boss1\setup.exe /quiet

del "C:\Users\Public\Desktop\Boss.lnk"
del "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Boss\Boss.lnk"
del "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Boss\Test-O-Matic!.lnk"

copy /y "%~dp0Boss.lnk" "C:\Users\Public\Desktop"
copy /y "%~dp0Boss.lnk" "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Boss\Boss.lnk"
copy /y "%~dp0Test-O-Matic!.lnk" "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Boss\Test-O-Matic!.lnk"

reg.exe Add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /f /v "C:\Boss2K\Boss.exe" /d "WINXPSP3"

exit

So, I just want to know if there's anything that I'm missing here to get this 2 screens bypassed: Compatibility/Change Settings for all Users and the User Account Control in order to run the application without any pop up at all just for this application.

I will appreciate so much any help ! Thanks and kind regards.

derspinne

Posted 2013-06-26T22:35:17.703

Reputation: 21

Answers

0

Use runas.exe

Create a shortcut to the app and modify the command line to:

runas /user:Administrator /savecred C:\Boss2k\Boss.exe

It will ask for administrator credentials once and store them, so the user will be able to run the app with admin rights.

Daniel

Posted 2013-06-26T22:35:17.703

Reputation: 1

0

If a standard user tries to run an application which requires elevation, they will have to enter admin credentials. They are not an admin, so it would be unsafe to let them launch a program which runs as admin. You should grant them access to whatever the program needs to modify so that it can be run as a standard user and not as an admin, or you should grant the user admin so that they can write to system portions of the disk.

Darth Android

Posted 2013-06-26T22:35:17.703

Reputation: 35 133

Notice that Using SCCM 2012 the installations will run always as Admin and the users on our domain has No Admin rights but the intention is to just install the application for them to use it. – derspinne – 2013-06-27T14:40:31.750

0

Unpack msi files:

 msiexec /a setup.msi /qb TARGETDIR=C:\extracted_files

run application setup at compatibility Windows XP SP3

STTR

Posted 2013-06-26T22:35:17.703

Reputation: 6 180

1The installer is an executable and it does not extracts any MSI during installation. Sorry already tried. – derspinne – 2013-06-27T14:41:51.083

@derspinne setup.msi /? – STTR – 2013-06-27T15:06:16.060