LaunchWorkingFolder

Dec 7, 2015 at 4:25 PM
have you implemented this new variable in your BA?
Coordinator
Dec 7, 2015 at 5:45 PM
Yes in the 3.10 version.
Dec 7, 2015 at 6:29 PM
Does not seem to be working, I am using it as follows:

<Variable Name="LaunchWorkingFolder" Value="[InstallFolder]\Capture OEM\" />
Coordinator
Dec 7, 2015 at 9:38 PM
Can you confirm you are using v3.10.5758.27000
Dec 8, 2015 at 11:32 AM

I am using Burn v3.10.1.2213, Windows v10.0 (Build 10240: Service Pack 0)

I can’t find 3.10.5758.27000

Coordinator
Dec 8, 2015 at 11:48 AM
Dec 8, 2015 at 12:02 PM

Sorry I thought you were asking about the Wix version.

Yes I have your latest beta version, just downloaded when I updated wix.

Coordinator
Dec 8, 2015 at 12:05 PM
Have you checked that this feature works with the native WiX 3.10 code?
Dec 8, 2015 at 12:06 PM

Not yet but I will, thought I would check with you first to see if you have tested it yet

Dec 8, 2015 at 12:36 PM

Just looking through the source:

case "LaunchWorkingFolder":

launchWorkingDir = this.Core.GetAttributeValue(sourceLineNumbers, attrib, false);

break;

Should the variable stay LaunchWorkingFolder

In the BA I see the call ShelExec:

hr = ShelExec(sczLaunchTarget, sczArguments, L"open", sczLaunchFolder, nCmdShow, m_hWnd, NULL);

It looks like this gets the bundle variable:

static const LPCWSTR WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER = L"LaunchWorkingFolder";

then it sets it to:

hr = BalGetStringVariable(WIXSTDBA_VARIABLE_LAUNCH_WORK_FOLDER, &sczLaunchFolder);

Coordinator
Dec 8, 2015 at 2:33 PM
That code all looks ok and matches the WiX 3.10 code. What message do you get in the logs? What makes you think it isn't working?
Dec 8, 2015 at 3:52 PM

I open an application that loads a CHM file, when I load the app from the Launch button the help file does not load.

When I start the app from the shortcut on the desktop then everything works correctly.

I can duplicate this effect if I remove the “start in” directory for the shortcut.