Re: [WiX-users] Ping Server from dialog
In http://msiext.codeplex.com you'll find a custom action that can do this. TcpIp_Connect Attempts to connect to a remote server, useful for checking whether there's a listening server. See http://msdn.microsoft.com/en-us/library/ms742212(VS.85).aspx for parameter details. Parameters: TCP_IPADDRESS remote TCP/IP address to connect to TCP_PORT remote TCP port to connect to TCP_SOCKET_TYPE socket type, one of SOCK_STREAM, SOCK_DGRAM or SOCK_RAW TCP_PROTOCOL,one of IPPROTO_TCP or IPPROTO_UDP Returns: TCPIP_CONNECTION_ESTABLISHED. Set to 1 if connection was successfully established. check CA_ERROR on function failure Hope this helps, dB. dB. @ dblock.org Moscow|Geneva|Seattle|New York -Original Message- From: Simon Topley [mailto:simon.top...@wallingfordsoftware.com] Sent: Tuesday, September 22, 2009 9:12 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Ping Server from dialog Hi Guys, long time no see. We recently bought a company and I've been tasked with creating an installer for their products. oh joy. One thing they wish to do is use the installer to do all the work a config tool could. So during installation we want to collect servers and port numbers and test the connection to them all. I've managed to collect all the info i need and added it to the registry etc but I'm struggling with testing the connection to these servers. I'm happy to just us ping, but the only way i can see to do it is to embed ping.exe in the installer and call it with customactions. I've not really tried this yet so I'm not sure if it will even work but it still seems a bit of a rubbish way to do it. I'd like to avoid writing any custom code if i could as I'm in a hurry to bang this out and move on. Any ideas? Disclaimer: This electronic communication and its attachments may contain confidential, proprietary and/or legally privileged information which are for the sole use of the intended recipient. If you are not the intended recipient, any use, distribution, or reproduction of this communication is strictly prohibited and may be unlawful; please contact the sender and delete this communication. MWH does not warrant or make any representation regarding this transmission whatsoever nor does it warrant that it is free from viruses or defects, correct or reliable. MWH is not liable for any loss or damage that occurs as a result of this communication entering your computer network. The views expressed in this message are not necessarily those of MWH. This communication cannot form a binding agreement unless that is the express intent of the parties and they are authorized to make such an agreement. MWH reserves all intellectual property rights contained in this transmission. MWH reserves the right to monitor any electronic communication sent or received by its employees. This communication may come from a variety of legal entities within or associated with the MWH group. For a full list of details for these entities please see our website at www.mwhglobal.com. Where business communications relate to the MWH UK Limited entity, the registered office is Terriers House, 201 Amersham Rd, High Wycombe, HP13 5AJ Tel: 01494 526240 and the company is registered in England as registration number 01188070. Where business communications relate to the MWH Constructors Limited entity, the registered office is as above and the company is registered in England as registration number 04635724. Where business communications relate to the MWH Soft Limited entity, the registered office is as above and the company is registered in England as registration number 6975921. -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Ping Server from dialog
Thanks for the offer Blair but I'll probably just write a configuration tool instead. This is like striping an engine with a set of cutlery. It is very annoying that the asynchronous return types do have meaningful return values, surely this is a pretty common thing people want to do. -Original Message- From: Blair [mailto:os...@live.com] Sent: 23 September 2009 00:40 To: Simon Topley Subject: RE: [WiX-users] Ping Server from dialog From the POV of Windows Installer, an action succeeds or fails. It is up to the action if it wants to set properties instead. From the POV of CAQuietExec, it exists for the sole purpose of preventing the flashing command-prompt-style windows you get calling command-line applications directly from Windows Installer. It intends to extend the same calling model. You need a modified version of CAQuietExec that sets a property with the result code of the external application instead of using the result code to return action success or failure. You could write it yourself, or someone else could write one for you. I'll send you one for US$25.00 licensed with the CPL (same license as the WiX toolset). -Original Message- From: Simon Topley [mailto:simon.top...@wallingfordsoftware.com] Sent: Tuesday, September 22, 2009 9:41 AM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Ping Server from dialog me again! Essentially my question now is how do i get meaningful return values using ignore or check and put them in a Property without the installer ending due to the return value? I've managed to change the command argument with other customactions that change the QtExecCmdLine property, which i call from the dialog in the same way i call the CAQuietExec action. It seems that the return values i get from these custom actions varies a great deal based on what i put in the return field. Obviously that is a foolish statement but all the same. The result I get is that Check or ignore both get a return value of 1 regardless of the argument I use, so if i ping localhost i get the same result as if i ping .aiodopyhdolhrxrlaoediou. If I use the asyn return types it is more accurate as in i get a 0 or a 1630 error, however this is not consistent as the custom actions are smashing into each other because they are async. -Original Message- From: Simon Topley Sent: 22 September 2009 16:17 To: 'wix-users@lists.sourceforge.net' Subject: RE: Ping Server from dialog I've triggered it from the dialog using DoAction: Control Id=Install Type=PushButton X=236 Y=243 Width=56 Height=17 Default=yes Text=amp;Next gt; Publish Event=NewDialog Value=[WixUI_RMSPortInput_Next]1/Publish Publish Event=DoAction Value=pingISAServer1/Publish /Control I still haven't taclked putting the return value in a property, but i notice that you don't tell CAQuietExec to use QtExecCmdLine, so when i came to adding a second command line call I hit a wall, is there a way to specify what property should be used by CAQuietExec? Simon -Original Message- From: Simon Topley Sent: 22 September 2009 15:31 To: wix-users@lists.sourceforge.net Subject: RE: Ping Server from dialog Ok I have it running ping using CAQuietExec, I think this maybe a step in the right direction. I just need to deal with triggering it from a dialog button click and capturing the return value to inspect, so I can display an appropriate message. Property Id=QtExecCmdLine Value=quot;ping.exequot; /n 1 [ISASERVER]/ CustomAction Id=pingServer BinaryKey=wixca DllEntry=CAQuietExec Execute=immediate Return=check/ Binary Id=wixca src=wixca.dll/ InstallExecuteSequence Custom Action='pingServer' After=InstallFinalizeNOT Installed/Custom /InstallExecuteSequence Disclaimer: This electronic communication and its attachments may contain confidential, proprietary and/or legally privileged information which are for the sole use of the intended recipient. If you are not the intended recipient, any use, distribution, or reproduction of this communication is strictly prohibited and may be unlawful; please contact the sender and delete this communication. MWH does not warrant or make any representation regarding this transmission whatsoever nor does it warrant that it is free from viruses or defects, correct or reliable. MWH is not liable for any loss or damage that occurs as a result of this communication entering your computer network. The views expressed in this message are not necessarily those of MWH. This communication cannot form a binding agreement unless that is the express intent of the parties and they are authorized to make such an agreement. MWH reserves all intellectual property rights contained in this transmission. MWH reserves the right to monitor any electronic communication sent or received by its employees. This communication may come from a variety of legal entities within or associated with the MWH group. For a full list of details
Re: [WiX-users] Ping Server from dialog
Generally speaking, if people want that degree of control over the result they don't use a pre-existing program because this is the kind of frustration they run into. I've run into this type of ping problem before, and found a C++ example on the internet. So in this case I'd be sticking that code into a C++ custom action call and have it set whatever properties were needed. However, I don't think it's common (or at least it shouldn't be, IMO) to be in a situation where (for example) an install cannot proceed because it can't ping some server somewhere. If you're configuring something to point to a server during the install you probably need a configuration tool later anyway in case the server name changes, so just do it there. This is the whole installation vs configuration thing, and if you are now doing in a post-install step then I think you're doing the right thing, FWIW. Phil Wilson -Original Message- From: Simon Topley [mailto:simon.top...@wallingfordsoftware.com] Sent: Wednesday, September 23, 2009 2:10 AM To: Blair Cc: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Ping Server from dialog Thanks for the offer Blair but I'll probably just write a configuration tool instead. This is like striping an engine with a set of cutlery. It is very annoying that the asynchronous return types do have meaningful return values, surely this is a pretty common thing people want to do. -Original Message- From: Blair [mailto:os...@live.com] Sent: 23 September 2009 00:40 To: Simon Topley Subject: RE: [WiX-users] Ping Server from dialog From the POV of Windows Installer, an action succeeds or fails. It is up to the action if it wants to set properties instead. From the POV of CAQuietExec, it exists for the sole purpose of preventing the flashing command-prompt-style windows you get calling command-line applications directly from Windows Installer. It intends to extend the same calling model. You need a modified version of CAQuietExec that sets a property with the result code of the external application instead of using the result code to return action success or failure. You could write it yourself, or someone else could write one for you. I'll send you one for US$25.00 licensed with the CPL (same license as the WiX toolset). -Original Message- From: Simon Topley [mailto:simon.top...@wallingfordsoftware.com] Sent: Tuesday, September 22, 2009 9:41 AM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Ping Server from dialog me again! Essentially my question now is how do i get meaningful return values using ignore or check and put them in a Property without the installer ending due to the return value? I've managed to change the command argument with other customactions that change the QtExecCmdLine property, which i call from the dialog in the same way i call the CAQuietExec action. It seems that the return values i get from these custom actions varies a great deal based on what i put in the return field. Obviously that is a foolish statement but all the same. The result I get is that Check or ignore both get a return value of 1 regardless of the argument I use, so if i ping localhost i get the same result as if i ping .aiodopyhdolhrxrlaoediou. If I use the asyn return types it is more accurate as in i get a 0 or a 1630 error, however this is not consistent as the custom actions are smashing into each other because they are async. -Original Message- From: Simon Topley Sent: 22 September 2009 16:17 To: 'wix-users@lists.sourceforge.net' Subject: RE: Ping Server from dialog I've triggered it from the dialog using DoAction: Control Id=Install Type=PushButton X=236 Y=243 Width=56 Height=17 Default=yes Text=amp;Next gt; Publish Event=NewDialog Value=[WixUI_RMSPortInput_Next]1/Publish Publish Event=DoAction Value=pingISAServer1/Publish /Control I still haven't taclked putting the return value in a property, but i notice that you don't tell CAQuietExec to use QtExecCmdLine, so when i came to adding a second command line call I hit a wall, is there a way to specify what property should be used by CAQuietExec? Simon -Original Message- From: Simon Topley Sent: 22 September 2009 15:31 To: wix-users@lists.sourceforge.net Subject: RE: Ping Server from dialog Ok I have it running ping using CAQuietExec, I think this maybe a step in the right direction. I just need to deal with triggering it from a dialog button click and capturing the return value to inspect, so I can display an appropriate message. Property Id=QtExecCmdLine Value=quot;ping.exequot; /n 1 [ISASERVER]/ CustomAction Id=pingServer BinaryKey=wixca DllEntry=CAQuietExec Execute=immediate Return=check/ Binary Id=wixca src=wixca.dll/ InstallExecuteSequence Custom Action='pingServer' After=InstallFinalizeNOT Installed/Custom /InstallExecuteSequence Disclaimer: This electronic communication and its
[WiX-users] Ping Server from dialog
Hi Guys, long time no see. We recently bought a company and I've been tasked with creating an installer for their products. oh joy. One thing they wish to do is use the installer to do all the work a config tool could. So during installation we want to collect servers and port numbers and test the connection to them all. I've managed to collect all the info i need and added it to the registry etc but I'm struggling with testing the connection to these servers. I'm happy to just us ping, but the only way i can see to do it is to embed ping.exe in the installer and call it with customactions. I've not really tried this yet so I'm not sure if it will even work but it still seems a bit of a rubbish way to do it. I'd like to avoid writing any custom code if i could as I'm in a hurry to bang this out and move on. Any ideas? Disclaimer: This electronic communication and its attachments may contain confidential, proprietary and/or legally privileged information which are for the sole use of the intended recipient. If you are not the intended recipient, any use, distribution, or reproduction of this communication is strictly prohibited and may be unlawful; please contact the sender and delete this communication. MWH does not warrant or make any representation regarding this transmission whatsoever nor does it warrant that it is free from viruses or defects, correct or reliable. MWH is not liable for any loss or damage that occurs as a result of this communication entering your computer network. The views expressed in this message are not necessarily those of MWH. This communication cannot form a binding agreement unless that is the express intent of the parties and they are authorized to make such an agreement. MWH reserves all intellectual property rights contained in this transmission. MWH reserves the right to monitor any electronic communication sent or received by its employees. This communication may come from a variety of legal entities within or associated with the MWH group. For a full list of details for these entities please see our website at www.mwhglobal.com. Where business communications relate to the MWH UK Limited entity, the registered office is Terriers House, 201 Amersham Rd, High Wycombe, HP13 5AJ Tel: 01494 526240 and the company is registered in England as registration number 01188070. Where business communications relate to the MWH Constructors Limited entity, the registered office is as above and the company is registered in England as registration number 04635724. Where business communications relate to the MWH Soft Limited entity, the registered office is as above and the company is registered in England as registration number 6975921. -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Ping Server from dialog
Ok I have it running ping using CAQuietExec, I think this maybe a step in the right direction. I just need to deal with triggering it from a dialog button click and capturing the return value to inspect, so I can display an appropriate message. Property Id=QtExecCmdLine Value=quot;ping.exequot; /n 1 [ISASERVER]/ CustomAction Id=pingServer BinaryKey=wixca DllEntry=CAQuietExec Execute=immediate Return=check/ Binary Id=wixca src=wixca.dll/ InstallExecuteSequence Custom Action='pingServer' After=InstallFinalizeNOT Installed/Custom /InstallExecuteSequence Disclaimer: This electronic communication and its attachments may contain confidential, proprietary and/or legally privileged information which are for the sole use of the intended recipient. If you are not the intended recipient, any use, distribution, or reproduction of this communication is strictly prohibited and may be unlawful; please contact the sender and delete this communication. MWH does not warrant or make any representation regarding this transmission whatsoever nor does it warrant that it is free from viruses or defects, correct or reliable. MWH is not liable for any loss or damage that occurs as a result of this communication entering your computer network. The views expressed in this message are not necessarily those of MWH. This communication cannot form a binding agreement unless that is the express intent of the parties and they are authorized to make such an agreement. MWH reserves all intellectual property rights contained in this transmission. MWH reserves the right to monitor any electronic communication sent or received by its employees. This communication may come from a variety of legal entities within or associated with the MWH group. For a full list of details for these entities please see our website at www.mwhglobal.com. Where business communications relate to the MWH UK Limited entity, the registered office is Terriers House, 201 Amersham Rd, High Wycombe, HP13 5AJ Tel: 01494 526240 and the company is registered in England as registration number 01188070. Where business communications relate to the MWH Constructors Limited entity, the registered office is as above and the company is registered in England as registration number 04635724. Where business communications relate to the MWH Soft Limited entity, the registered office is as above and the company is registered in England as registration number 6975921. -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Ping Server from dialog
me again! Essentially my question now is how do i get meaningful return values using ignore or check and put them in a Property without the installer ending due to the return value? I've managed to change the command argument with other customactions that change the QtExecCmdLine property, which i call from the dialog in the same way i call the CAQuietExec action. It seems that the return values i get from these custom actions varies a great deal based on what i put in the return field. Obviously that is a foolish statement but all the same. The result I get is that Check or ignore both get a return value of 1 regardless of the argument I use, so if i ping localhost i get the same result as if i ping .aiodopyhdolhrxrlaoediou. If I use the asyn return types it is more accurate as in i get a 0 or a 1630 error, however this is not consistent as the custom actions are smashing into each other because they are async. -Original Message- From: Simon Topley Sent: 22 September 2009 16:17 To: 'wix-users@lists.sourceforge.net' Subject: RE: Ping Server from dialog I've triggered it from the dialog using DoAction: Control Id=Install Type=PushButton X=236 Y=243 Width=56 Height=17 Default=yes Text=amp;Next gt; Publish Event=NewDialog Value=[WixUI_RMSPortInput_Next]1/Publish Publish Event=DoAction Value=pingISAServer1/Publish /Control I still haven't taclked putting the return value in a property, but i notice that you don't tell CAQuietExec to use QtExecCmdLine, so when i came to adding a second command line call I hit a wall, is there a way to specify what property should be used by CAQuietExec? Simon -Original Message- From: Simon Topley Sent: 22 September 2009 15:31 To: wix-users@lists.sourceforge.net Subject: RE: Ping Server from dialog Ok I have it running ping using CAQuietExec, I think this maybe a step in the right direction. I just need to deal with triggering it from a dialog button click and capturing the return value to inspect, so I can display an appropriate message. Property Id=QtExecCmdLine Value=quot;ping.exequot; /n 1 [ISASERVER]/ CustomAction Id=pingServer BinaryKey=wixca DllEntry=CAQuietExec Execute=immediate Return=check/ Binary Id=wixca src=wixca.dll/ InstallExecuteSequence Custom Action='pingServer' After=InstallFinalizeNOT Installed/Custom /InstallExecuteSequence Disclaimer: This electronic communication and its attachments may contain confidential, proprietary and/or legally privileged information which are for the sole use of the intended recipient. If you are not the intended recipient, any use, distribution, or reproduction of this communication is strictly prohibited and may be unlawful; please contact the sender and delete this communication. MWH does not warrant or make any representation regarding this transmission whatsoever nor does it warrant that it is free from viruses or defects, correct or reliable. MWH is not liable for any loss or damage that occurs as a result of this communication entering your computer network. The views expressed in this message are not necessarily those of MWH. This communication cannot form a binding agreement unless that is the express intent of the parties and they are authorized to make such an agreement. MWH reserves all intellectual property rights contained in this transmission. MWH reserves the right to monitor any electronic communication sent or received by its employees. This communication may come from a variety of legal entities within or associated with the MWH group. For a full list of details for these entities please see our website at www.mwhglobal.com. Where business communications relate to the MWH UK Limited entity, the registered office is Terriers House, 201 Amersham Rd, High Wycombe, HP13 5AJ Tel: 01494 526240 and the company is registered in England as registration number 01188070. Where business communications relate to the MWH Constructors Limited entity, the registered office is as above and the company is registered in England as registration number 04635724. Where business communications relate to the MWH Soft Limited entity, the registered office is as above and the company is registered in England as registration number 6975921. -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users