cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ChrSchmidt
Level 4

Launch application after install as Non administrator

Dear community.

A Quick question:

Making an application launch after finished installation is very easy, and there are several ways to accomplish it.

However, it will (as it is now) always be launched with ADMINISTRATIVE rights (Like when you right click, and chose 'Run as Administrator').

I want it to start up with NORMAL rights - and I can't seem to find a way to do so.

So therefore, dear community, do you know how to accomplish this?

All the best
Labels (1)
0 Kudos

(10) Replies
Barbara
Level 7

How do you start the application you want to launch? Do you start it from the Finish Button of the SetupCompleteSucess dialog? In my opinion, this dialog should be displayed in the user mode. And also the programs started from this should be in user mode. Do you use the manifest file for setup.exe to get administraive rights from, the beginning of the setup? This could make a difference.

Barbara
0 Kudos
ChrSchmidt
Level 4

Dear comminuty.

I have been away on other tasks, so this issue has been dormant for quite some time.

But I am now back on the task, and the issue still remains, taht I need to launch my application as a non-administrator.

First some facts, which should also answer some of your questions, Barbara:

My installation is a basic MSI project, written in InstallShield 2012. I am using the Chained MSI-technology, and the Setup Exe always runs in elevated mode (By checking that it requires Administrative priviliges in The 'General Information view'.

My application is launched from a custom action, with Asyncronous (No wait for Completion) Return Processing and In-Script Execution 'Commit Execution (Terminal Server Aware) (MSI-type 18146).
My Working Directory is INSTALLDIR, and my Filename and Commandline is "[INSTALLDIR].exe" .

The reason for putting it here, and not on the finish-button, is that the application should _always_ start - it is not an option not to. Furthermore, it needs to start when installed in silent mode.

I have placed it in the Installation-Execute sequence right before InstallFinalize.

It works like a charm - the application starts flawlessly, but it is still running elevated. And it needs to run as a non-admin!

I hope this is enough information for you to answer my question.

Have a nice day 🙂
0 Kudos
Kelter
Level 10

Do you need the Terminal Server Aware option? Perhaps, it doesn't split the user token if it is impersonating.
0 Kudos
ChrSchmidt
Level 4

Hello again.

I do not need it per say - but since you suggested it, I tried to build another installer, without In-Script Execution set to Terminal Server Aware.

Alas, the application still starts as administrator, when I finish the installation 😞

Do you have any other suggestions?

Kind regards

C
0 Kudos
Kelter
Level 10

Try it in immediate mode directly after InstallFinalize.
0 Kudos
ChrSchmidt
Level 4

Unfortunately that did not do the trick either 😞

I converted it to an imediate (So it's new MSI Type number is 226), and placed it right after InstallFinalize. The result was unfortunately that it didn't start.

I also tried (just to see if I could get it to work with the action being imediate) I tried to remove it from the execution sequence, and instead binding the action to the OK button, on the SetupCompleteSuccess-dialog. It did start it this time, but unfortunately still elevated. I saw the same behavior with Immeditate Execution (Terminal Server Aware).

Let me elaborate on another fact about this custom action, which might be beneficial in identifying the solution.

The installer uses the Chained MSI technology. It is built with a 'Mother-MSI', which (among other things) is responsible for chaining in several other MSI packages.

One of these packages is the application itself, and the Custom action (Which is located in the Mother-MSI) targets one of it's EXE-files. That is the reason for my initial choice of Commit-execution, since I want to make sure that the EXE is there.

Do you have a good idea that I can try?

All the best

/C

P.S. Thanks for the replies so far - it means a lot 🙂
0 Kudos
Kelter
Level 10

Are you testing this install on windows Vista or after with UAC turned on? If you are testing on XP, or if UAC is off, and you are a user with administrative privs, then everything will run elevated. I assumed that this is not the case, but I'm trying to consider everything.
0 Kudos
ChrSchmidt
Level 4

Hello Kelter.

I am testing on Vista and Windows 7 with UAC turned on.
0 Kudos
ChrSchmidt
Level 4

If someone happens to read this, it is unfortunately still unresolved.

Any help is much apreciated
0 Kudos
ElenaN
Level 6

When we faced this issue the only way we found suitable for us – launch executable from dll custom action. So de-elavation happens in dll code. Actual trick was written not by me, so I don’t know much. Main idea was to get Shell object and use its ShellExecute method. As I understand it, we launch not from out setup.exe as parent process, but from explorer which is in most cases de-elevated.
0 Kudos