Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript

2011-01-19 Thread Shaun Hayward
Thanks, Chris - I didn't receive your original message but appreciate the 
re-send.

This should make life considerably easier.


Shaun Hayward | Senior Software Developer | Omnivex | 905.761.6640 ext 429 | 
www.omnivex.com


-Original Message-
From: Christopher Painter [mailto:chr...@deploymentengineering.com]
Sent: Tuesday, January 18, 2011 9:03 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfoundin 
subject - Email found in subject - Email found in subject - Email found in 
subject

Perhaps SourceForge is swallowing my messages again but here are links and notes
I sent you yesterday.


- Original Message 
From: Christopher Painter chr...@deploymentengineering.com
To: General discussion for Windows Installer XML toolset.
wix-users@lists.sourceforge.net
Sent: Mon, January 17, 2011 11:00:52 AM
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfound in
subject - Email found in subject - Email found in subject

Take a look at

http://wix.sourceforge.net/manual-wix3/wix_xsd_filesearch.htm

http://wix.sourceforge.net/manual-wix3/check_the_version_number.htm

Pay careful attention to:

Important: When doing a locale-neutral search for a file, you must set the
MinVersion property to one revision number lower than the actual version you
want to search for. In this example, while we want to find file version
6.0.6001.1751, the MinVersion is set to 6.0.6001.1750. This is because of a
quirk in how the Windows Installer matches file versions. More information is
available in the Windows Installer documentation.




Christopher Painter, Author of Deployment Engineering Blog
Have a hot tip, know a secret or read a really good thread that deserves
attention? E-Mail Me



- Original Message 
From: Shaun Hayward shayw...@omnivex.com
To: General discussion for Windows Installer XML toolset.
wix-users@lists.sourceforge.net
Sent: Mon, January 17, 2011 9:44:53 AM
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfound in
subject - Email found in subject - Email found in subject

 WiX doesn't do it, the Windows Installer does. WiX is just the language.

True :-)

So let me rephrase: I didn't realize that MSI had a way to retrieve the DLL's
version and compare against it. But since it does, the awesome WiX will support
it. Does anyone have a WiX sample of how to accomplish this?

Thanks!
- Shaun


Shaun Hayward | Senior Software Developer | Omnivex | 905.761.6640 ext 429 |
www.omnivex.com

-Original Message-
From: Rob Mensching [mailto:r...@robmensching.com]
Sent: Friday, January 14, 2011 11:12 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfound in
subject - Email found in subject - Email found in subject

WiX doesn't do it, the Windows Installer does. WiX is just the language.
smile/

Check out the FileSearch element.

On Fri, Jan 14, 2011 at 6:17 PM, Shaun Hayward shayw...@omnivex.com wrote:

 I didn't realize WiX had a way to actually retrieve a DLL's version and
 compare against it. I was looking all over for that.

 Any chance you have a code sample up on your blog?

 And I'll be sure to check out the DTF articles on your blog.

 Thanks
 - Shaun

 
 From: Christopher Painter [chr...@deploymentengineering.com]
 Sent: Friday, January 14, 2011 7:16 PM
 To: General discussion for Windows Installer XML toolset.
 Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript -
 Emailfound in subject - Email found in subject

 Funny you say that,  I was doing some work with KB976477 just today.  Some
 much
 that I have that KB memorized.

 I don't use a CA to detect this hotfix.  I just  use the
 AppSearch/DrLocator/Signature tables to search
 [CommonFilesFolder]\Microsoft
 Shared\Office12 for MSO.DLL version 12.0.6520.5000 or greater.

 Rob has made some comments lately about targetting CLR runtime
 versions. Generally I write my custom actions to target .NET 2.0 and set up
 the
 DTF CA's to run against CLR 2.0 or 4.0.

 Either way I still find myself having to make sure .NET 3.5SP1 and .NET 4.0
 are
 on my target machines.  For example VSTO AddIns using .NET 4.0 targetting
 Office
 2007 have to have both the 2.0 and 4.0 CLR loaded.  Yeah, seriously.

 BTW, there are lot's of articles on DTF over at my blog.



 - Original Message 
 From: Shaun Hayward shayw...@omnivex.com
 To: General discussion for Windows Installer XML toolset.
 wix-users@lists.sourceforge.net
 Sent: Fri, January 14, 2011 5:56:44 PM
 Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email
 found in
 subject

 Thanks, Chris!

 Funny it should be you that replies. I'm looking at deploying a VSTO add-in
 and
 I've read the related articles on your blog. The custom action is to check
 for
 the presence of KB976477. I think I've FINALLY found a fool-proof

Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript

2011-01-18 Thread Shaun Hayward
Thanks, Rob - that's exactly what I was after.

In all my Googling, I was looking for a way to retrieve the version number and 
then do my own comparison (with no luck). This is a slightly different way but 
acheives my exact aim.

Many thanks
- Shaun


From: Rob Mensching [r...@robmensching.com]
Sent: Monday, January 17, 2011 7:54 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfound in 
subject - Email found in subject - Email found in subject - Email found in 
subject

The WiX Documentation for FileSearch element has a link to this page:
http://wix.sourceforge.net/manual-wix3/check_the_version_number.htm.

On Mon, Jan 17, 2011 at 7:44 AM, Shaun Hayward shayw...@omnivex.com wrote:

  WiX doesn't do it, the Windows Installer does. WiX is just the language.

 True :-)

 So let me rephrase: I didn't realize that MSI had a way to retrieve the
 DLL's version and compare against it. But since it does, the awesome WiX
 will support it. Does anyone have a WiX sample of how to accomplish this?

 Thanks!
 - Shaun


 Shaun Hayward | Senior Software Developer | Omnivex | 905.761.6640 ext 429
 | www.omnivex.com

 -Original Message-
 From: Rob Mensching [mailto:r...@robmensching.com]
 Sent: Friday, January 14, 2011 11:12 PM
 To: General discussion for Windows Installer XML toolset.
 Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript -
 Emailfound in subject - Email found in subject - Email found in subject

 WiX doesn't do it, the Windows Installer does. WiX is just the language.
 smile/

 Check out the FileSearch element.

 On Fri, Jan 14, 2011 at 6:17 PM, Shaun Hayward shayw...@omnivex.com
 wrote:

  I didn't realize WiX had a way to actually retrieve a DLL's version and
  compare against it. I was looking all over for that.
 
  Any chance you have a code sample up on your blog?
 
  And I'll be sure to check out the DTF articles on your blog.
 
  Thanks
  - Shaun
 
  
  From: Christopher Painter [chr...@deploymentengineering.com]
  Sent: Friday, January 14, 2011 7:16 PM
  To: General discussion for Windows Installer XML toolset.
  Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript -
  Emailfound in subject - Email found in subject
 
  Funny you say that,  I was doing some work with KB976477 just today.
 Some
  much
  that I have that KB memorized.
 
  I don't use a CA to detect this hotfix.  I just  use the
  AppSearch/DrLocator/Signature tables to search
  [CommonFilesFolder]\Microsoft
  Shared\Office12 for MSO.DLL version 12.0.6520.5000 or greater.
 
  Rob has made some comments lately about targetting CLR runtime
  versions. Generally I write my custom actions to target .NET 2.0 and set
 up
  the
  DTF CA's to run against CLR 2.0 or 4.0.
 
  Either way I still find myself having to make sure .NET 3.5SP1 and .NET
 4.0
  are
  on my target machines.  For example VSTO AddIns using .NET 4.0 targetting
  Office
  2007 have to have both the 2.0 and 4.0 CLR loaded.  Yeah, seriously.
 
  BTW, there are lot's of articles on DTF over at my blog.
 
 
 
  - Original Message 
  From: Shaun Hayward shayw...@omnivex.com
  To: General discussion for Windows Installer XML toolset.
  wix-users@lists.sourceforge.net
  Sent: Fri, January 14, 2011 5:56:44 PM
  Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email
  found in
  subject
 
  Thanks, Chris!
 
  Funny it should be you that replies. I'm looking at deploying a VSTO
 add-in
  and
  I've read the related articles on your blog. The custom action is to
 check
  for
  the presence of KB976477. I think I've FINALLY found a fool-proof (yeah,
  right)
  way to determine if it (or a newer patch that includes 976477) is
 present.
  (It's
  FOSS, so anyone who is interested can have the code)
 
  So it sounds like C# is just fine. YAY! The DTF classes look REALLY sweet
  in
  comparison to what I'm dealing with in C++ - I just didn't know if I
 should
  feel
  free to use them at this point.
 
  Should the add-in be targeting a specific version of the framework? My
  add-in
  requires .NET Framework 4, and .NET 4 does not necessarily seems to
 include
  full
  compatibility with .NET 2 (so saith the QAs where I work).
 
  Good-bye, C++ Custom Action - hello, C# Custom Action.
 
  Thanks again - you made my week.
  - Shaun
 
  PS: No flack on using InstallScript. Whatever works at the end of the day
  and
  makes your life easy, right?
 
 
 
 
 
 
  -Original Message-
  From: Christopher Painter [mailto:chr...@deploymentengineering.com]
  Sent: Friday, January 14, 2011 6:32 PM
  To: General discussion for Windows Installer XML toolset.
  Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email
  found in
  subject
 
 
   VB/JScript is still a no go.  The managed blog was ( thankfully ) O.B.E.
  when
  WiX released managed custom action via DTF

Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfound in subject - Email found in subject - Email found in subject

2011-01-18 Thread Christopher Painter
Perhaps SourceForge is swallowing my messages again but here are links and 
notes 
I sent you yesterday.  
 

- Original Message 
From: Christopher Painter chr...@deploymentengineering.com
To: General discussion for Windows Installer XML toolset. 
wix-users@lists.sourceforge.net
Sent: Mon, January 17, 2011 11:00:52 AM
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfound in 
subject - Email found in subject - Email found in subject

Take a look at

http://wix.sourceforge.net/manual-wix3/wix_xsd_filesearch.htm

http://wix.sourceforge.net/manual-wix3/check_the_version_number.htm

Pay careful attention to:

Important: When doing a locale-neutral search for a file, you must set the 
MinVersion property to one revision number lower than the actual version you 
want to search for. In this example, while we want to find file version 
6.0.6001.1751, the MinVersion is set to 6.0.6001.1750. This is because of a 
quirk in how the Windows Installer matches file versions. More information is 
available in the Windows Installer documentation.
 
 

 
Christopher Painter, Author of Deployment Engineering Blog
Have a hot tip, know a secret or read a really good thread that deserves 
attention? E-Mail Me



- Original Message 
From: Shaun Hayward shayw...@omnivex.com
To: General discussion for Windows Installer XML toolset. 
wix-users@lists.sourceforge.net
Sent: Mon, January 17, 2011 9:44:53 AM
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfound in 
subject - Email found in subject - Email found in subject

 WiX doesn't do it, the Windows Installer does. WiX is just the language.

True :-)

So let me rephrase: I didn't realize that MSI had a way to retrieve the DLL's 
version and compare against it. But since it does, the awesome WiX will support 
it. Does anyone have a WiX sample of how to accomplish this?

Thanks!
- Shaun


Shaun Hayward | Senior Software Developer | Omnivex | 905.761.6640 ext 429 | 
www.omnivex.com

-Original Message-
From: Rob Mensching [mailto:r...@robmensching.com] 
Sent: Friday, January 14, 2011 11:12 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfound in 
subject - Email found in subject - Email found in subject

WiX doesn't do it, the Windows Installer does. WiX is just the language.
smile/

Check out the FileSearch element.

On Fri, Jan 14, 2011 at 6:17 PM, Shaun Hayward shayw...@omnivex.com wrote:

 I didn't realize WiX had a way to actually retrieve a DLL's version and
 compare against it. I was looking all over for that.

 Any chance you have a code sample up on your blog?

 And I'll be sure to check out the DTF articles on your blog.

 Thanks
 - Shaun

 
 From: Christopher Painter [chr...@deploymentengineering.com]
 Sent: Friday, January 14, 2011 7:16 PM
 To: General discussion for Windows Installer XML toolset.
 Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript -
 Emailfound in subject - Email found in subject

 Funny you say that,  I was doing some work with KB976477 just today.  Some
 much
 that I have that KB memorized.

 I don't use a CA to detect this hotfix.  I just  use the
 AppSearch/DrLocator/Signature tables to search
 [CommonFilesFolder]\Microsoft
 Shared\Office12 for MSO.DLL version 12.0.6520.5000 or greater.

 Rob has made some comments lately about targetting CLR runtime
 versions. Generally I write my custom actions to target .NET 2.0 and set up
 the
 DTF CA's to run against CLR 2.0 or 4.0.

 Either way I still find myself having to make sure .NET 3.5SP1 and .NET 4.0
 are
 on my target machines.  For example VSTO AddIns using .NET 4.0 targetting
 Office
 2007 have to have both the 2.0 and 4.0 CLR loaded.  Yeah, seriously.

 BTW, there are lot's of articles on DTF over at my blog.



 - Original Message 
 From: Shaun Hayward shayw...@omnivex.com
 To: General discussion for Windows Installer XML toolset.
 wix-users@lists.sourceforge.net
 Sent: Fri, January 14, 2011 5:56:44 PM
 Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email
 found in
 subject

 Thanks, Chris!

 Funny it should be you that replies. I'm looking at deploying a VSTO add-in
 and
 I've read the related articles on your blog. The custom action is to check
 for
 the presence of KB976477. I think I've FINALLY found a fool-proof (yeah,
 right)
 way to determine if it (or a newer patch that includes 976477) is present.
 (It's
 FOSS, so anyone who is interested can have the code)

 So it sounds like C# is just fine. YAY! The DTF classes look REALLY sweet
 in
 comparison to what I'm dealing with in C++ - I just didn't know if I should
 feel
 free to use them at this point.

 Should the add-in be targeting a specific version of the framework? My
 add-in
 requires .NET Framework 4, and .NET 4 does not necessarily seems to include
 full
 compatibility with .NET 2 (so saith the QAs where I

Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfound in subject - Email found in subject - Email found in subject

2011-01-17 Thread Shaun Hayward
 WiX doesn't do it, the Windows Installer does. WiX is just the language.

True :-)

So let me rephrase: I didn't realize that MSI had a way to retrieve the DLL's 
version and compare against it. But since it does, the awesome WiX will support 
it. Does anyone have a WiX sample of how to accomplish this?

Thanks!
- Shaun


Shaun Hayward | Senior Software Developer | Omnivex | 905.761.6640 ext 429 | 
www.omnivex.com

-Original Message-
From: Rob Mensching [mailto:r...@robmensching.com] 
Sent: Friday, January 14, 2011 11:12 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfound in 
subject - Email found in subject - Email found in subject

WiX doesn't do it, the Windows Installer does. WiX is just the language.
smile/

Check out the FileSearch element.

On Fri, Jan 14, 2011 at 6:17 PM, Shaun Hayward shayw...@omnivex.com wrote:

 I didn't realize WiX had a way to actually retrieve a DLL's version and
 compare against it. I was looking all over for that.

 Any chance you have a code sample up on your blog?

 And I'll be sure to check out the DTF articles on your blog.

 Thanks
 - Shaun

 
 From: Christopher Painter [chr...@deploymentengineering.com]
 Sent: Friday, January 14, 2011 7:16 PM
 To: General discussion for Windows Installer XML toolset.
 Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript -
 Emailfound in subject - Email found in subject

 Funny you say that,  I was doing some work with KB976477 just today.   Some
 much
 that I have that KB memorized.

 I don't use a CA to detect this hotfix.  I just  use the
 AppSearch/DrLocator/Signature tables to search
 [CommonFilesFolder]\Microsoft
 Shared\Office12 for MSO.DLL version 12.0.6520.5000 or greater.

 Rob has made some comments lately about targetting CLR runtime
 versions. Generally I write my custom actions to target .NET 2.0 and set up
 the
 DTF CA's to run against CLR 2.0 or 4.0.

 Either way I still find myself having to make sure .NET 3.5SP1 and .NET 4.0
 are
 on my target machines.  For example VSTO AddIns using .NET 4.0 targetting
 Office
 2007 have to have both the 2.0 and 4.0 CLR loaded.  Yeah, seriously.

 BTW, there are lot's of articles on DTF over at my blog.



 - Original Message 
 From: Shaun Hayward shayw...@omnivex.com
 To: General discussion for Windows Installer XML toolset.
 wix-users@lists.sourceforge.net
 Sent: Fri, January 14, 2011 5:56:44 PM
 Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email
 found in
 subject

 Thanks, Chris!

 Funny it should be you that replies. I'm looking at deploying a VSTO add-in
 and
 I've read the related articles on your blog. The custom action is to check
 for
 the presence of KB976477. I think I've FINALLY found a fool-proof (yeah,
 right)
 way to determine if it (or a newer patch that includes 976477) is present.
 (It's
 FOSS, so anyone who is interested can have the code)

 So it sounds like C# is just fine. YAY! The DTF classes look REALLY sweet
 in
 comparison to what I'm dealing with in C++ - I just didn't know if I should
 feel
 free to use them at this point.

 Should the add-in be targeting a specific version of the framework? My
 add-in
 requires .NET Framework 4, and .NET 4 does not necessarily seems to include
 full
 compatibility with .NET 2 (so saith the QAs where I work).

 Good-bye, C++ Custom Action - hello, C# Custom Action.

 Thanks again - you made my week.
 - Shaun

 PS: No flack on using InstallScript. Whatever works at the end of the day
 and
 makes your life easy, right?






 -Original Message-
 From: Christopher Painter [mailto:chr...@deploymentengineering.com]
 Sent: Friday, January 14, 2011 6:32 PM
 To: General discussion for Windows Installer XML toolset.
 Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email
 found in
 subject


  VB/JScript is still a no go.  The managed blog was ( thankfully ) O.B.E.
 when
 WiX released managed custom action via DTF.

 Personally, if I had the C++ chops, had enough reusable libraries and was
 typically shipping unmanaged apps then I probably would be an unmanaged
 purist for CA's.   WiX uses C++ in it's custom actions because customers
 might
 not need/want .NET and since the CA's are being used by a very wide
 audience
 it's good to spend the time and make them perfect.

 But alas, I've got C# chops, the base class libraries are very powerful and
 I
 ship nearly all managed apps.


 For me, the choice is easy.  For the rare occasion that I don't want a
 dependency on .NET I either  a) role an InstallScript custom action or b)
  write

 it in DTF first and then borrow a resource from development to port it over
 to
 C++.

 PS-  Don't anyone jump on my InstallScript comment unless you know what you
 are
 talking about. :-)   Prior is IS 12 I'd agree with you 100%.

 Christopher Painter, Author of Deployment Engineering Blog
 Have

Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfound in subject - Email found in subject - Email found in subject

2011-01-17 Thread Rob Mensching
The WiX Documentation for FileSearch element has a link to this page:
http://wix.sourceforge.net/manual-wix3/check_the_version_number.htm.

On Mon, Jan 17, 2011 at 7:44 AM, Shaun Hayward shayw...@omnivex.com wrote:

  WiX doesn't do it, the Windows Installer does. WiX is just the language.

 True :-)

 So let me rephrase: I didn't realize that MSI had a way to retrieve the
 DLL's version and compare against it. But since it does, the awesome WiX
 will support it. Does anyone have a WiX sample of how to accomplish this?

 Thanks!
 - Shaun


 Shaun Hayward | Senior Software Developer | Omnivex | 905.761.6640 ext 429
 | www.omnivex.com

 -Original Message-
 From: Rob Mensching [mailto:r...@robmensching.com]
 Sent: Friday, January 14, 2011 11:12 PM
 To: General discussion for Windows Installer XML toolset.
 Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript -
 Emailfound in subject - Email found in subject - Email found in subject

 WiX doesn't do it, the Windows Installer does. WiX is just the language.
 smile/

 Check out the FileSearch element.

 On Fri, Jan 14, 2011 at 6:17 PM, Shaun Hayward shayw...@omnivex.com
 wrote:

  I didn't realize WiX had a way to actually retrieve a DLL's version and
  compare against it. I was looking all over for that.
 
  Any chance you have a code sample up on your blog?
 
  And I'll be sure to check out the DTF articles on your blog.
 
  Thanks
  - Shaun
 
  
  From: Christopher Painter [chr...@deploymentengineering.com]
  Sent: Friday, January 14, 2011 7:16 PM
  To: General discussion for Windows Installer XML toolset.
  Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript -
  Emailfound in subject - Email found in subject
 
  Funny you say that,  I was doing some work with KB976477 just today.
 Some
  much
  that I have that KB memorized.
 
  I don't use a CA to detect this hotfix.  I just  use the
  AppSearch/DrLocator/Signature tables to search
  [CommonFilesFolder]\Microsoft
  Shared\Office12 for MSO.DLL version 12.0.6520.5000 or greater.
 
  Rob has made some comments lately about targetting CLR runtime
  versions. Generally I write my custom actions to target .NET 2.0 and set
 up
  the
  DTF CA's to run against CLR 2.0 or 4.0.
 
  Either way I still find myself having to make sure .NET 3.5SP1 and .NET
 4.0
  are
  on my target machines.  For example VSTO AddIns using .NET 4.0 targetting
  Office
  2007 have to have both the 2.0 and 4.0 CLR loaded.  Yeah, seriously.
 
  BTW, there are lot's of articles on DTF over at my blog.
 
 
 
  - Original Message 
  From: Shaun Hayward shayw...@omnivex.com
  To: General discussion for Windows Installer XML toolset.
  wix-users@lists.sourceforge.net
  Sent: Fri, January 14, 2011 5:56:44 PM
  Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email
  found in
  subject
 
  Thanks, Chris!
 
  Funny it should be you that replies. I'm looking at deploying a VSTO
 add-in
  and
  I've read the related articles on your blog. The custom action is to
 check
  for
  the presence of KB976477. I think I've FINALLY found a fool-proof (yeah,
  right)
  way to determine if it (or a newer patch that includes 976477) is
 present.
  (It's
  FOSS, so anyone who is interested can have the code)
 
  So it sounds like C# is just fine. YAY! The DTF classes look REALLY sweet
  in
  comparison to what I'm dealing with in C++ - I just didn't know if I
 should
  feel
  free to use them at this point.
 
  Should the add-in be targeting a specific version of the framework? My
  add-in
  requires .NET Framework 4, and .NET 4 does not necessarily seems to
 include
  full
  compatibility with .NET 2 (so saith the QAs where I work).
 
  Good-bye, C++ Custom Action - hello, C# Custom Action.
 
  Thanks again - you made my week.
  - Shaun
 
  PS: No flack on using InstallScript. Whatever works at the end of the day
  and
  makes your life easy, right?
 
 
 
 
 
 
  -Original Message-
  From: Christopher Painter [mailto:chr...@deploymentengineering.com]
  Sent: Friday, January 14, 2011 6:32 PM
  To: General discussion for Windows Installer XML toolset.
  Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email
  found in
  subject
 
 
   VB/JScript is still a no go.  The managed blog was ( thankfully ) O.B.E.
  when
  WiX released managed custom action via DTF.
 
  Personally, if I had the C++ chops, had enough reusable libraries and was
  typically shipping unmanaged apps then I probably would be an
 unmanaged
  purist for CA's.   WiX uses C++ in it's custom actions because customers
  might
  not need/want .NET and since the CA's are being used by a very wide
  audience
  it's good to spend the time and make them perfect.
 
  But alas, I've got C# chops, the base class libraries are very powerful
 and
  I
  ship nearly all managed apps.
 
 
  For me, the choice is easy.  For the rare occasion that I don't want a
  dependency on .NET I either

[WiX-users] Custom Actions - C++ vs C# vs VBScript

2011-01-14 Thread Shaun Hayward
Hello, WiX Community

I've been playing around with WiX for about a year now and took over my 
company's installations (WiX-based) a few months ago. I'm really enjoying it.

I'm looking for some advice on the pros/cons of various ways of writing Custom 
Actions. I understand that an issue with the Custom Action can prevent your 
installer from working at all. And obviously if a piece of functionality 
already exists in WiX then one should not re-write it in a custom action.

I'm mainly a C# dev and doing some rudimentary VC++.

I found it very easy to do Custom Actions in VBScript but Rob Mensching posted 
an article (http://wix.sourceforge.net/manual-wix2/robmen_20040520.htm) that 
outlines why VBScript sucks for custom actions. Lack of debugging and 
conflict with Virus Scanners seem to be the biggies. I'm assuming these reasons 
still apply and VBScript (or Jscript) should be counted out.

Most of the Custom Action examples I've found have been C# (my preferred 
language) and even Nick Ramirez's excellent book on WiX only gives the C# 
examples. However, I came across another Rob Mensching article 
(http://robmensching.com/blog/posts/2007/4/19/Managed-Code-CustomActions-no-support-on-the-way-and-heres)
 from 2007 that outlines why Managed Custom Actions wouldn't work. Are these 
issues still a consideration?

Of course, VC++ has very few dependencies and probably has the most 
compatibility. Theoretically, you should be able to static link against the 
VC++ Runtime and have no external dependencies at all. But C++ code is, for me, 
a lot harder to write. The worst is trying to figure out which string is which.

Does anyone have any incites or advice on the pros and cons of each? In 
particular, what are the down-sides of writing custom actions in Managed code 
(C#/VB)?

Thanks
- Shaun



The information in this e-mail is intended solely for the addressee and access 
by anyone else is unauthorized.  Omnivex accepts no liability for the content 
of this e-mail, or for the consequences of any actions taken on the basis of 
the information provided. Any views or opinions presented in this e-mail are 
solely those of the author and do not necessarily represent those of the 
company.   Omnivex makes no warranties, express or implied and is not 
responsible for errors or omissions.

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript

2011-01-14 Thread Christopher Painter

 VB/JScript is still a no go.  The managed blog was ( thankfully ) O.B.E. when 
WiX released managed custom action via DTF.

Personally, if I had the C++ chops, had enough reusable libraries and was 
typically shipping unmanaged apps then I probably would be an unmanaged 
purist for CA's.   WiX uses C++ in it's custom actions because customers might 
not need/want .NET and since the CA's are being used by a very wide audience 
it's good to spend the time and make them perfect.

But alas, I've got C# chops, the base class libraries are very powerful and I 
ship nearly all managed apps.  


For me, the choice is easy.  For the rare occasion that I don't want a 
dependency on .NET I either  a) role an InstallScript custom action or b)  
write 
it in DTF first and then borrow a resource from development to port it over to 
C++.

PS-  Don't anyone jump on my InstallScript comment unless you know what you are 
talking about. :-)   Prior is IS 12 I'd agree with you 100%.

Christopher Painter, Author of Deployment Engineering Blog
Have a hot tip, know a secret or read a really good thread that deserves 
attention? E-Mail Me



- Original Message 
From: Shaun Hayward shayw...@omnivex.com
To: WiX-users@lists.sourceforge.net WiX-users@lists.sourceforge.net
Sent: Fri, January 14, 2011 12:39:11 PM
Subject: [WiX-users] Custom Actions - C++ vs C# vs VBScript

Hello, WiX Community

I've been playing around with WiX for about a year now and took over my 
company's installations (WiX-based) a few months ago. I'm really enjoying it.

I'm looking for some advice on the pros/cons of various ways of writing Custom 
Actions. I understand that an issue with the Custom Action can prevent your 
installer from working at all. And obviously if a piece of functionality 
already 
exists in WiX then one should not re-write it in a custom action.

I'm mainly a C# dev and doing some rudimentary VC++.

I found it very easy to do Custom Actions in VBScript but Rob Mensching posted 
an article (http://wix.sourceforge.net/manual-wix2/robmen_20040520.htm) that 
outlines why VBScript sucks for custom actions. Lack of debugging and 
conflict 
with Virus Scanners seem to be the biggies. I'm assuming these reasons still 
apply and VBScript (or Jscript) should be counted out.

Most of the Custom Action examples I've found have been C# (my preferred 
language) and even Nick Ramirez's excellent book on WiX only gives the C# 
examples. However, I came across another Rob Mensching article 
(http://robmensching.com/blog/posts/2007/4/19/Managed-Code-CustomActions-no-support-on-the-way-and-heres)
 from 2007 that outlines why Managed Custom Actions wouldn't work. Are these 
issues still a consideration?

Of course, VC++ has very few dependencies and probably has the most 
compatibility. Theoretically, you should be able to static link against the 
VC++ 
Runtime and have no external dependencies at all. But C++ code is, for me, a 
lot 
harder to write. The worst is trying to figure out which string is which.

Does anyone have any incites or advice on the pros and cons of each? In 
particular, what are the down-sides of writing custom actions in Managed code 
(C#/VB)?

Thanks
- Shaun



The information in this e-mail is intended solely for the addressee and access 
by anyone else is unauthorized.  Omnivex accepts no liability for the content 
of 
this e-mail, or for the consequences of any actions taken on the basis of the 
information provided. Any views or opinions presented in this e-mail are solely 
those of the author and do not necessarily represent those of the company.  
Omnivex makes no warranties, express or implied and is not responsible for 
errors or omissions.

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



  

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email found in subject

2011-01-14 Thread Shaun Hayward
Thanks, Chris!

Funny it should be you that replies. I'm looking at deploying a VSTO add-in and 
I've read the related articles on your blog. The custom action is to check for 
the presence of KB976477. I think I've FINALLY found a fool-proof (yeah, right) 
way to determine if it (or a newer patch that includes 976477) is present. 
(It's FOSS, so anyone who is interested can have the code)

So it sounds like C# is just fine. YAY! The DTF classes look REALLY sweet in 
comparison to what I'm dealing with in C++ - I just didn't know if I should 
feel free to use them at this point.

Should the add-in be targeting a specific version of the framework? My add-in 
requires .NET Framework 4, and .NET 4 does not necessarily seems to include 
full compatibility with .NET 2 (so saith the QAs where I work).

Good-bye, C++ Custom Action - hello, C# Custom Action.

Thanks again - you made my week.
- Shaun

PS: No flack on using InstallScript. Whatever works at the end of the day and 
makes your life easy, right?






-Original Message-
From: Christopher Painter [mailto:chr...@deploymentengineering.com] 
Sent: Friday, January 14, 2011 6:32 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email found 
in subject


 VB/JScript is still a no go.  The managed blog was ( thankfully ) O.B.E. when 
WiX released managed custom action via DTF.

Personally, if I had the C++ chops, had enough reusable libraries and was 
typically shipping unmanaged apps then I probably would be an unmanaged 
purist for CA's.   WiX uses C++ in it's custom actions because customers might 
not need/want .NET and since the CA's are being used by a very wide audience 
it's good to spend the time and make them perfect.

But alas, I've got C# chops, the base class libraries are very powerful and I 
ship nearly all managed apps.  


For me, the choice is easy.  For the rare occasion that I don't want a 
dependency on .NET I either  a) role an InstallScript custom action or b)  
write 
it in DTF first and then borrow a resource from development to port it over to 
C++.

PS-  Don't anyone jump on my InstallScript comment unless you know what you are 
talking about. :-)   Prior is IS 12 I'd agree with you 100%.

Christopher Painter, Author of Deployment Engineering Blog
Have a hot tip, know a secret or read a really good thread that deserves 
attention? E-Mail Me



- Original Message 
From: Shaun Hayward shayw...@omnivex.com
To: WiX-users@lists.sourceforge.net WiX-users@lists.sourceforge.net
Sent: Fri, January 14, 2011 12:39:11 PM
Subject: [WiX-users] Custom Actions - C++ vs C# vs VBScript

Hello, WiX Community

I've been playing around with WiX for about a year now and took over my 
company's installations (WiX-based) a few months ago. I'm really enjoying it.

I'm looking for some advice on the pros/cons of various ways of writing Custom 
Actions. I understand that an issue with the Custom Action can prevent your 
installer from working at all. And obviously if a piece of functionality 
already 
exists in WiX then one should not re-write it in a custom action.

I'm mainly a C# dev and doing some rudimentary VC++.

I found it very easy to do Custom Actions in VBScript but Rob Mensching posted 
an article (http://wix.sourceforge.net/manual-wix2/robmen_20040520.htm) that 
outlines why VBScript sucks for custom actions. Lack of debugging and 
conflict 
with Virus Scanners seem to be the biggies. I'm assuming these reasons still 
apply and VBScript (or Jscript) should be counted out.

Most of the Custom Action examples I've found have been C# (my preferred 
language) and even Nick Ramirez's excellent book on WiX only gives the C# 
examples. However, I came across another Rob Mensching article 
(http://robmensching.com/blog/posts/2007/4/19/Managed-Code-CustomActions-no-support-on-the-way-and-heres)
 from 2007 that outlines why Managed Custom Actions wouldn't work. Are these 
issues still a consideration?

Of course, VC++ has very few dependencies and probably has the most 
compatibility. Theoretically, you should be able to static link against the 
VC++ 
Runtime and have no external dependencies at all. But C++ code is, for me, a 
lot 
harder to write. The worst is trying to figure out which string is which.

Does anyone have any incites or advice on the pros and cons of each? In 
particular, what are the down-sides of writing custom actions in Managed code 
(C#/VB)?

Thanks
- Shaun



The information in this e-mail is intended solely for the addressee and access 
by anyone else is unauthorized.  Omnivex accepts no liability for the content 
of 
this e-mail, or for the consequences of any actions taken on the basis of the 
information provided. Any views or opinions presented in this e-mail are solely 
those of the author and do not necessarily represent those of the company.  
Omnivex makes no warranties, express or implied and is not responsible for 
errors

Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email found in subject

2011-01-14 Thread Christopher Painter
Funny you say that,  I was doing some work with KB976477 just today.   Some 
much 
that I have that KB memorized.

I don't use a CA to detect this hotfix.  I just  use the 
AppSearch/DrLocator/Signature tables to search [CommonFilesFolder]\Microsoft 
Shared\Office12 for MSO.DLL version 12.0.6520.5000 or greater. 
 
Rob has made some comments lately about targetting CLR runtime 
versions. Generally I write my custom actions to target .NET 2.0 and set up the 
DTF CA's to run against CLR 2.0 or 4.0.

Either way I still find myself having to make sure .NET 3.5SP1 and .NET 4.0 are 
on my target machines.  For example VSTO AddIns using .NET 4.0 targetting 
Office 
2007 have to have both the 2.0 and 4.0 CLR loaded.  Yeah, seriously.

BTW, there are lot's of articles on DTF over at my blog.



- Original Message 
From: Shaun Hayward shayw...@omnivex.com
To: General discussion for Windows Installer XML toolset. 
wix-users@lists.sourceforge.net
Sent: Fri, January 14, 2011 5:56:44 PM
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email found 
in 
subject

Thanks, Chris!

Funny it should be you that replies. I'm looking at deploying a VSTO add-in and 
I've read the related articles on your blog. The custom action is to check for 
the presence of KB976477. I think I've FINALLY found a fool-proof (yeah, right) 
way to determine if it (or a newer patch that includes 976477) is present. 
(It's 
FOSS, so anyone who is interested can have the code)

So it sounds like C# is just fine. YAY! The DTF classes look REALLY sweet in 
comparison to what I'm dealing with in C++ - I just didn't know if I should 
feel 
free to use them at this point.

Should the add-in be targeting a specific version of the framework? My add-in 
requires .NET Framework 4, and .NET 4 does not necessarily seems to include 
full 
compatibility with .NET 2 (so saith the QAs where I work).

Good-bye, C++ Custom Action - hello, C# Custom Action.

Thanks again - you made my week.
- Shaun

PS: No flack on using InstallScript. Whatever works at the end of the day and 
makes your life easy, right?






-Original Message-
From: Christopher Painter [mailto:chr...@deploymentengineering.com] 
Sent: Friday, January 14, 2011 6:32 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email found 
in 
subject


 VB/JScript is still a no go.  The managed blog was ( thankfully ) O.B.E. when 
WiX released managed custom action via DTF.

Personally, if I had the C++ chops, had enough reusable libraries and was 
typically shipping unmanaged apps then I probably would be an unmanaged 
purist for CA's.   WiX uses C++ in it's custom actions because customers might 
not need/want .NET and since the CA's are being used by a very wide audience 
it's good to spend the time and make them perfect.

But alas, I've got C# chops, the base class libraries are very powerful and I 
ship nearly all managed apps.  


For me, the choice is easy.  For the rare occasion that I don't want a 
dependency on .NET I either  a) role an InstallScript custom action or b)  
write 

it in DTF first and then borrow a resource from development to port it over to 
C++.

PS-  Don't anyone jump on my InstallScript comment unless you know what you are 
talking about. :-)   Prior is IS 12 I'd agree with you 100%.

Christopher Painter, Author of Deployment Engineering Blog
Have a hot tip, know a secret or read a really good thread that deserves 
attention? E-Mail Me



- Original Message 
From: Shaun Hayward shayw...@omnivex.com
To: WiX-users@lists.sourceforge.net WiX-users@lists.sourceforge.net
Sent: Fri, January 14, 2011 12:39:11 PM
Subject: [WiX-users] Custom Actions - C++ vs C# vs VBScript

Hello, WiX Community

I've been playing around with WiX for about a year now and took over my 
company's installations (WiX-based) a few months ago. I'm really enjoying it.

I'm looking for some advice on the pros/cons of various ways of writing Custom 
Actions. I understand that an issue with the Custom Action can prevent your 
installer from working at all. And obviously if a piece of functionality 
already 

exists in WiX then one should not re-write it in a custom action.

I'm mainly a C# dev and doing some rudimentary VC++.

I found it very easy to do Custom Actions in VBScript but Rob Mensching posted 
an article (http://wix.sourceforge.net/manual-wix2/robmen_20040520.htm) that 
outlines why VBScript sucks for custom actions. Lack of debugging and 
conflict 

with Virus Scanners seem to be the biggies. I'm assuming these reasons still 
apply and VBScript (or Jscript) should be counted out.

Most of the Custom Action examples I've found have been C# (my preferred 
language) and even Nick Ramirez's excellent book on WiX only gives the C# 
examples. However, I came across another Rob Mensching article 
(http://robmensching.com/blog/posts/2007/4/19/Managed-Code-CustomActions-no-support-on-the-way

Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfound in subject - Email found in subject

2011-01-14 Thread Shaun Hayward
I didn't realize WiX had a way to actually retrieve a DLL's version and compare 
against it. I was looking all over for that.

Any chance you have a code sample up on your blog?

And I'll be sure to check out the DTF articles on your blog.

Thanks
- Shaun


From: Christopher Painter [chr...@deploymentengineering.com]
Sent: Friday, January 14, 2011 7:16 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfound in 
subject - Email found in subject

Funny you say that,  I was doing some work with KB976477 just today.   Some much
that I have that KB memorized.

I don't use a CA to detect this hotfix.  I just  use the
AppSearch/DrLocator/Signature tables to search [CommonFilesFolder]\Microsoft
Shared\Office12 for MSO.DLL version 12.0.6520.5000 or greater.

Rob has made some comments lately about targetting CLR runtime
versions. Generally I write my custom actions to target .NET 2.0 and set up the
DTF CA's to run against CLR 2.0 or 4.0.

Either way I still find myself having to make sure .NET 3.5SP1 and .NET 4.0 are
on my target machines.  For example VSTO AddIns using .NET 4.0 targetting Office
2007 have to have both the 2.0 and 4.0 CLR loaded.  Yeah, seriously.

BTW, there are lot's of articles on DTF over at my blog.



- Original Message 
From: Shaun Hayward shayw...@omnivex.com
To: General discussion for Windows Installer XML toolset.
wix-users@lists.sourceforge.net
Sent: Fri, January 14, 2011 5:56:44 PM
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email found in
subject

Thanks, Chris!

Funny it should be you that replies. I'm looking at deploying a VSTO add-in and
I've read the related articles on your blog. The custom action is to check for
the presence of KB976477. I think I've FINALLY found a fool-proof (yeah, right)
way to determine if it (or a newer patch that includes 976477) is present. (It's
FOSS, so anyone who is interested can have the code)

So it sounds like C# is just fine. YAY! The DTF classes look REALLY sweet in
comparison to what I'm dealing with in C++ - I just didn't know if I should feel
free to use them at this point.

Should the add-in be targeting a specific version of the framework? My add-in
requires .NET Framework 4, and .NET 4 does not necessarily seems to include full
compatibility with .NET 2 (so saith the QAs where I work).

Good-bye, C++ Custom Action - hello, C# Custom Action.

Thanks again - you made my week.
- Shaun

PS: No flack on using InstallScript. Whatever works at the end of the day and
makes your life easy, right?






-Original Message-
From: Christopher Painter [mailto:chr...@deploymentengineering.com]
Sent: Friday, January 14, 2011 6:32 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email found in
subject


 VB/JScript is still a no go.  The managed blog was ( thankfully ) O.B.E. when
WiX released managed custom action via DTF.

Personally, if I had the C++ chops, had enough reusable libraries and was
typically shipping unmanaged apps then I probably would be an unmanaged
purist for CA's.   WiX uses C++ in it's custom actions because customers might
not need/want .NET and since the CA's are being used by a very wide audience
it's good to spend the time and make them perfect.

But alas, I've got C# chops, the base class libraries are very powerful and I
ship nearly all managed apps.


For me, the choice is easy.  For the rare occasion that I don't want a
dependency on .NET I either  a) role an InstallScript custom action or b)  write

it in DTF first and then borrow a resource from development to port it over to
C++.

PS-  Don't anyone jump on my InstallScript comment unless you know what you are
talking about. :-)   Prior is IS 12 I'd agree with you 100%.

Christopher Painter, Author of Deployment Engineering Blog
Have a hot tip, know a secret or read a really good thread that deserves
attention? E-Mail Me



- Original Message 
From: Shaun Hayward shayw...@omnivex.com
To: WiX-users@lists.sourceforge.net WiX-users@lists.sourceforge.net
Sent: Fri, January 14, 2011 12:39:11 PM
Subject: [WiX-users] Custom Actions - C++ vs C# vs VBScript

Hello, WiX Community

I've been playing around with WiX for about a year now and took over my
company's installations (WiX-based) a few months ago. I'm really enjoying it.

I'm looking for some advice on the pros/cons of various ways of writing Custom
Actions. I understand that an issue with the Custom Action can prevent your
installer from working at all. And obviously if a piece of functionality already

exists in WiX then one should not re-write it in a custom action.

I'm mainly a C# dev and doing some rudimentary VC++.

I found it very easy to do Custom Actions in VBScript but Rob Mensching posted
an article (http://wix.sourceforge.net/manual-wix2/robmen_20040520.htm

Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript

2011-01-14 Thread Rob Mensching
I'm a purist but I write my custom actions as declarative, data driven
beasties designed so I never have to solve that problem again. That attitude
is where the bulk of the WiX toolset custom actions come from. smile/

Simply put, custom actions will be the most vulnerable part of your install.
Avoid them. When you can't, respect the complexity and write them well, with
as few dependencies as possible.
On Fri, Jan 14, 2011 at 3:32 PM, Christopher Painter 
chr...@deploymentengineering.com wrote:


  VB/JScript is still a no go.  The managed blog was ( thankfully ) O.B.E.
 when
 WiX released managed custom action via DTF.

 Personally, if I had the C++ chops, had enough reusable libraries and was
 typically shipping unmanaged apps then I probably would be an unmanaged
 purist for CA's.   WiX uses C++ in it's custom actions because customers
 might
 not need/want .NET and since the CA's are being used by a very wide
 audience
 it's good to spend the time and make them perfect.

 But alas, I've got C# chops, the base class libraries are very powerful and
 I
 ship nearly all managed apps.


 For me, the choice is easy.  For the rare occasion that I don't want a
 dependency on .NET I either  a) role an InstallScript custom action or b)
 write
 it in DTF first and then borrow a resource from development to port it over
 to
 C++.

 PS-  Don't anyone jump on my InstallScript comment unless you know what you
 are
 talking about. :-)   Prior is IS 12 I'd agree with you 100%.

 Christopher Painter, Author of Deployment Engineering Blog
 Have a hot tip, know a secret or read a really good thread that deserves
 attention? E-Mail Me



 - Original Message 
 From: Shaun Hayward shayw...@omnivex.com
 To: WiX-users@lists.sourceforge.net WiX-users@lists.sourceforge.net
 Sent: Fri, January 14, 2011 12:39:11 PM
 Subject: [WiX-users] Custom Actions - C++ vs C# vs VBScript

 Hello, WiX Community

 I've been playing around with WiX for about a year now and took over my
 company's installations (WiX-based) a few months ago. I'm really enjoying
 it.

 I'm looking for some advice on the pros/cons of various ways of writing
 Custom
 Actions. I understand that an issue with the Custom Action can prevent your
 installer from working at all. And obviously if a piece of functionality
 already
 exists in WiX then one should not re-write it in a custom action.

 I'm mainly a C# dev and doing some rudimentary VC++.

 I found it very easy to do Custom Actions in VBScript but Rob Mensching
 posted
 an article (http://wix.sourceforge.net/manual-wix2/robmen_20040520.htm)
 that
 outlines why VBScript sucks for custom actions. Lack of debugging and
 conflict
 with Virus Scanners seem to be the biggies. I'm assuming these reasons
 still
 apply and VBScript (or Jscript) should be counted out.

 Most of the Custom Action examples I've found have been C# (my preferred
 language) and even Nick Ramirez's excellent book on WiX only gives the C#
 examples. However, I came across another Rob Mensching article
 (
 http://robmensching.com/blog/posts/2007/4/19/Managed-Code-CustomActions-no-support-on-the-way-and-heres
 )
  from 2007 that outlines why Managed Custom Actions wouldn't work. Are
 these
 issues still a consideration?

 Of course, VC++ has very few dependencies and probably has the most
 compatibility. Theoretically, you should be able to static link against the
 VC++
 Runtime and have no external dependencies at all. But C++ code is, for me,
 a lot
 harder to write. The worst is trying to figure out which string is which.

 Does anyone have any incites or advice on the pros and cons of each? In
 particular, what are the down-sides of writing custom actions in Managed
 code
 (C#/VB)?

 Thanks
 - Shaun



 The information in this e-mail is intended solely for the addressee and
 access
 by anyone else is unauthorized.  Omnivex accepts no liability for the
 content of
 this e-mail, or for the consequences of any actions taken on the basis of
 the
 information provided. Any views or opinions presented in this e-mail are
 solely
 those of the author and do not necessarily represent those of the company.
 Omnivex makes no warranties, express or implied and is not responsible for
 errors or omissions.


 --
 Protect Your Site and Customers from Malware Attacks
 Learn about various malware tactics and how to avoid them. Understand
 malware threats, the impact they can have on your business, and how you
 can protect your company and customers by using code signing.
 http://p.sf.net/sfu/oracle-sfdevnl
 ___
 WiX-users mailing list
 WiX-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wix-users






 --
 Protect Your Site and Customers from Malware Attacks
 Learn about various malware tactics and how to avoid them. Understand

Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Emailfound in subject - Email found in subject

2011-01-14 Thread Rob Mensching
WiX doesn't do it, the Windows Installer does. WiX is just the language.
smile/

Check out the FileSearch element.

On Fri, Jan 14, 2011 at 6:17 PM, Shaun Hayward shayw...@omnivex.com wrote:

 I didn't realize WiX had a way to actually retrieve a DLL's version and
 compare against it. I was looking all over for that.

 Any chance you have a code sample up on your blog?

 And I'll be sure to check out the DTF articles on your blog.

 Thanks
 - Shaun

 
 From: Christopher Painter [chr...@deploymentengineering.com]
 Sent: Friday, January 14, 2011 7:16 PM
 To: General discussion for Windows Installer XML toolset.
 Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript -
 Emailfound in subject - Email found in subject

 Funny you say that,  I was doing some work with KB976477 just today.   Some
 much
 that I have that KB memorized.

 I don't use a CA to detect this hotfix.  I just  use the
 AppSearch/DrLocator/Signature tables to search
 [CommonFilesFolder]\Microsoft
 Shared\Office12 for MSO.DLL version 12.0.6520.5000 or greater.

 Rob has made some comments lately about targetting CLR runtime
 versions. Generally I write my custom actions to target .NET 2.0 and set up
 the
 DTF CA's to run against CLR 2.0 or 4.0.

 Either way I still find myself having to make sure .NET 3.5SP1 and .NET 4.0
 are
 on my target machines.  For example VSTO AddIns using .NET 4.0 targetting
 Office
 2007 have to have both the 2.0 and 4.0 CLR loaded.  Yeah, seriously.

 BTW, there are lot's of articles on DTF over at my blog.



 - Original Message 
 From: Shaun Hayward shayw...@omnivex.com
 To: General discussion for Windows Installer XML toolset.
 wix-users@lists.sourceforge.net
 Sent: Fri, January 14, 2011 5:56:44 PM
 Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email
 found in
 subject

 Thanks, Chris!

 Funny it should be you that replies. I'm looking at deploying a VSTO add-in
 and
 I've read the related articles on your blog. The custom action is to check
 for
 the presence of KB976477. I think I've FINALLY found a fool-proof (yeah,
 right)
 way to determine if it (or a newer patch that includes 976477) is present.
 (It's
 FOSS, so anyone who is interested can have the code)

 So it sounds like C# is just fine. YAY! The DTF classes look REALLY sweet
 in
 comparison to what I'm dealing with in C++ - I just didn't know if I should
 feel
 free to use them at this point.

 Should the add-in be targeting a specific version of the framework? My
 add-in
 requires .NET Framework 4, and .NET 4 does not necessarily seems to include
 full
 compatibility with .NET 2 (so saith the QAs where I work).

 Good-bye, C++ Custom Action - hello, C# Custom Action.

 Thanks again - you made my week.
 - Shaun

 PS: No flack on using InstallScript. Whatever works at the end of the day
 and
 makes your life easy, right?






 -Original Message-
 From: Christopher Painter [mailto:chr...@deploymentengineering.com]
 Sent: Friday, January 14, 2011 6:32 PM
 To: General discussion for Windows Installer XML toolset.
 Subject: Re: [WiX-users] Custom Actions - C++ vs C# vs VBScript - Email
 found in
 subject


  VB/JScript is still a no go.  The managed blog was ( thankfully ) O.B.E.
 when
 WiX released managed custom action via DTF.

 Personally, if I had the C++ chops, had enough reusable libraries and was
 typically shipping unmanaged apps then I probably would be an unmanaged
 purist for CA's.   WiX uses C++ in it's custom actions because customers
 might
 not need/want .NET and since the CA's are being used by a very wide
 audience
 it's good to spend the time and make them perfect.

 But alas, I've got C# chops, the base class libraries are very powerful and
 I
 ship nearly all managed apps.


 For me, the choice is easy.  For the rare occasion that I don't want a
 dependency on .NET I either  a) role an InstallScript custom action or b)
  write

 it in DTF first and then borrow a resource from development to port it over
 to
 C++.

 PS-  Don't anyone jump on my InstallScript comment unless you know what you
 are
 talking about. :-)   Prior is IS 12 I'd agree with you 100%.

 Christopher Painter, Author of Deployment Engineering Blog
 Have a hot tip, know a secret or read a really good thread that deserves
 attention? E-Mail Me



 - Original Message 
 From: Shaun Hayward shayw...@omnivex.com
 To: WiX-users@lists.sourceforge.net WiX-users@lists.sourceforge.net
 Sent: Fri, January 14, 2011 12:39:11 PM
 Subject: [WiX-users] Custom Actions - C++ vs C# vs VBScript

 Hello, WiX Community

 I've been playing around with WiX for about a year now and took over my
 company's installations (WiX-based) a few months ago. I'm really enjoying
 it.

 I'm looking for some advice on the pros/cons of various ways of writing
 Custom
 Actions. I understand that an issue with the Custom Action can prevent your
 installer from working at all. And obviously if a piece