2

I'm trying to package an application called Boss and it's intended to be deployed through SCCM 2012 and seems that it's 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 these 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.

3 Answers 3

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.

1
  • 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
    Commented Jun 27, 2013 at 14:40
0

Unpack msi files:

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

run application setup at compatibility Windows XP SP3

2
  • 1
    The installer is an executable and it does not extracts any MSI during installation. Sorry already tried.
    – derspinne
    Commented Jun 27, 2013 at 14:41
  • @derspinne setup.msi /?
    – STTR
    Commented Jun 27, 2013 at 15:06
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .