Newbie help request: running exe from desktop [SOLVED]

Hi. Just bought and installed PB v3 yesterday. Of course, as seems to be the typical case, I bought to finish a task that was due the day before :slight_smile: Anyway, the task is fairly simple:

-unpack 4 files into a known location (I have chosen the user’s Desktop for simplicity sake);
-run one of those files (“AIA.exe”, that I cannot change, supplied by a 3rd party);
-copy a result file with a “PIA” extension “up” to the Desktop folder (when run “AIA.exe” automatically creates a subfolder “Information” beneath its own folder).

From the “Package: Main Events” dialog I have created 2 “after file extraction” custom actions: ‘Execute the program “%DESKTOPDIR%\AIA.exe” and wait until its end’, with a working directory of “%DESKTOPDIR%” specified; followed by 'Copy files from “%DESKTOPDIR%\Information*.PIA” to “%DESKTOPDIR%”.

The extraction of the files goes as planned: the 4 files are created in my Desktop folder. However, it is unclear that “AIA.exe” is run. I have tested running “AIA.exe” many times from both the original and PB-extracted copies, and it without fail creates the “Information” subfolder containing the target “PIA” file. However, when run from the package, “Information” is not created. I’m not sure if “AIA.exe” is not run at all, or if it is behaving differently in the 2 different cases. If it matters, I also specified in the extraction options that the target folder should be opened in Explorer, which is not strictly needed, in case that is a potential complication. This seems to be a very simple task, I suspect that either there is some basic requirement in PB that I have missed, or if some Windows “feature” (testing on Win 7 SP1 64-bit) is getting in my way. Can you help?



Answered by email.
For others, the problem is that the AIA.exe he tries to run requires the working directory to be set to %DESTPATH%
Also, when you use Copy files, do not forget the end backslash in the destination folder for wildcard copy: “%DESKTOPDIR%”.