Slim57
Posts: 9
Joined: Fri Sep 12, 2014 10:23 pm

Launch File Working Directory NOT WORKING!

Ok, I have two launch file custom actions, one for install, one for uninstall, both run a batch file, both batches reference a command script file. All files are being created successfully in [APPDIR]. Both launch file custom action dialogs have [APPDIR] in the "Working Directory" text box.
User Account Control dialogs occur at the expected times (when batch is being attempted), allowing to inspect the command being requested.

Commands within both batches fail to find their respective command script file, because the command is executing in c:\WINDOWS\SYSTEM32. This is *not* the APPDIR.

Any clues here?
Eusebiu
Posts: 4964
Joined: Wed Nov 14, 2012 2:04 pm

Re: Launch File Working Directory NOT WORKING!

Hi,

I'm not sure why you encounter this problem. I tested your scenario, but I couldn't reproduce the problem. Did you check the "When the system is being modified (deferred)" option for your custom actions?

If so, can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com, so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Eusebiu
Posts: 4964
Joined: Wed Nov 14, 2012 2:04 pm

Re: Launch File Working Directory NOT WORKING!

Hi,

I tested the scenario more deeply and I reproduced it. This seems to be an Advanced Installer issue. A fix will be available in a future version of Advanced Installer, thank you for bringing it to our attention.

However, please keep in mind that if the custom actions are placed inside the "Install Execution Stage" section, they will inherit the installer privileges. Also, you can set the "deferred" with "no impersonation" options to run them under the "LocalSystem" account.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hadas
Posts: 43
Joined: Mon Jan 06, 2014 10:53 am

Re: Launch File Working Directory NOT WORKING!

Hi,

Didn't it use to work on version 11.0?
I have launchFile custom action when the working directory isn't working. I updated to 11.5.1 still same problem.

What can I do to as a work around?

Thanks,
Hadas
Eusebiu
Posts: 4964
Joined: Wed Nov 14, 2012 2:04 pm

Re: Launch File Working Directory NOT WORKING!

Hi Hadas,

In my tests the issue was reproducible in version 11.0, too. It was not fixed yet. We will update this thread when it will be fixed.

Did you try the workaround I mentioned in my previous post to see if it works?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hadas
Posts: 43
Joined: Mon Jan 06, 2014 10:53 am

Re: Launch File Working Directory NOT WORKING!

Hi,

I did try the workaround you suggested, still doesn't work.


Hadas
Eusebiu
Posts: 4964
Joined: Wed Nov 14, 2012 2:04 pm

Re: Launch File Working Directory NOT WORKING!

Hi Hadas,

Can you please give us more details about the problem? What fails if you set the "deferred" with "no impersonation" options? Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com, so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hadas
Posts: 43
Joined: Mon Jan 06, 2014 10:53 am

Re: Launch File Working Directory NOT WORKING!

Hi,

The problem was in my cmd file.
It working fine.
Thanks
Hadas
Eusebiu
Posts: 4964
Joined: Wed Nov 14, 2012 2:04 pm

Re: Launch File Working Directory NOT WORKING!

You're welcome Hadas. I'm glad you solved the problem.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kylec
Posts: 22
Joined: Thu Jan 29, 2015 9:59 pm

Re: Launch File Working Directory NOT WORKING!

Has this issue been resolved in 11.8?

I'm trying to configure a launch on finish and I've tried using both a LaunchFile and LaunchEXEWithWorkingDir. In both cases I've set the working directory to APPDIR\bin but both actions fail to set the working directory.
Eusebiu
Posts: 4964
Joined: Wed Nov 14, 2012 2:04 pm

Re: Launch File Working Directory NOT WORKING!

Hi,

Investigating this problem, we found that this happens only for BAT files. We set correctly the working directory for the BAT file, but for some reason the "CMD.exe" file that is launched does not have it set.

There is no fix that we can implement for this. If you need to launch a file with working directory, you can launch it directly in the "Launch file" or "Launch file with working directory" custom actions, not from a BAT file.

If you really need to use a BAT file, you can try to set the working directory directly in that BAT file as in the example below:

Code: Select all

pushd D:\mypath

// launch your files

popd
Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”