marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

Launch File or Open URL problem (mounting command line)

Hi

I'm creating a installation for a Click-once deployment project and i need to call a couple of lines using "mage.exe". So I added 2 custom actions on the install folder of type "Launch File or Open URL":

"[&mage.exe]" -update "[APPDIR]source\MyApp.Application" -pu "http://[%COMPUTERNAME]/[TXT_VDALIAS]/source/MyApp.Application"
"[&mage.exe]" -sign "[APPDIR]source\MyApp.Application" -cf "[APPDIR]source\TX-Desktop_TemporaryKey.pfx"

The weird thing is that after runnning those, the application still was pointing to the server where it was originally published so it seems that hte 1st command line didn't run at all. so i enabled the logging and this is what i saw:

(Action=UpdateDeploymentLocation,ActionType=1026,Source=BinaryData,Target="C:\Program Files\MyApp Inc\MyApp Desktop\mage.exe" -update "C:\Program Files\MyApp Inc\MyApp Desktop\/TDesktop/source/MyApp.Application",)
MSI (s) (18:88) [16:28:16:254]: Executing op: CustomActionSchedule(Action=ResignAssembly,ActionType=1026,Source=BinaryData,Target="C:\Program Files\MyApp Inc\MyApp Desktop\mage.exe" -sign "C:\Program Files\MyApp Inc\MyApp Desktop\source\MyApp.Application" -cf "C:\Program Files\MyApp Inc\MyApp Desktop\source\TX-Desktop_TemporaryKey.pfx",)

It seems that for the 1st custom actions anything between [APPDIR] and [%COMPUTERNAME] is missing..

Am I doing something wrong or is this a real problem?

Thanks,
Marcelo
marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

Re: Launch File or Open URL problem (mounting command line)

Just to add to this.. it seems that the Environment variable name is the problem.. if i remove the [%COMPUTERNAME] and force a computer name for testing, it works wonders...
Cristi
Posts: 34
Joined: Wed Oct 08, 2008 8:44 am
Contact: Website

Re: Launch File or Open URL problem (mounting command line)

Hi Marcelo,

Please note that environment variables can't be used in the Launch File or Open URL Custom Action, but you can use the [ComputerName] property. Therefore the command line can look like this:

Code: Select all

"[&mage.exe]" -update "[APPDIR]source\MyApp.Application" -pu "http://[ComputerName]/[TXT_VDALIAS]/source/MyApp.Application"
Best regards,
Cristi
______________________________
Cristi Costache
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”