Page 1 of 1

Run program as - Problem

Posted: Thu Aug 25, 2016 8:59 am
by mikKummerfeld
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 3653 times

Re: Run program as - Problem

Posted: Fri Aug 26, 2016 9:11 am
by FrancescoT
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

Re: Run program as - Problem

Posted: Mon Aug 29, 2016 2:06 am
by mikKummerfeld
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

Re: Run program as - Problem

Posted: Tue Aug 30, 2016 6:40 am
by FrancescoT
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