Quantcast

Run program after installation

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Run program after installation

jlalande
Following the steps outlined at the excellent tutorial at http://www.tramontana.co.hu/wix/lesson8.php#8.6 works great unless the user changes the installation directory from the default.

When going down the happy path the log says that the LaunchFile custom action returns 0 and the program starts.  If the installation directory is changed during installation the log says that LaunchFile returns 1631 and the program does not start.

Is there a way around this problem or another way to run a newly installed program from the installer.

John

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Run program after installation

Richard.Foster

John,

 

It may be a silly question (and hopefully is), but does the application itself have any path-related dependencies? I.e. can you use the same command line as Installer would use successfully, bearing in mind that the working directory and the application’s installation directory may not be the same. I haven’t launched an installed application using the mechanism described, but I have triggered the opening of a specific file from the location it was installed to without any trouble.

 

Regards,

Richard

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of John Lalande
Sent: Wednesday, August 08, 2007 7:11 PM
To: [hidden email]
Subject: [WiX-users] Run program after installation

 

Following the steps outlined at the excellent tutorial at http://www.tramontana.co.hu/wix/lesson8.php#8.6 works great unless the user changes the installation directory from the default.

When going down the happy path the log says that the LaunchFile custom action returns 0 and the program starts.  If the installation directory is changed during installation the log says that LaunchFile returns 1631 and the program does not start.

Is there a way around this problem or another way to run a newly installed program from the installer.

John



* C O N F I D E N T I A L I T Y N O T I C E *
-----------------------------------------------------------
The content of this e-mail is intended solely for the use of the individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. Quixote Traffic Corporation is neither liable for the contents, nor for the proper, complete and timely transmission of (the information contained in) this communication. If you have received this communication in error, please notify the author by replying to this e-mail immediately and delete the material from any computer.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Run program after installation

jlalande
In reply to this post by jlalande
Richard

It certainly is not a silly question and was worth checking.  I checked and the program does not depend on its location.  If I install to a non-default folder I can run the program from its shortcut.

I am starting to think that perhaps this cannot be done as easily as the tutorial illustrates.

Thanks for your response.

John

Richard wrote:
>It may be a silly question (and hopefully is), but does the application
>itself have any path-related dependencies? I.e. can you use the same
>command line as Installer would use successfully, bearing in mind that
>the working directory and the application's installation directory may
>not be the same. I haven't launched an installed application using the
>mechanism described, but I have triggered the opening of a specific file
>from the location it was installed to without any trouble.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Run program after installation

jlalande
According to the tutorial, the FileKey attribute of the custom attribute is set to the Id of the file you wish to run so I assume that it is trying to run the executable directly...which I also successfully tested.

But I don't really know the exact command that the installer is calling as it isn't being logged.  Using the ProcessMonitor does not show the program getting run if I change the installation directory during the install.

However, I did do an experiment where I set the installation folder on the command line by setting INSTALLDIR to what is not defaulted in the installer.  At the end of the install, the program started when the checkbox was set.  This leads me to believe that the path to the executable is being resolved very early and subsequent changes are not being reflected in the custom action.

You are certainly right about this being commonly implemented functionality.

Thanks again

John

On 8/9/07, [hidden email] <[hidden email]> wrote:

John,

 

Be careful - Running from the shortcut may not be a completely valid test. You really need to launch it (e.g. using Start / Run) using exactly the same command line as Microsoft Installer will.

 

You may want to try running the installation with ProcessMonitor running (you can get that from <a href="http://www.microsoft.com/technet/sysinternals/utilities/processmonitor.mspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://www.microsoft.com/technet/sysinternals/utilities/processmonitor.mspx if you haven't encountered it before – although I haven't tried the version that was apparently released yesterday!). That will show you exactly what file(s) are being accessed etc. and may provide some hints about what is going wrong.

 

What you are trying to accomplish is common enough that I think there would be a lot more traffic about it on the list if the tutorial was badly wrong. (As I said, I have used that mechanism myself to launch "readme" files with no trouble.)

 

Hope you manage to get it resolved.

 

Regards,

Richard

 


From: John Lalande [mailto:[hidden email]]
Sent: Thursday, August 09, 2007 11:18 AM
To: Foster, Richard - PAL
Cc: [hidden email]
Subject: Re: [WiX-users] Run program after installation

 

Richard

It certainly is not a silly question and was worth checking.  I checked and the program does not depend on its location.  If I install to a non-default folder I can run the program from its shortcut.

I am starting to think that perhaps this cannot be done as easily as the tutorial illustrates.

Thanks for your response.

John

Richard wrote:
>It may be a silly question (and hopefully is), but does the application
>itself have any path-related dependencies? I.e. can you use the same
>command line as Installer would use successfully, bearing in mind that
>the working directory and the application's installation directory may
>not be the same. I haven't launched an installed application using the
>mechanism described, but I have triggered the opening of a specific file
>from the location it was installed to without any trouble.



* C O N F I D E N T I A L I T Y N O T I C E *
-----------------------------------------------------------
The content of this e-mail is intended solely for the use of the individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. Quixote Traffic Corporation is neither liable for the contents, nor for the proper, complete and timely transmission of (the information contained in) this communication. If you have received this communication in error, please notify the author by replying to this e-mail immediately and delete the material from any computer.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Run program after installation

jlalande
Richard

As per the tutorial, my custom action is defined as:

      <CustomAction Id='LaunchFile' FileKey='DA_exe' ExeCommand='' Return="asyncNoWait" />

This yields a custom action of type 210.

I am very curious how your experiment turns out.

John

On 8/9/07, [hidden email] <[hidden email]> wrote:

Hi John,

 

That's odd that ProcessMonitor doesn't even show a failed attempt at accessing the file. I would certainly expect *something* to show up.

 

Assuming you're following the tutorial example, I believe what should be getting triggered is a type 18 custom action. Since you haven't mentioned otherwise, I also assume that there are no parameters being passed (i.e. the ExeCommand attribute is present, but empty). Is that correct?

 

It is certainly possible that the path to the executable is not being resolved properly, although if that were the case I would expect people to have reported it as a bug long ago. I'm waiting for a build to finish, so I'm going to see if I can get a minimal example working and try to reproduce the problem here.

 

Regards,

Richard

 


From: John Lalande [mailto:[hidden email]]
Sent: Thursday, August 09, 2007 12:54 PM


To: Foster, Richard - PAL
Cc: [hidden email]
Subject: Re: [WiX-users] Run program after installation

 

According to the tutorial, the FileKey attribute of the custom attribute is set to the Id of the file you wish to run so I assume that it is trying to run the executable directly...which I also successfully tested.

But I don't really know the exact command that the installer is calling as it isn't being logged.  Using the
ProcessMonitor does not show the program getting run if I change the installation directory during the install.

However, I did do an experiment where I set the installation folder on the command line by setting INSTALLDIR to what is not defaulted in the installer.  At the end of the install, the program started when the checkbox was set.  This leads me to believe that the path to the executable is being resolved very early and subsequent changes are not being reflected in the custom action.

You are certainly right about this being commonly implemented functionality.

Thanks again

John

On 8/9/07, [hidden email] <[hidden email]> wrote:

John,

 

Be careful - Running from the shortcut may not be a completely valid test. You really need to launch it (e.g. using Start / Run) using exactly the same command line as Microsoft Installer will.

 

You may want to try running the installation with ProcessMonitor running (you can get that from <a href="http://www.microsoft.com/technet/sysinternals/utilities/processmonitor.mspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.microsoft.com/technet/sysinternals/utilities/processmonitor.mspx if you haven't encountered it before – although I haven't tried the version that was apparently released yesterday!). That will show you exactly what file(s) are being accessed etc. and may provide some hints about what is going wrong.

 

What you are trying to accomplish is common enough that I think there would be a lot more traffic about it on the list if the tutorial was badly wrong. (As I said, I have used that mechanism myself to launch "readme" files with no trouble.)

 

Hope you manage to get it resolved.

 

Regards,

Richard

 


From: John Lalande [mailto: [hidden email]]
Sent: Thursday, August 09, 2007 11:18 AM
To: Foster, Richard - PAL
Cc: [hidden email]
Subject: Re: [WiX-users] Run program after installation

 

Richard

It certainly is not a silly question and was worth checking.  I checked and the program does not depend on its location.  If I install to a non-default folder I can run the program from its shortcut.

I am starting to think that perhaps this cannot be done as easily as the tutorial illustrates.

Thanks for your response.

John

Richard wrote:
>It may be a silly question (and hopefully is), but does the application
>itself have any path-related dependencies? I.e. can you use the same
>command line as Installer would use successfully, bearing in mind that
>the working directory and the application's installation directory may
>not be the same. I haven't launched an installed application using the
>mechanism described, but I have triggered the opening of a specific file
>from the location it was installed to without any trouble.



* C O N F I D E N T I A L I T Y N O T I C E *
-----------------------------------------------------------
The content of this e-mail is intended solely for the use of the individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. Quixote Traffic Corporation is neither liable for the contents, nor for the proper, complete and timely transmission of (the information contained in) this communication. If you have received this communication in error, please notify the author by replying to this e-mail immediately and delete the material from any computer.

 



* C O N F I D E N T I A L I T Y N O T I C E *
-----------------------------------------------------------
The content of this e-mail is intended solely for the use of the individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. Quixote Traffic Corporation is neither liable for the contents, nor for the proper, complete and timely transmission of (the information contained in) this communication. If you have received this communication in error, please notify the author by replying to this e-mail immediately and delete the material from any computer.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Run program after installation

Richard.Foster

John,

 

The 210 is a little misleading, I admit.

 

Expressed in hexadecimal, 210 = 0xD2

 

From http://msdn2.microsoft.com/en-us/library/aa368071.aspx we can see that this decodes as follows:

 

0x80 = Run operation asynchronously

0x40 = Ignore exit code

 

That leaves us with 0X12 – i.e. 18 decimal which is what we would expect.

 

I am seeing the same issue as you – the application launches correctly for the default folder, but does not launch for a different folder.

 

For some bizarre reason I am unable to run ProcessMonitor against the installation, or at least I am unable to do so within Microsoft Virtual PC which is where I strongly prefer to test my installations (the virtual PC reboots without permission or any obvious reason). I’ll let you know what I find as I learn more.

 

Regards,

Richard

 


From: John Lalande [mailto:[hidden email]]
Sent: Thursday, August 09, 2007 2:13 PM
To: Foster, Richard - PAL
Cc: [hidden email]
Subject: Re: [WiX-users] Run program after installation

 

Richard

As per the tutorial, my custom action is defined as:

      <CustomAction Id='LaunchFile' FileKey='DA_exe' ExeCommand='' Return="asyncNoWait" />

This yields a custom action of type 210.

I am very curious how your experiment turns out.

John

 



* C O N F I D E N T I A L I T Y N O T I C E *
-----------------------------------------------------------
The content of this e-mail is intended solely for the use of the individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. Quixote Traffic Corporation is neither liable for the contents, nor for the proper, complete and timely transmission of (the information contained in) this communication. If you have received this communication in error, please notify the author by replying to this e-mail immediately and delete the material from any computer.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Run program after installation

jlalande
Richard

I really appreciate your help on this but due to time constraints I have thrown in the towel and written a custom action that works.  It simply gets the INSTALLDIR property, concatenates the exe name and creates a new process...works every time.

Again, thanks so much...

John

On 8/9/07, [hidden email] <[hidden email]> wrote:

John,

 

The 210 is a little misleading, I admit.

 

Expressed in hexadecimal, 210 = 0xD2

 

From <a href="http://msdn2.microsoft.com/en-us/library/aa368071.aspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://msdn2.microsoft.com/en-us/library/aa368071.aspx we can see that this decodes as follows:

 

0x80 = Run operation asynchronously

0x40 = Ignore exit code

 

That leaves us with 0X12 – i.e. 18 decimal which is what we would expect.

 

I am seeing the same issue as you – the application launches correctly for the default folder, but does not launch for a different folder.

 

For some bizarre reason I am unable to run ProcessMonitor against the installation, or at least I am unable to do so within Microsoft Virtual PC which is where I strongly prefer to test my installations (the virtual PC reboots without permission or any obvious reason). I'll let you know what I find as I learn more.

 

Regards,

Richard

 


From: John Lalande [mailto:[hidden email]]
Sent: Thursday, August 09, 2007 2:13 PM
To: Foster, Richard - PAL
Cc: [hidden email]
Subject: Re: [WiX-users] Run program after installation

 

Richard

As per the tutorial, my custom action is defined as:

      <CustomAction Id='LaunchFile' FileKey='DA_exe' ExeCommand='' Return="asyncNoWait" />

This yields a custom action of type 210.

I am very curious how your experiment turns out.

John

 



* C O N F I D E N T I A L I T Y N O T I C E *
-----------------------------------------------------------
The content of this e-mail is intended solely for the use of the individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. Quixote Traffic Corporation is neither liable for the contents, nor for the proper, complete and timely transmission of (the information contained in) this communication. If you have received this communication in error, please notify the author by replying to this e-mail immediately and delete the material from any computer.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Run program after installation

Richard.Foster

John,

 

Glad to hear you sorted it out (even if the solution is arguably less than optimal – but at least it’s a solution).

 

I’m still going to try and work out what the sample in the documentation *should* be, since sooner or later I’ll need it myself! J

 

Regards,

Richard

 


From: John Lalande [mailto:[hidden email]]
Sent: Thursday, August 09, 2007 8:57 PM
To: Foster, Richard - PAL
Cc: [hidden email]
Subject: Re: [WiX-users] Run program after installation

 

Richard

I really appreciate your help on this but due to time constraints I have thrown in the towel and written a custom action that works.  It simply gets the INSTALLDIR property, concatenates the exe name and creates a new process...works every time.

Again, thanks so much...

John

 



* C O N F I D E N T I A L I T Y N O T I C E *
-----------------------------------------------------------
The content of this e-mail is intended solely for the use of the individual or entity to whom it is addressed. If you have received this communication in error, be aware that forwarding it, copying it, or in any way disclosing its content to any other person, is strictly prohibited. Quixote Traffic Corporation is neither liable for the contents, nor for the proper, complete and timely transmission of (the information contained in) this communication. If you have received this communication in error, please notify the author by replying to this e-mail immediately and delete the material from any computer.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Loading...