[wpdm_package id=’2224′]
Why on earth would we need to use an executable to launch another executable!?
Well, a while ago I was working on an App-V package where the main shortcut pointed to an executable that resided on a server-side location. The executable on the server required runtime dependencies that were inside the App-V package. However, because the executable wasn’t captured inside the App-V bubble, it didn’t get hooked into the App-V subsystem at runtime and threw an error because it couldn’t see the dependencies inside the App-V package!
The easiest solution was to place a copy of ExeLaunchr.exe inside the App-V package during the capture, and manually create a shortcut .lnk with the following command line:
(This assumes that our application installs to C:\Program Files\AlkaneApp during the capture process, the remote executable we need to launch is \\alkaneserver\alkane.exe, and we just want to launch it and forget (and not wait for the exit code))
"C:\Program Files\AlkaneApp\ExeLaunchr.exe" "\\alkaneserver\alkane.exe" false
By using this simple workaround, since ExeLaunchr.exe is located inside the App-V virtual file system the App-V subsystem will then hook into ExeLaunchr.exe at runtime, launch \\alkaneserver\alkane.exe and be able to see all the dependencies inside the App-V package.
Exelaunchr.exe takes two mandatory arguments – the first being the executable to launch and the second being the wait option. Beyond that we can specify multiple command line arguments. The wait argument can be true/false or 1/0.
Usage: Exelaunchr.exe [path_to_exe] [wait] [argument 1] [argument x] …
Example 1: Launch Chrome in kiosk mode opening https://www.alkanesolutions.co.uk, but don’t wait for exit code
Exelaunchr.exe "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" false --kiosk https://www.alkanesolutions.co.uk
Example 2: Launch cmd.exe and wait for exit code
Exelaunchr.exe c:\windows\system32\cmd.exe 1
The log file contains any errors, when and who launched the executable, and (where specified) the exit code. The log file can be located here: %temp%\ExeLaunchr.log