Run program as - Problem

Got a problem you cannot solve? Try here.
mikKummerfeld
Posts: 252
Joined: Sat Dec 03, 2011 3:07 am
Location: Konstanz, Germany
Contact:

Run program as - Problem

Postby mikKummerfeld » Thu Aug 25, 2016 8:59 am

Hello Guys,

I have the following problem with our setup for our java product.

After the setup I want to start a batch file in our $TARGETDIR$.

I used "Run program as" with Working directory and I enabled the UAC Option.

When the batch is started, the working dir is still "C:\Windows\System32" because the setup is started with admin rights.

Bug ?

dfdfdf.png
dfdfdf.png (12.76 KiB) Viewed 3650 times
Kind regards

Heiko Kummerfeld
MIK GmbH

Setup developer for .NET BI Software (12 products)
Head of quality assurance
technical consultant

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Run program as - Problem

Postby FrancescoT » Fri Aug 26, 2016 9:11 am

Dear Heiko,

I am not able to see any problem with the Command.

Please note that as reported with the documentation;
Working Directory
Type the full path for the startup folder of the executable. Leave empty for the default (current) folder.

So if the path of your EXE is "$TARGETDIR$\bin" it's not necessary to specify the same path with the "Working Directory" parameter. Just leave it EMPTY.

Honestly, I don't know how did you test that the working dir is still "C:\Windows\System32".
At any rate, this doesn't demonstrates that the command didn't run under a de-elevated user context ("Run under limited user account when UAC is enabled and setup is elevated (de-elevation)" option).

Finally, I don't know why you effectively need to use "Run Program As ..." in place of "Run Program".

At any rate, please consider that any PATH parameter should be Always enclosed within double quotes.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

mikKummerfeld
Posts: 252
Joined: Sat Dec 03, 2011 3:07 am
Location: Konstanz, Germany
Contact:

Re: Run program as - Problem

Postby mikKummerfeld » Mon Aug 29, 2016 2:06 am

In my Batch file I have an Output with

echo %cd%

which Shows the current Folder and the Output is C:\Windows\System32 and therefore my second Batch file can not be found
Kind regards

Heiko Kummerfeld
MIK GmbH

Setup developer for .NET BI Software (12 products)
Head of quality assurance
technical consultant

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Run program as - Problem

Postby FrancescoT » Tue Aug 30, 2016 6:40 am

Dear Heiko,

the Working dir is only valid with the command call where this has been specified, so you cannot check it with a successive RUN Program call.

At any rate and because I suspect that probably there is something wrong with the approach you used, can you please post a very "VERY" minimal project that replicates the issue?

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 198 guests