Re: [WiX-users] How do I add both a HKLM and a HKCU key to the registry? And THANKS!

2009-10-25 Thread Dave Kolb
Good to know for future reference as I have take Blair's good advice and no
longer fool with CA's to touch the registry or the event source and do those
with wix elements. My only custom action left decodes a des256 string to get
credentials for when I create the service and that works well. Install feels
much cleaner now with the HKCU registry, and CA's for event sources and the
registry stuff gone and I can live with having the user's digital detritus
left behind if someone uninstalls my app ;-)

There was this one caveat on the CustomAction win64 attribute --
Specifies that a script custom action targets a 64-bit platform. Valid only
when used with the Script, VBScriptCall, and JScriptCall attributes Do you
think it should work with a .NET assembly which has so far been pretty easy
to create and use. I'll try this sometime in the near future and report on
it.

Rob, Thanks for yours Blair's and everyone's help. You folks are very
generous with your time and knowledge for WIX! My installs/uninstalls are
running well now and so it is time to get back to getting my application and
2 services enhanced having taken time to convert from the VS2008 setup
projects to WIX which I am much happier with. Switching to WIX was worth is
alone just to get rid of the irritating weirdness in VS2008 where my 3 setup
projects kept expanding randomly in the solution folder as I opened up other
projects. And there is a lot more control in WIX and it's extendable. Thanks
to all!

I don't see much need for a VS2008 GUI wrapper around wix projects but would
love to see some more official VS2009 integration with Powershell and WIX
building or other tasks such as zipping up related files when wanting a
package for someone. For a full release build, I build three x64 and three
x86 msi files from a Powershell script I launch from a VS2008 project that I
modified from a C# project shell. Then I have another VS2008 project zip
those up with some other things such as .doc and .bat files to get my user
going. It works pretty well since I can have dependencies on the other
projects and with PS V2 I can catch/throw and have VS2008 stop building upon
problems.

- Dave

-Original Message-
From: Rob Mensching [mailto:r...@robmensching.com] 
Sent: Sunday, October 25, 2009 2:11 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How do I add both a HKLM and a HKCU key to the
registry?

If you mark your custom action as a 64-bit action it should run in a 64-bit
process. I haven't tried it with DTF since I write all my custom actions in
C/C++.

On Sat, Oct 24, 2009 at 7:37 PM, Dave Kolb
d...@dotnetcodeslingers.comwrote:

 Good information Blair and thanks. I did not know about the EventSource
 element but should have guesses there likely was one.

 I will rethink what I am doing with the registry given your guidelines.
 Especially since I just realized that my custom action, built for Any
 CPU,
 is running against the 32 bit hive and I have to drop into Win32 Interop
if
 I want to set registry redirection which I could but would rather not do.

 Not that I will necessarily pursue this same path, but for future
 reference,
 is there a way to force DTF to run a managed custom action written for
Any
 CPU to run in 64 bit mode besides compiling the assembly for x64?

 - Dave

 -Original Message-
 From: Blair [mailto:os...@live.com]
 Sent: Saturday, October 24, 2009 7:09 PM
 To: 'General discussion for Windows Installer XML toolset.'
 Subject: Re: [WiX-users] How do I add both a HKLM and a HKCU key to the
 registry?

 Back in the good-old-days we simply wrote in the registry until it looked
 like what this page describes:

 http://msdn.microsoft.com/en-us/library/aa363661(VS.85).aspx

 However, the Wix Util Extension does have an EventSource element that
seems
 to fit the billing. Does it not work for you?

 If you install per-user for three different users, each installation is
 independent from the others. Per-user installations should never install
 anything common unless they have some independent means of coordinating
 the use of the common areas. That is why the WiX implementation of the
 per-user/per-machine switch creates a program installation directory
inside
 of the user profile.

 Per-user data (such as windows coordinates, etc.) are considered user
data,
 not program data, and are typically left behind. Besides, if your
 per-machine program is used by three users, there is no safe way to
clean
 that data from any of the users not running the installation.

 Today's best practice says: the installation of per-machine programs
supply
 default configuration in HKLM and never touch HKCU. The program itself
 manages HKCU for each user's customizations to that configuration, and
that
 is then considered user data. You then migrate it during first launch of
 your application after you upgrade, and you orphan it when you uninstall.
 That way there is ZERO user-profile anything in your MSI

Re: [WiX-users] String concatenation/formatting.

2009-10-25 Thread Dave Kolb
What variable set does #FileId come from? I don't recognize the # syntax.

-Original Message-
From: Rob Mensching [mailto:r...@robmensching.com] 
Sent: Sunday, October 25, 2009 11:31 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] String concatenation/formatting.

Do something like:

Value=quot;[DirName]FileName.exequot;

or better:

Value=quot;[#FileId]quot;


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How do I add both a HKLM and a HKCU key to the registry?

2009-10-24 Thread Dave Kolb

Candle doesn't like Keypath on that element: error CNDL0004: The RegistryKey
element contains an unexpected attribute 'KeyPath'.


-Original Message-
From: Blair [mailto:os...@live.com] 
Sent: Saturday, October 24, 2009 1:22 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] How do I add both a HKLM and a HKCU key to the
registry?

Try adding KeyPath=yes to each of your two RegistryKey elements.

-Original Message-
From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Friday, October 23, 2009 6:34 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: [WiX-users] How do I add both a HKLM and a HKCU key to the
registry?

During install, I am trying to add both an HKLM key and an HKCU key for my
product. My wxs looks like the below. When this compiles I get the error

 

ICE57: Component 'C_HKCU_RegistryEntries' has both per-user
and per-machine data with a per-machine KeyPath .

 

I have both components in the features element and since I have these
defined are separate components I do not understand why this does not work.
Any suggestions much appreciated.

 

Thanks, Dave

 

!-- Define the directory structure. --

Directory Id=TARGETDIR Name=SourceDir

 

  !-- add our root registry entries --

  Component Id=C_HKLM_RegistryEntries Guid=xxx

RegistryKey Root=HKLM

 Key=Software\[MYCOMPANYNAME]\[MYPRODUCTROOT]\Manager

  Action=createAndRemoveOnUninstall

/RegistryKey

  /Component

  Component Id=C_HKCU_RegistryEntries Guid=xxx

RegistryKey Root=HKCU

 Key=Software\[MYCOMPANYNAME]\[MYPRODUCTROOT]\Manager

  Action=createAndRemoveOnUninstall

/RegistryKey

  /Component

 



__ Information from ESET NOD32 Antivirus, version of virus signature
database 4537 (20091023) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How do I add both a HKLM and a HKCU key to the registry?

2009-10-24 Thread Dave Kolb
Hi Blair, you probably meant adding KeyPath to a RegistryValue element.
After I did that, I got this to somewhat work but only the HKCU key gets
created and not the HKLM key. No complaints during install in the log file.
I am doing a perMachine install and it seems if anything it should do the
HKLM key and not the HKCU key. Maybe it just does the second one for some
reason?

- Thanks, Dave

Package Platform=$(var.ProcessorArchitecture)
Manufacturer=$(var.Property_Author) InstallScope=perMachine
 InstallerVersion=$(var.Property_InstallerVersion)
Compressed=yes
 Comments=CmdMan Manager Service/

  Property Id=MYCOMPANYNAME Value=49thLatitude /
  Property Id=MYPRODUCTROOT Value=CmdMan /

!-- Define the directory structure. --
Directory Id=TARGETDIR Name=SourceDir

  !-- add our root registry entry --
  Component Id=C_HKLM_RegistryEntries Guid={xxx}
RegistryKey Root=HKLM
 
Key=Software\[MYCOMPANYNAME]\[MYPRODUCTROOT]\CmdMan.Manager.Service
  Action=createAndRemoveOnUninstall
  RegistryValue Type=integer Name=Installed Value=1
KeyPath=yes/
/RegistryKey
  /Component
  Component Id=C_HKCU_RegistryEntries Guid={zzz}
RegistryKey Root=HKCU
 
Key=Software\[MYCOMPANYNAME]\[MYPRODUCTROOT]\CmdMan.Manager.Service
  Action=createAndRemoveOnUninstall
  RegistryValue Type=integer Name=Installed Value=1
KeyPath=yes/
/RegistryKey
  /Component
Etc...

Feature Id=DefaultFeature ConfigurableDirectory=TARGETDIR
Level=1
  ComponentRef Id=C_HKLM_RegistryEntries/
  ComponentRef Id=C_HKCU_RegistryEntries/
Etc...

-Original Message-
From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Saturday, October 24, 2009 1:58 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: RE: [WiX-users] How do I add both a HKLM and a HKCU key to the
registry?


Candle doesn't like Keypath on that element: error CNDL0004: The RegistryKey
element contains an unexpected attribute 'KeyPath'.


-Original Message-
From: Blair [mailto:os...@live.com] 
Sent: Saturday, October 24, 2009 1:22 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] How do I add both a HKLM and a HKCU key to the
registry?

Try adding KeyPath=yes to each of your two RegistryKey elements.

-Original Message-
From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Friday, October 23, 2009 6:34 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: [WiX-users] How do I add both a HKLM and a HKCU key to the
registry?

During install, I am trying to add both an HKLM key and an HKCU key for my
product. My wxs looks like the below. When this compiles I get the error

 

ICE57: Component 'C_HKCU_RegistryEntries' has both per-user
and per-machine data with a per-machine KeyPath .

 

I have both components in the features element and since I have these
defined are separate components I do not understand why this does not work.
Any suggestions much appreciated.

 

Thanks, Dave

 

!-- Define the directory structure. --

Directory Id=TARGETDIR Name=SourceDir

 

  !-- add our root registry entries --

  Component Id=C_HKLM_RegistryEntries Guid=xxx

RegistryKey Root=HKLM

 Key=Software\[MYCOMPANYNAME]\[MYPRODUCTROOT]\Manager

  Action=createAndRemoveOnUninstall

/RegistryKey

  /Component

  Component Id=C_HKCU_RegistryEntries Guid=xxx

RegistryKey Root=HKCU

 Key=Software\[MYCOMPANYNAME]\[MYPRODUCTROOT]\Manager

  Action=createAndRemoveOnUninstall

/RegistryKey

  /Component

 



__ Information from ESET NOD32 Antivirus, version of virus signature
database 4537 (20091023) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users

Re: [WiX-users] How do I add both a HKLM and a HKCU key to the registry?

2009-10-24 Thread Dave Kolb
Well I flipped the order of the components in the directory node and the
feature node and still only the HKCU key got installed.

I think I will just have a custom action update/delete the registry for me
since I have to do that with event logs anyway.

- Dave

-Original Message-
From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Saturday, October 24, 2009 3:50 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: RE: [WiX-users] How do I add both a HKLM and a HKCU key to the
registry?

Hi Blair, you probably meant adding KeyPath to a RegistryValue element.
After I did that, I got this to somewhat work but only the HKCU key gets
created and not the HKLM key. No complaints during install in the log file.
I am doing a perMachine install and it seems if anything it should do the
HKLM key and not the HKCU key. Maybe it just does the second one for some
reason?

- Thanks, Dave

Package Platform=$(var.ProcessorArchitecture)
Manufacturer=$(var.Property_Author) InstallScope=perMachine
 InstallerVersion=$(var.Property_InstallerVersion)
Compressed=yes
 Comments=CmdMan Manager Service/

  Property Id=MYCOMPANYNAME Value=49thLatitude /
  Property Id=MYPRODUCTROOT Value=CmdMan /

!-- Define the directory structure. --
Directory Id=TARGETDIR Name=SourceDir

  !-- add our root registry entry --
  Component Id=C_HKLM_RegistryEntries Guid={xxx}
RegistryKey Root=HKLM
 
Key=Software\[MYCOMPANYNAME]\[MYPRODUCTROOT]\CmdMan.Manager.Service
  Action=createAndRemoveOnUninstall
  RegistryValue Type=integer Name=Installed Value=1
KeyPath=yes/
/RegistryKey
  /Component
  Component Id=C_HKCU_RegistryEntries Guid={zzz}
RegistryKey Root=HKCU
 
Key=Software\[MYCOMPANYNAME]\[MYPRODUCTROOT]\CmdMan.Manager.Service
  Action=createAndRemoveOnUninstall
  RegistryValue Type=integer Name=Installed Value=1
KeyPath=yes/
/RegistryKey
  /Component
Etc...

Feature Id=DefaultFeature ConfigurableDirectory=TARGETDIR
Level=1
  ComponentRef Id=C_HKLM_RegistryEntries/
  ComponentRef Id=C_HKCU_RegistryEntries/
Etc...

-Original Message-
From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Saturday, October 24, 2009 1:58 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: RE: [WiX-users] How do I add both a HKLM and a HKCU key to the
registry?


Candle doesn't like Keypath on that element: error CNDL0004: The RegistryKey
element contains an unexpected attribute 'KeyPath'.


-Original Message-
From: Blair [mailto:os...@live.com] 
Sent: Saturday, October 24, 2009 1:22 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] How do I add both a HKLM and a HKCU key to the
registry?

Try adding KeyPath=yes to each of your two RegistryKey elements.

-Original Message-
From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Friday, October 23, 2009 6:34 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: [WiX-users] How do I add both a HKLM and a HKCU key to the
registry?

During install, I am trying to add both an HKLM key and an HKCU key for my
product. My wxs looks like the below. When this compiles I get the error

 

ICE57: Component 'C_HKCU_RegistryEntries' has both per-user
and per-machine data with a per-machine KeyPath .

 

I have both components in the features element and since I have these
defined are separate components I do not understand why this does not work.
Any suggestions much appreciated.

 

Thanks, Dave

 

!-- Define the directory structure. --

Directory Id=TARGETDIR Name=SourceDir

 

  !-- add our root registry entries --

  Component Id=C_HKLM_RegistryEntries Guid=xxx

RegistryKey Root=HKLM

 Key=Software\[MYCOMPANYNAME]\[MYPRODUCTROOT]\Manager

  Action=createAndRemoveOnUninstall

/RegistryKey

  /Component

  Component Id=C_HKCU_RegistryEntries Guid=xxx

RegistryKey Root=HKCU

 Key=Software\[MYCOMPANYNAME]\[MYPRODUCTROOT]\Manager

  Action=createAndRemoveOnUninstall

/RegistryKey

  /Component

 



__ Information from ESET NOD32 Antivirus, version of virus signature
database 4537 (20091023) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net

Re: [WiX-users] Can I set the Directory name attribute with a custom property value?

2009-10-24 Thread Dave Kolb
Thanks!

-Original Message-
From: Rob Mensching [mailto:r...@robmensching.com] 
Sent: Saturday, October 24, 2009 5:20 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Can I set the Directory name attribute with a
custom property value?

That's a direct assignment of the Directory name. So I expect you'll get
[MYCOMPANYNAME] as your directory name. Same as if you did Property
Id=X Value=[MYCOMPANYNAME]/ you'd get [MYCOMPANYNAME]. To have the
value evaluated then assigned you need to use a custom action.

In this case, a simple SetProperty Id=DirectoryId
Value=[ProgramFilesFolder]\[MYCOMPANYNAME] After=CostInitialize/ should
work.  Or you could be more efficient and use a preprocessor variable to
define both the Property and the Directory with the same value and reduce
the complexity of your install.



--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How do I add both a HKLM and a HKCU key to the registry?

2009-10-24 Thread Dave Kolb
I need a custom action to create the event source as otherwise when my 2
services and app try to write to the event log they fail. If the
services/app tries to create the event source, if it does not exist, there
is a supposed delay and the event log cannot be written to and this indeed
seems to be the case when I have debugged this.

I'm fine with installing app per machine and the only reason I want to do
anything with HKCU is to make sure I clear out registry entries per user
when the product is uninstalled. Maybe my app is NEVER supposed to write to
HKCU if installed for all users. Is that true? Ideally I want to
install/uninstall for all users but allow each actual user to have their own
window coordinates and other persisted user only data. Not sure if this is
allowed for.

Question: If an application is installed per user for 3 users for a total of
3 installs, is there some sort of reference count kept for the # of users
that installed the app such that the app is really uninstalled after the
last user uninstalls it? I know Win7 and Server 2008 are different so let's
not consider those in regards to this question as they seem to actually
install in a user program files folder rather than the common folder.

Thanks for all your help Blair!

- Dave

-Original Message-
From: Rob Mensching [mailto:r...@robmensching.com] 
Sent: Saturday, October 24, 2009 5:23 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How do I add both a HKLM and a HKCU key to the
registry?

Why do you need a custom action for event logs?

Also, writing/deleting per-user content via installation packages rarely
works out as well as people hope because you can't modify all the user
profiles. Only the current user. In general, HKCU stuff should be managed by
the application.

Finally, a verbose log file should explain why a Component is not being
installed. The behavior you are describing so far is not expected. There is
something else.

On Sat, Oct 24, 2009 at 1:33 AM, Dave Kolb
d...@dotnetcodeslingers.comwrote:

 Well I flipped the order of the components in the directory node and the
 feature node and still only the HKCU key got installed.

 I think I will just have a custom action update/delete the registry for me
 since I have to do that with event logs anyway.

 - Dave

 -Original Message-
 From: Dave Kolb [mailto:d...@dotnetcodeslingers.com]
 Sent: Saturday, October 24, 2009 3:50 AM
 To: 'General discussion for Windows Installer XML toolset.'
 Subject: RE: [WiX-users] How do I add both a HKLM and a HKCU key to the
 registry?

 Hi Blair, you probably meant adding KeyPath to a RegistryValue element.
 After I did that, I got this to somewhat work but only the HKCU key gets
 created and not the HKLM key. No complaints during install in the log
file.
 I am doing a perMachine install and it seems if anything it should do the
 HKLM key and not the HKCU key. Maybe it just does the second one for some
 reason?

 - Thanks, Dave

Package Platform=$(var.ProcessorArchitecture)
 Manufacturer=$(var.Property_Author) InstallScope=perMachine
 InstallerVersion=$(var.Property_InstallerVersion)
 Compressed=yes
 Comments=CmdMan Manager Service/

  Property Id=MYCOMPANYNAME Value=49thLatitude /
  Property Id=MYPRODUCTROOT Value=CmdMan /

 !-- Define the directory structure. --
Directory Id=TARGETDIR Name=SourceDir

   !-- add our root registry entry --
   Component Id=C_HKLM_RegistryEntries Guid={xxx}
RegistryKey Root=HKLM

 Key=Software\[MYCOMPANYNAME]\[MYPRODUCTROOT]\CmdMan.Manager.Service
  Action=createAndRemoveOnUninstall
  RegistryValue Type=integer Name=Installed Value=1
 KeyPath=yes/
 /RegistryKey
  /Component
  Component Id=C_HKCU_RegistryEntries Guid={zzz}
RegistryKey Root=HKCU

 Key=Software\[MYCOMPANYNAME]\[MYPRODUCTROOT]\CmdMan.Manager.Service
  Action=createAndRemoveOnUninstall
  RegistryValue Type=integer Name=Installed Value=1
 KeyPath=yes/
/RegistryKey
  /Component
 Etc...

Feature Id=DefaultFeature ConfigurableDirectory=TARGETDIR
 Level=1
  ComponentRef Id=C_HKLM_RegistryEntries/
  ComponentRef Id=C_HKCU_RegistryEntries/
 Etc...

 -Original Message-
 From: Dave Kolb [mailto:d...@dotnetcodeslingers.com]
 Sent: Saturday, October 24, 2009 1:58 AM
 To: 'General discussion for Windows Installer XML toolset.'
 Subject: RE: [WiX-users] How do I add both a HKLM and a HKCU key to the
 registry?


 Candle doesn't like Keypath on that element: error CNDL0004: The
 RegistryKey
 element contains an unexpected attribute 'KeyPath'.


 -Original Message-
 From: Blair [mailto:os...@live.com]
 Sent: Saturday, October 24, 2009 1:22 AM
 To: 'General discussion for Windows Installer XML toolset.'
 Subject: Re: [WiX-users] How do I add both a HKLM and a HKCU key to the
 registry?

 Try adding KeyPath=yes to each of your two

Re: [WiX-users] How do I add both a HKLM and a HKCU key to the registry?

2009-10-24 Thread Dave Kolb
Good information Blair and thanks. I did not know about the EventSource
element but should have guesses there likely was one.

I will rethink what I am doing with the registry given your guidelines.
Especially since I just realized that my custom action, built for Any CPU,
is running against the 32 bit hive and I have to drop into Win32 Interop if
I want to set registry redirection which I could but would rather not do.

Not that I will necessarily pursue this same path, but for future reference,
is there a way to force DTF to run a managed custom action written for Any
CPU to run in 64 bit mode besides compiling the assembly for x64?

- Dave

-Original Message-
From: Blair [mailto:os...@live.com] 
Sent: Saturday, October 24, 2009 7:09 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] How do I add both a HKLM and a HKCU key to the
registry?

Back in the good-old-days we simply wrote in the registry until it looked
like what this page describes:

http://msdn.microsoft.com/en-us/library/aa363661(VS.85).aspx

However, the Wix Util Extension does have an EventSource element that seems
to fit the billing. Does it not work for you?

If you install per-user for three different users, each installation is
independent from the others. Per-user installations should never install
anything common unless they have some independent means of coordinating
the use of the common areas. That is why the WiX implementation of the
per-user/per-machine switch creates a program installation directory inside
of the user profile.

Per-user data (such as windows coordinates, etc.) are considered user data,
not program data, and are typically left behind. Besides, if your
per-machine program is used by three users, there is no safe way to clean
that data from any of the users not running the installation.

Today's best practice says: the installation of per-machine programs supply
default configuration in HKLM and never touch HKCU. The program itself
manages HKCU for each user's customizations to that configuration, and that
is then considered user data. You then migrate it during first launch of
your application after you upgrade, and you orphan it when you uninstall.
That way there is ZERO user-profile anything in your MSI.


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How do I add both a HKLM and a HKCU key to the registry?

2009-10-24 Thread Dave Kolb
Thanks John!

-Original Message-
From: John H. Bergman (XPedient Technologies)
[mailto:john.berg...@xpedienttechnologies.com] 
Sent: Saturday, October 24, 2009 11:39 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How do I add both a HKLM and a HKCU key to the
registry?

We do this and it works for us (Same situation).

Add a reference to the util extension, and add it to your namespace
definitions

Wix xmlns=http://schemas.microsoft.com/wix/2006/wi;
  xmlns:iis=http://schemas.microsoft.com/wix/IIsExtension;
  xmlns:util=http://schemas.microsoft.com/wix/UtilExtension;

then in the appropriate component

util:EventSource Name='AppName' Log='AppName'
 
EventMessageFile='[WindowsFolder]Microsoft.NET\Framework\v2.0.50727\EventLog
Messages.dll'
  SupportsErrors='yes'
  SupportsWarnings='yes'
  SupportsInformationals='yes'/


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] How do I add both a HKLM and a HKCU key to the registry?

2009-10-23 Thread Dave Kolb
During install, I am trying to add both an HKLM key and an HKCU key for my
product. My wxs looks like the below. When this compiles I get the error

 

ICE57: Component 'C_HKCU_RegistryEntries' has both per-user
and per-machine data with a per-machine KeyPath .

 

I have both components in the features element and since I have these
defined are separate components I do not understand why this does not work.
Any suggestions much appreciated.

 

Thanks, Dave

 

!-- Define the directory structure. --

Directory Id=TARGETDIR Name=SourceDir

 

  !-- add our root registry entries --

  Component Id=C_HKLM_RegistryEntries Guid=xxx

RegistryKey Root=HKLM

 Key=Software\[MYCOMPANYNAME]\[MYPRODUCTROOT]\Manager

  Action=createAndRemoveOnUninstall

/RegistryKey

  /Component

  Component Id=C_HKCU_RegistryEntries Guid=xxx

RegistryKey Root=HKCU

 Key=Software\[MYCOMPANYNAME]\[MYPRODUCTROOT]\Manager

  Action=createAndRemoveOnUninstall

/RegistryKey

  /Component

 



__ Information from ESET NOD32 Antivirus, version of virus signature
database 4537 (20091023) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Can I set the Directory name attribute with a custom property value?

2009-10-23 Thread Dave Kolb
Should this work? I am getting the literal strings as the directory name. Is
the directory name attribute not formattable? Where is it documented what
is formatted or not as I have not been able to find that information.
Thanks, Dave

 

  Property Id=MYCOMPANYNAME Value=49thLatitude /

  Property Id=MYPRODUCTROOT Value=CmdMan /

 

Directory Id=CompanyRoot Name=[MYCOMPANYNAME]

  Directory Id=CmdManRoot Name=[MYPRODUCTROOT]

 

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Issue in installing in 64 Bit OS

2009-10-20 Thread Dave Kolb
You can test like this if you really need to

?if $(var.ProcessorArchitecture)=x64 ?

but there is no such thing as a folder called Program Files (x64) only
Program Files (x86).

And the right thing should just happen if you set the architecture when
building.

- Dave

-Original Message-
From: Natarajan, Thangaraj (MLITS) [mailto:thangaraj_natara...@ml.com] 
Sent: Tuesday, October 20, 2009 10:17 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Issue in installing in 64 Bit OS

Hi All,

I need some help on identifying whether the OS is 64 Bit Version. Incase
if is 64 bit I need to install the files in Program Files (x64) and
incase of 32bit I need to install it in Program Files Folder.
Can anyone let me know how to do this? It would be helpful.

Thanks,
Thangaraj Natarajan 
Associate Consultant.GWMT (TASCS) 
Merrill Lynch India Tech Service Pvt Ltd., 



--
This message w/attachments (message) may be privileged, confidential or
proprietary, and if you are not an intended recipient, please notify the
sender, do not use or share it and delete it. The information contained in
this e-mail was obtained from sources believed to be reliable; however, the
accuracy or completeness of this information is not guaranteed. Unless
specifically indicated, this message is not an offer to sell or a
solicitation of any investment products or other financial product or
service, an official confirmation of any transaction, or an official
statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may
monitor, review and retain e-communications (EC) traveling through its
networks/systems. The laws of the country of each sender/recipient may
impact the handling of EC, and EC may be archived, supervised and produced
in countries other than the country in which you are located. This message
cannot be guaran teed to be secure or error-free. References to Merrill
Lynch are references to any company in the Merrill Lynch  Co., Inc. group
of companies, which are wholly-owned by Bank of America Corporation.
Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank
Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition
to Any Banking Service or Activity * Are Not Insured by Any Federal
Government Agency. Past performance is no guarantee of future results.
Attachments that are part of this E-communication may have additional
important disclosures and disclaimers, which you should read. This message
is subject to terms available at the following link:
http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch
you consent to the foregoing.
--
 

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Any way to control the # of service start attempts on ServiceControl?

2009-10-17 Thread Dave Kolb
This worked quite well to start my service instead of using ServiceControl
and in my case, and lets my service install even if it does not start after
trying only once which is what I wanted. I do use ServiceControl for
uninstall though! Thanks for all the help that is given in this list! - Dave

CustomAction Id=QtExecStartService_Cmd Property=QtExecStartService
  Value='sc start [APPLICATIONNAME]' Execute=immediate/
CustomAction Id=QtExecStartService BinaryKey=WixCA
DllEntry=CAQuietExec
  Execute=deferred Return=check Impersonate=no/

InstallExecuteSequence
  Custom Action=QtExecStartService_Cmd After=CostFinalize
Overridable=yesNOT Installed/Custom
  Custom Action=QtExecStartService After=StartServices
Overridable=yesNOT Installed/Custom
/InstallExecuteSequence

-Original Message-
From: Bob Arnson [mailto:b...@joyofsetup.com] 
Sent: Saturday, October 17, 2009 2:11 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Any way to control the # of service start attempts
on ServiceControl?

Dave Kolb wrote:
 Is there any way to control the # of service start attempts on
 ServiceControl or elsewhere in the .msi file? 

No, MSI doesn't offer that configurability.

-- 
sig://boB
http://joyofsetup.com/




--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Any way to control the # of service start attempts on ServiceControl?

2009-10-15 Thread Dave Kolb
Is there any way to control the # of service start attempts on
ServiceControl or elsewhere in the .msi file? MSI seems to try 7 times to
start my service before declaring an install failure. The service is not
starting due to no fault of wix or MSI and so I am not asking about that. I
just want to try to start the service once not 7 times before declaring a
failure. Thanks, Dave

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] When to change Product/@Id (ProductCode)? - two editions of the same product.

2009-10-15 Thread Dave Kolb
I understand Product/@Id is an XPath fragment but where is such syntax
used in conjunction with wix? I could find no such usage in any wix or
project files that I am using. Just trying to understand what you are
talking about. Thanks, Dave

snip

Currently for our main product I'm using two Product/@Id with each
release - one for x86 and one for x64. However I'm using the *same*
Product/@Id and Upgrade/@Id for the 6 different languages we ship.

snip


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] When to change Product/@Id (ProductCode)? - two editions of the same product.

2009-10-15 Thread Dave Kolb
Hi Sascha, I also do that same exact thing since I use the same .wxs file
for x64 and x86 and define unique product codes for each but was wondering
where exactly you were using/seeing that xpath syntax fragment of
Product/@Id which is different than the 3rd line of what you just listed
which is the syntax I would expect in an .xls file. - Dave

-Original Message-
From: Sascha Beaumont [mailto:sascha.beaum...@gmail.com] 
Sent: Thursday, October 15, 2009 11:56 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] When to change Product/@Id (ProductCode)? - two
editions of the same product.

Hi Dave,

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

The Id attribute of the Product element... It's the third line in
every single one of my WiX projects :)

?xml version=1.0 encoding=utf-8?
Wix xmlns=http://schemas.microsoft.com/wix/2006/wi;
  Product Id=$(var.Property_ProductCode) 


Sascha

On Fri, Oct 16, 2009 at 2:38 PM, Dave Kolb d...@dotnetcodeslingers.com
wrote:
 I understand Product/@Id is an XPath fragment but where is such syntax
 used in conjunction with wix? I could find no such usage in any wix or
 project files that I am using. Just trying to understand what you are
 talking about. Thanks, Dave

 snip

 Currently for our main product I'm using two Product/@Id with each
 release - one for x86 and one for x64. However I'm using the *same*
 Product/@Id and Upgrade/@Id for the 6 different languages we ship.

 snip




--
 Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 WiX-users mailing list
 WiX-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wix-users



--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] When to change Product/@Id (ProductCode)? - two editions of the same product.

2009-10-15 Thread Dave Kolb
Yes thanks! I had seen a couple such references before and did not realize
you all were talking like an xpath compiler J Kind of like talking like a
pirate. Arrgh! Sorry I can't help with your actual question.Dave

 

-Original Message-
From: Sascha Beaumont [mailto:sascha.beaum...@gmail.com] 
Sent: Friday, October 16, 2009 12:55 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] When to change Product/@Id (ProductCode)? - two
editions of the same product.

 

Hi Dave,

 

I'm not using the fragment *in* my WiX sources, I'm using it for

clarification in referring *to* my WiX sources... does that make

sense?

 

Sascha

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Custom Before= and After= vs. CustomAction Execute=

2009-10-14 Thread Dave Kolb
Thanks Sebastian. This one is good too
http://blogs.technet.com/alexshev/pages/from-msi-to-wix.aspx
I have some reading to do!

- Dave

-Original Message-
From: Sebastian Brand (Instyler Software) [mailto:wix+us...@instyler.com] 
Sent: Wednesday, October 14, 2009 1:04 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom Before= and After= vs. CustomAction
Execute=

I'd also like to point out to http://www.tramontana.co.hu/wix/lesson3.php 
, a detailed tutorial about custom actions...

Best regards,
Sebastian Brand


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Fetching APPLICATIONFOLDER from CA fails with IndexOutOfRangeException

2009-10-14 Thread Dave Kolb
The following code get the following exception. Can I not fetch this
property from my immediate custom action? Unfortunatley the session object
has an indexer that cannot be enumerated so I'm at a loss as to what can be
indexed from the sessin object! - Thanks, Dave

 

public static ActionResult GetServiceLogon(Session session)

{

try

{

  // get the name of the application folder

  string lServiceName = session[APPLICATIONFOLDER];

 

*** Error: CmdMan GetServiceLogon custom action got exception
'System.IndexOutOfRangeException: Index was outside the bounds of the array.

   at _CustomActions.CustomActions.GetServiceLogon(Session session)'

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Types of variables question

2009-10-14 Thread Dave Kolb
I understand these variable types from the wix doc:

 

$(env._NtPostBld) 

Gets the environment variable %_NtPostBld% 

$(sys.CURRENTDIR) 

Gets the system variable for the current directory 

$(var.A) 

Gets the variable A that was defined in this xml 

 

 

But what are these that I have seen in an example??? Is there doc on ALL the
types of variables that can be used in a .wxs file?

 

§  Product/@Version=!(bind.FileVersion.FileId) ---à two unknown
types - the @ syntax and the ! syntax with 2 levels

§  $(fileVersion.ProductName($(var.MyApp.TargetPath))) ---à what is
fileVersion and what's the deal with the 2 levels of var. syntax

 

- Dave

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] How does a votive project pass variables to candle?

2009-10-14 Thread Dave Kolb
I tried looking at the wix.targets but do not understand msbuild adequately.
Are the many var.Projectname.xxx and var.Solutionxxx variables passed in on
the command line with -d or are they written to a .wxi file or does candle
take special input for variable somehow besides the -d option? Seems
unlikely a command line could be built with all those -d variables without
exceeding the allowed length.

 

The reason I ask is that I have a Powershell script that I am using to build
all my .msi files for all my modules for both x86 and x64 and would like to
simulate passing in the project variables. It runs candle via cmd.exe so I
think I would be subject to a command line length limitation.

 

Thanks, Dave

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How does a votive project pass variables to candle?

2009-10-14 Thread Dave Kolb
Nevermind on this question. I created a dummy project and looked at the
output window and saw that they really are all -d options:

 

C:\Program Files (x86)\Windows Installer XML v3\bin\candle.exe -dabc=xyz
-dhello=456 -dDevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio
9.0\Common7\IDE\\ -dSolutionDir=C:\Users\Dave\Documents\Visual Studio
2008\Projects\CmdMan\\ -dSolutionExt=.sln -dSolutionFileName=CmdMan.sln
-dSolutionName=CmdMan -dSolutionPath=C:\Users\Dave\Documents\Visual Studio
2008\Projects\CmdMan\CmdMan.sln -dConfiguration=Release
-dOutDir=bin\Release\ -dPlatform=x86
-dProjectDir=C:\Users\Dave\Documents\Visual Studio
2008\Projects\CmdMan\XTestWixProject\\ -dProjectExt=.wixproj
-dProjectFileName=XTestWixProject.wixproj -dProjectName=XTestWixProject
-dProjectPath=C:\Users\Dave\Documents\Visual Studio
2008\Projects\CmdMan\XTestWixProject\XTestWixProject.wixproj
-dTargetDir=C:\Users\Dave\Documents\Visual Studio
2008\Projects\CmdMan\XTestWixProject\bin\Release\\ -dTargetExt=.msi
-dTargetFileName=XTestWixProject.msi -dTargetName=XTestWixProject
-dTargetPath=C:\Users\Dave\Documents\Visual Studio
2008\Projects\CmdMan\XTestWixProject\bin\Release\XTestWixProject.msi -out
obj\Release\Product.wixobj -arch x86 Product.wxs

 

From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Wednesday, October 14, 2009 4:04 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: How does a votive project pass variables to candle?

 

I tried looking at the wix.targets but do not understand msbuild adequately.
Are the many var.Projectname.xxx and var.Solutionxxx variables passed in on
the command line with -d or are they written to a .wxi file or does candle
take special input for variable somehow besides the -d option? Seems
unlikely a command line could be built with all those -d variables without
exceeding the allowed length.

 

The reason I ask is that I have a Powershell script that I am using to build
all my .msi files for all my modules for both x86 and x64 and would like to
simulate passing in the project variables. It runs candle via cmd.exe so I
think I would be subject to a command line length limitation.

 

Thanks, Dave



__ Information from ESET NOD32 Antivirus, version of virus signature
database 4507 (20091014) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Fetching APPLICATIONFOLDER from CA fails with IndexOutOfRangeException

2009-10-14 Thread Dave Kolb
Sorry, this was my bug. APPLICATIONFOLDER is there just fine!

 

From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Wednesday, October 14, 2009 3:05 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Fetching APPLICATIONFOLDER from CA fails with
IndexOutOfRangeException

 

The following code get the following exception. Can I not fetch this
property from my immediate custom action? Unfortunatley the session object
has an indexer that cannot be enumerated so I'm at a loss as to what can be
indexed from the sessin object! - Thanks, Dave

 

public static ActionResult GetServiceLogon(Session session)

{

try

{

  // get the name of the application folder

  string lServiceName = session[APPLICATIONFOLDER];

 

*** Error: CmdMan GetServiceLogon custom action got exception
'System.IndexOutOfRangeException: Index was outside the bounds of the array.

   at _CustomActions.CustomActions.GetServiceLogon(Session session)'



__ Information from ESET NOD32 Antivirus, version of virus signature
database 4507 (20091014) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Types of variables question

2009-10-14 Thread Dave Kolb
Thanks so much Blair. You are absolutely a fountain of knowledge and it is
so wonderful you generously share it. Dave

-Original Message-
From: Blair [mailto:os...@live.com] 
Sent: Wednesday, October 14, 2009 4:59 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Types of variables question

In WiX v3 in candle there are four built-in that start with $(
(specifically: env, sys, var,  fun). Any preprocessor extension on the
commandline to candle can add others as well.

...


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] ServiceInstall and ServiceControl question

2009-10-13 Thread Dave Kolb
I use ServiceInstall and ServiceControl and noticed that if my service
failed to start [a bug in my code], then the install failed.

 

Is there a means to try to start the service and have it install even if it
fails to start?

 

P.S. Also, fwiw, I noticed that if I used two ServiceControl elements, one
for install and one for uninstall, I got complaints about the files in use
when trying to uninstall. The below works for uninstall.

 

Thanks, Dave

 

ServiceInstall Id=CmdMan.Agent.Service.Install
Name=CmdMan.Agent.Service

DisplayName=CmdMan Agent Service
Type=ownProcess Start=auto

ErrorControl=normal Description=CmdMan
Agent Service

Account=[Property_CmdMan_Account]
Password=[Property_CmdMan_Password]

/

ServiceControl Id=CmdMan.Agent.Service.Start.Control
Name=CmdMan.Agent.Service

Start=install Stop=uninstall
Remove=uninstall Wait=yes /

 

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Are shortcut names even useful anymore?

2009-10-13 Thread Dave Kolb
Blair thanks but I have to confess to not understanding that explanation at
all. What would be such a case that an XP or Vista user saw a short name
instead of the NTFS name? - Dave

-Original Message-
From: Blair [mailto:os...@live.com] 
Sent: Tuesday, October 13, 2009 9:22 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Are shortcut names even useful anymore?

Shortcut names are exposed to users on XP systems and may be exposed to them
on Vista systems, depending on whether they have had a native resource dll
string table entry assigned to them. The windows shell which is responsible
for showing the start menu is either all or mostly native code, the .net
version doesn't matter (just the underlying platform). The disk format
doesn't matter either.

-Original Message-
From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Monday, October 12, 2009 9:15 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: [WiX-users] Are shortcut names even useful anymore?

I don't use any shortcut names in my install and notice they are generated
for me with some seemingly random letters.

Are actual shortcut names even useful on any .NET 3.5 system which is the
requirement for my application?

I'm also OK with requiring an NTFS [non FAT32] disk though I'm not sure on
how one would test for that.

Thanks, Dave


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] ServiceInstall and ServiceControl question

2009-10-13 Thread Dave Kolb
Thanks Blair. In that case, I think I will start the service with a CA. What
would be the proper sequence point to do this? Thanks, Dave

-Original Message-
From: Blair [mailto:os...@live.com] 
Sent: Tuesday, October 13, 2009 9:27 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] ServiceInstall and ServiceControl question

To reduce reboot prompts many of us set @Stop to both.

Windows Installer assumes that if you want the service started during the
installation, it is a failure if it doesn't. It uses the built-in action
StartServices, which can't be redefined to ignore (all you can do is
condition it, which isn't what you are asking).

-Original Message-
From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Monday, October 12, 2009 11:32 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: [WiX-users] ServiceInstall and ServiceControl question

I use ServiceInstall and ServiceControl and noticed that if my service
failed to start [a bug in my code], then the install failed.


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Are shortcut names even useful anymore?

2009-10-13 Thread Dave Kolb
Thanks Chad as I did not notice I said that. I definitely mean a short
name or 8.3 name. I would just as soon not clutter my .wxs file with them
if I don't need them and so am wondering on XP forward in what cases a user
would see one of the auto generated short names if I did not specify them
and so whether I really needed to specify them.

Thanks for pointing that out. - Dave

-Original Message-
From: Chad Petersen [mailto:chad.peter...@harlandfs.com] 
Sent: Tuesday, October 13, 2009 12:22 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Are shortcut names even useful anymore?

Be careful there. A short name (8.3 convention) is different than a
Shortcut, which is what your subject line implies.

-Original Message-
From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Tuesday, October 13, 2009 8:56 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Are shortcut names even useful anymore?

Blair thanks but I have to confess to not understanding that explanation
at
all. What would be such a case that an XP or Vista user saw a short name
instead of the NTFS name? - Dave

-Original Message-
From: Blair [mailto:os...@live.com] 
Sent: Tuesday, October 13, 2009 9:22 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Are shortcut names even useful anymore?

Shortcut names are exposed to users on XP systems and may be exposed to
them
on Vista systems, depending on whether they have had a native resource
dll
string table entry assigned to them. The windows shell which is
responsible
for showing the start menu is either all or mostly native code, the .net
version doesn't matter (just the underlying platform). The disk format
doesn't matter either.


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Are we supposed to register products ourselves or should WIX/MSI do it automagically?

2009-10-13 Thread Dave Kolb
When a product is installed, are we supposed to have our .wxs file register
an entry into HKLM\Software\[Company]\[Product] ourselves or is this
something the .msi installer is supposed to do for us somehow? I looked at
my old .msi files build with VS2008 before wix and did not see any special
registry entries for that so think .msi did it for me. I see no comparable
registry entry after my WIX install however and am wondering if I need to
explicitly register one for my application. I'm not talking about the HKCU
values but rather an HKLM value that shows the product was installed.

 

Also, my old .msi file had all of these ARP properties defined: ARPHELPLINK,
ARPCONTACT, ARPHELPTELEPHONE, ARPCOMMENTS, ARPURLINFOABOUT. If I define
these properties, do I need to do anything special for them to take effect
under WIX?

 

Thanks from a WIX newbie,

Dave

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Are we supposed to register products ourselves or should WIX/MSI do it automagically?

2009-10-13 Thread Dave Kolb
Nevermind on the ARP stuff. I defined the values and they just work! Am
still wondering what is the proper thing to do in regards to registering the
install of the product though. Thanks, Dave

 

From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Tuesday, October 13, 2009 1:24 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Are we supposed to register products ourselves or should WIX/MSI do
it automagically?

 

When a product is installed, are we supposed to have our .wxs file register
an entry into HKLM\Software\[Company]\[Product] ourselves or is this
something the .msi installer is supposed to do for us somehow? I looked at
my old .msi files build with VS2008 before wix and did not see any special
registry entries for that so think .msi did it for me. I see no comparable
registry entry after my WIX install however and am wondering if I need to
explicitly register one for my application. I'm not talking about the HKCU
values but rather an HKLM value that shows the product was installed.

 

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Are short names even useful anymore?

2009-10-13 Thread Dave Kolb
Thanks Chad. In spite of calling it a shortcut, I know what a SFN is since
working on PCs from the very first version of DOS 1.0, but am wondering why
I might want to have anything meaningful for a short name nowadays. Since
these names would be for my program files I'd really rather not any legacy
program showed anything meaningful to the user though I can't even think of
what such a program would even be. Is there anything in XP forward in the OS
itself that is important in practice that would attempt to show a short name
to the user? I can't think of anything so am inclined to not specify any
short names that would clutter up my .wxs files. Thanks, Dave

-Original Message-
From: Chad Petersen [mailto:chad.peter...@harlandfs.com] 
Sent: Tuesday, October 13, 2009 1:44 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Are shortcut names even useful anymore?

An 8.3 filename (also called a short filename or SFN) is a filename
convention used by old versions of DOS and versions of Microsoft Windows
prior to Windows 95 and Windows NT 3.51. It is also used in modern
Microsoft operating systems as an alternate filename to the long
filename for compatibility with legacy programs.


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Are short names even useful anymore?

2009-10-13 Thread Dave Kolb
Brant, Know anyway for wix to check that I am installing on NTFS and not a
FAT system? I have no desire whatsoever of perpetuating anything in regards
to FAT...Thanks, Dave

-Original Message-
From: Brant Gurganus [mailto:br...@gurganus.name] 
Sent: Tuesday, October 13, 2009 3:00 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Are short names even useful anymore?

There are still filesystems that Windows can use that are short name only.

Brant Gurganus
http://gurganus.name/brant


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Are short names even useful anymore?

2009-10-13 Thread Dave Kolb
Interesting. I still think I will not specify short names so as to let them
auto generate and see if I ever run into problems. Thanks, Dave

-Original Message-
From: Brant Gurganus [mailto:br...@gurganus.name] 
Sent: Tuesday, October 13, 2009 4:23 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Are short names even useful anymore?

Long file names can be turned off on NTFS so you have to worry about
it there as well. See
http://blogs.msdn.com/astebner/archive/2005/01/27/362049.aspx


Brant Gurganus
http://gurganus.name/brant


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Custom Before= and After= vs. CustomAction Execute=

2009-10-13 Thread Dave Kolb
Is there somewhere written up an overview of the flow of the installer in
general and how sequencing actions work? I would like to better understand
how to sequence actions and am confused about CustomActions
Execute=Immediate|Deferred|etc. vs. Custom Action Before= and After= and
how they work together in the grand scheme of things and what is the scope
of the script.

 

Thanks, Dave

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Custom Before= and After= vs. CustomAction Execute=

2009-10-13 Thread Dave Kolb
I found this by John McFadyen -
http://johnmcfadyen.spaces.live.com/blog/cns!9DD01136FC094724!167.entry
which helps a lot to understand the grand scheme of things and clears up
some things I was confused about. Any other big picture references
appreciated.

 

From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Wednesday, October 14, 2009 12:31 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Custom Before= and After= vs. CustomAction Execute=

 

Is there somewhere written up an overview of the flow of the installer in
general and how sequencing actions work? I would like to better understand
how to sequence actions and am confused about CustomActions
Execute=Immediate|Deferred|etc. vs. Custom Action Before= and After= and
how they work together in the grand scheme of things and what is the scope
of the script.

 

Thanks, Dave



__ Information from ESET NOD32 Antivirus, version of virus signature
database 4504 (20091013) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Are shortcut names even useful anymore?

2009-10-12 Thread Dave Kolb
I don't use any shortcut names in my install and notice they are generated
for me with some seemingly random letters.

 

Are actual shortcut names even useful on any .NET 3.5 system which is the
requirement for my application?

 

I'm also OK with requiring an NTFS [non FAT32] disk though I'm not sure on
how one would test for that.

 

Thanks, Dave

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] How do you copy a set of files to multiple places using Wix?

2009-10-12 Thread Dave Kolb
Repeat the component and file elements for each directory.

-Original Message-
From: Keith Nicholas [mailto:keith.nicho...@gmail.com] 
Sent: Monday, October 12, 2009 10:49 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] How do you copy a set of files to multiple places using
Wix?

I'm trying to make an install that puts a copy of the same files in
multiple places...

is there a simple way to do this?

eg. if I wanted to put a.txt b.txt c.txt into all of the following
directories :-

.\Blah\
.\Txts\
.\Examples\


Regards,

Keith


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Which way to install a Windows service is best?

2009-10-11 Thread Dave Kolb
I got my 64 bit C# Custom Action running just fine and it can set some
properties that I can use to set my account and password on my
ServiceInstall element. Thanks to everyone. Wix is pretty cool!

I have two other questions though:

1. When my CA sets properties they print in the log How can I suppress
this as I don't want to expose the password.

2. When I try to reference a property that my CA sets, I have to use
[Property_XXX_Password] because !(var.Property_XXX_Password) does not work!
I was expecting to be able to reference with a !(var.Property_XXX_Password)
syntax. What is the difference between these references?

P.S. I used the following sequence to call my action.

!-- Set the sequence --
InstallExecuteSequence
  Custom Action=GetServiceLogon After=CostFinalize
Overridable=yesNOT Installed/Custom
/InstallExecuteSequence

Thanks, Dave


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Which way to install a Windows service is best?

2009-10-11 Thread Dave Kolb
To report what I found on my questions:

1. I guess the !(var.Property_XXX_Password) syntax is a pre-processor
variable and not a property!
2. Property Id=Property_XXX_Password Hidden=yes/ --- this worked to
hide the password was replaced with *'s!

- Dave

-Original Message-
From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Sunday, October 11, 2009 2:48 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: RE: [WiX-users] Which way to install a Windows service is best?

I got my 64 bit C# Custom Action running just fine and it can set some
properties that I can use to set my account and password on my
ServiceInstall element. Thanks to everyone. Wix is pretty cool!

I have two other questions though:

1. When my CA sets properties they print in the log How can I suppress
this as I don't want to expose the password.

2. When I try to reference a property that my CA sets, I have to use
[Property_XXX_Password] because !(var.Property_XXX_Password) does not work!
I was expecting to be able to reference with a !(var.Property_XXX_Password)
syntax. What is the difference between these references?

P.S. I used the following sequence to call my action.

!-- Set the sequence --
InstallExecuteSequence
  Custom Action=GetServiceLogon After=CostFinalize
Overridable=yesNOT Installed/Custom
/InstallExecuteSequence

Thanks, Dave


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Which way to install a Windows service is best?

2009-10-11 Thread Dave Kolb
Good information thanks!

-Original Message-
From: Blair [mailto:os...@live.com] 
Sent: Sunday, October 11, 2009 3:01 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Which way to install a Windows service is best?

1. There are several issues that are resolved by using DTF to run managed
code custom actions, among which is a problem whereby if a custom action
instance of msiexec loads the managed runtime and is reused for a different
action, it can't load a different version of the runtime (if needed). By
calling out to an out-of-process and using a pipe to provide all the
advantages of in-process you prevent that problem while also preventing the
issues with out-of-process (aka EXE) CAs. It is the current recommended best
practice.

2. Yes, you should put your CA in the binary table. Using assemblies you
install leads to several of the evils of self-registration. If you use DTF,
you can package multiple assemblies in the same CA DLL, so you should be
able to design a system whereby you don't have to ever depend on anything
except the .NET framework you built against.

3. See the DTF.chm file in your WiX installation's doc folder.

[CustomAction]
public static ActionResult SampleCustomAction1(Session session)
{
session.Log(Hello from SampleCA1);

session[PROPERTYINEED] = My property's value;

if(1 == 1)
{
return ActionResult.Success;
}
else
return ActionResult.Failure;
}


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Thanks!

2009-10-11 Thread Dave Kolb
Thanks to everyone who builds WIX and helps support it, this mailing list
and the documentation and examples!

 

Got my 64 and 32 bit installs running with CA's that dynamically set the
ServiceInstall account and password tags and create registry sources for
my application and two services!

 

Great stuff this WIX is!

 

- Dave Kolb

 

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Thanks!

2009-10-11 Thread Dave Kolb
I installed the service with WIX using the ServiceInstall element. What
snippet are you looking for? - Dave

-Original Message-
From: Jahanzeb Khan [mailto:jk...@commondesk.com] 
Sent: Sunday, October 11, 2009 9:03 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Thanks!

were you able to get this to work completely through CA or did u install the
service through WIX?can u share snipet of code if u were able to do this in
WIX;
 
thnx


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Which way to install a Windows service is best?

2009-10-10 Thread Dave Kolb
I see at least 4 ways my windows service could be installed.

 

My goal is to be able to call some custom code so that I can set the
username and password for the service by looking up and decrypting a value
from the registry. Therefore I do not think that ServiceInstall is an
option. The remaining ways I see to do this are the following and would like
any suggestions on what is best and can fully support install, uninstall,
rollback and commit. Thanks, Dave

 

1.   Run an imbedded installutil.dll like my original MSI file did and
is suggested here
http://avinashkt.blogspot.com/2007/05/how-to-create-installer-using-wix-whic
h.html - this seems complete but if possible I would like to not carry the
baggage of the extra dll in my msi file. Also it seems there are some typos
in the later actions in regards to $TheService2 rather than =2 but maybe
this is correct?

2.   Run installutil.exe from the .net directory as suggested here:
http://www.dalun.com/wix/12.07.2006.htm but I am concerned about having to
worry about that program actually being there and wonder if this method
supports uninstall, commit or rollback.

3.   Ideally I would like to sort of self install by calling a class
method in my service assembly to instantiate the ProjectInstaller class that
is already defined and based on System.Configuration.Install.Installer that
was inserted into my VS service project and references the
System.ServiceProcess assembly. My understanding is this SHOULD be
everything I need to install my service if I can somehow call the code from
WIX. I think this is possible and wonder if this would be the best way to go
as long as I could have actions for supporting install, uninstall, rollback
and commit which I don't understand how WIX supports all that.

4.   Possibly use ServiceInstall something like this
http://avinashkt.blogspot.com/2007/05/how-to-install-windows-service-using.h
tml  if I could earlier run a custom action that looks up a registry entry
and decrypts it for the account and password and then set properties that
would be used by the ServiceInstall element account and password tags.
This CA would have to access my .NET code. And here also, I'm unclear about
how or if WIX supports the additional service actions of uninstall, rollback
and commit as they are not in this example but do seem to be in this one
http://blog.vagmim.com/2004/09/installing-windows-services-created.html
which seems much more confusing to me but is old so maybe wix3 does all that
automagically now.

 

I like idea #3 best only because there is some compatibility with the VS
service project as well as installutil and I already have the code there but
I don't know if that choice is possible or best practice.

 

Thanks for any suggestions and guidance to a WIX newbie, Dave

 

--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Which way to install a Windows service is best?

2009-10-10 Thread Dave Kolb
I would love to but the information I need to look up is actually the
service account and password that goes onto the ServiceInstall element.
Once the service is installed I think it is too late to change this
information. At least I don't know where Windows keeps it, or the format it
is stored in but I suspect in the SAM or whatever it is on a non domain
machine.

What I want to do is run some code before serviceInstall happens so it can
use those two properties my code set somehow or use the traditional VS2008
way using the generated Installer, ServiceProcessInstaller and
ServiceInstaller classes, and look up the username/password in my
ProjectInstaller class based on System.Configuration.Install.Installer that
is called during install which can then set the class'
ServiceProcess.Username and ServiceProcess.Password properties during the
install.

Dave

-Original Message-
From: Dominique Louis [mailto:dominique.lo...@amxeurope.com] 
Sent: Saturday, October 10, 2009 9:24 AM
To: General discussion for Windows Installer XML toolset.;
wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Which way to install a Windows service is best?

Why no use ServiceInstall etc to install the service, but then change the
appropriate user info via the WiX registry calls?

That way MSI is in charge of correctly uninstalling and removing the
appropriate registry settings.

Dominique.

-Original Message-
From: Dave Kolb [mailto:d...@dotnetcodeslingers.com]
Sent: Sat 10/10/2009 8:57 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Which way to install a Windows service is best?
 
I see at least 4 ways my windows service could be installed.

 

My goal is to be able to call some custom code so that I can set the
username and password for the service by looking up and decrypting a value
from the registry. Therefore I do not think that ServiceInstall is an
option. The remaining ways I see to do this are the following and would like
any suggestions on what is best and can fully support install, uninstall,
rollback and commit. Thanks, Dave

 

1.   Run an imbedded installutil.dll like my original MSI file did and
is suggested here
http://avinashkt.blogspot.com/2007/05/how-to-create-installer-using-wix-whic
h.html - this seems complete but if possible I would like to not carry the
baggage of the extra dll in my msi file. Also it seems there are some typos
in the later actions in regards to $TheService2 rather than =2 but maybe
this is correct?

2.   Run installutil.exe from the .net directory as suggested here:
http://www.dalun.com/wix/12.07.2006.htm but I am concerned about having to
worry about that program actually being there and wonder if this method
supports uninstall, commit or rollback.

3.   Ideally I would like to sort of self install by calling a class
method in my service assembly to instantiate the ProjectInstaller class that
is already defined and based on System.Configuration.Install.Installer that
was inserted into my VS service project and references the
System.ServiceProcess assembly. My understanding is this SHOULD be
everything I need to install my service if I can somehow call the code from
WIX. I think this is possible and wonder if this would be the best way to go
as long as I could have actions for supporting install, uninstall, rollback
and commit which I don't understand how WIX supports all that.

4.   Possibly use ServiceInstall something like this
http://avinashkt.blogspot.com/2007/05/how-to-install-windows-service-using.h
tml  if I could earlier run a custom action that looks up a registry entry
and decrypts it for the account and password and then set properties that
would be used by the ServiceInstall element account and password tags.
This CA would have to access my .NET code. And here also, I'm unclear about
how or if WIX supports the additional service actions of uninstall, rollback
and commit as they are not in this example but do seem to be in this one
http://blog.vagmim.com/2004/09/installing-windows-services-created.html
which seems much more confusing to me but is old so maybe wix3 does all that
automagically now.

 

I like idea #3 best only because there is some compatibility with the VS
service project as well as installutil and I already have the code there but
I don't know if that choice is possible or best practice.

 

Thanks for any suggestions and guidance to a WIX newbie, Dave

 


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


AMX

Re: [WiX-users] Which way to install a Windows service is best?

2009-10-10 Thread Dave Kolb
Guten Tag Thorsten and thanks.

I have not built a custom action yet but will look at that approach iff my
custom action can set WIX properties that another custom action or wix
element can use afterwards.

If I can run my CA before the ServiceInstall element then it could just
refer to the properties my CA just set for account and password.

I have not fooled with CA's or sequencing yet but I think this is what I
would need to do. Is this possible? Do I need to use sequencing?

A-run my custom action that sets account and password properties.
B-run ServiceInstall that uses those properties.
C-run a CA to start the service

Or if I cannot run a CA before the ServiceInstall then

A-run ServiceInstall
B-run my custom action that sets account and password properties.
C-run a CA to execute the sc config command to set the account and
password
D-run a CA to start the service

Also, I read something about two passes through custom actions. Is that an
issue?

Will a log of the install show the ServiceInstall output in clear text and
thus show my password as well?

If logging in clear text is an issue, it would be nice if ServiceInstall
could call a custom action directly passing ServiceProcessInstaller object
so that it could be modified at install time.

Any links to building and sequencing a custom action before and after
ServiceInstall would be much appreciated.

Thanks,

Dave

-Original Message-
From: Thorsten Schöning [mailto:tschoen...@am-soft.de] 
Sent: Saturday, October 10, 2009 1:55 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Which way to install a Windows service is best?

Guten Tag Dave Kolb,
am Samstag, 10. Oktober 2009 um 19:24 schrieben Sie:

 I would love to but the information I need to look up is actually the
 service account and password that goes onto the ServiceInstall element.
 Once the service is installed I think it is too late to change this
 information. At least I don't know where Windows keeps it, or the format
it
 is stored in but I suspect in the SAM or whatever it is on a non domain
 machine.

The username to start the service with is saved under
HKLM\CurrentControlSet\Services\xy\ObjectName. Don't know where the
password is saved, would agree to SAM, but maybe you don't need to
change anything manually: How about sc config with parameters obj
and password as a custom action? It's designed to change services
after installation in a proper way and you could depend the custom
action on features or something like that.

Mit freundlichen Grüßen,

Thorsten Schöning


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Which way to install a Windows service is best?

2009-10-10 Thread Dave Kolb
Thanks Blair. I will have a go at using ServiceInstall and running a prior
CA to set properties for it and will avoid any evil self install patterns. I
am confused on how DTF fits into the picture though.

1. Is DTF necessary to run a custom action built with C# managed code?
2. Must I supply my CA with the binary element since you suggest I should
not depend on any files installed yet or can I use one of the assemblies
being installed?
3. Any example of using DTF to build a managed code CA setting a property
that can be used by an element? I've been searching and will continue to do
so but have not really found anything yet.

Thanks again, neat stuff!

Dave

-Original Message-
From: Blair [mailto:os...@live.com] 
Sent: Saturday, October 10, 2009 5:46 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Which way to install a Windows service is best?

If I were you I would use option 4. I would write an immediate CA that
retrieves and decrypts the account and password that I would schedule in
InstallExecuteSequence running sometime before the InstallServices action (I
would probably sequence it before CostInitialize, but that is just me).

That CA you write you should write using DTF if you need to use managed
code. Don't depend on a file you are installing being present in that CA and
don't depend on anything you will be adding to the GAC, which means you may
need to copy your code OR add assemblies to your CA to be used locally as
described in the DTF documentation for creating custom actions.

Each of your other options (including the second part of option 4) are all
forms of self-registration which are considered evil when it comes to
reliably being able to perform upgrades, repairs, rollbacks, removals, etc.
Please don't do them: self-registration is probably the MOST frequent cause
of MSI errors globally.

Professional deployment engineers tend to hate the VS-supplied deployment
solutions because they produce fragile installation packages that cause more
maintenance headaches than the generally solve. They are NOT a good example
to follow.


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Which way to install a Windows service is best?

2009-10-10 Thread Dave Kolb
I did find this
http://blog.torresdal.net/2008/10/24/WiXAndDTFUsingACustomActionToListAvaila
bleWebSitesOnIIS.aspx so think that will suffice for an example to get
started. Any others appreciated though. Apparently DTF supplies the
conventional .dll wrapper msi needs to call managed code. Needs to talk to
out of process .NET through a pipe though huh? Interesting! - Dave

-Original Message-
From: Dave Kolb [mailto:d...@dotnetcodeslingers.com] 
Sent: Saturday, October 10, 2009 6:35 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: RE: [WiX-users] Which way to install a Windows service is best?

Thanks Blair. I will have a go at using ServiceInstall and running a prior
CA to set properties for it and will avoid any evil self install patterns. I
am confused on how DTF fits into the picture though.

1. Is DTF necessary to run a custom action built with C# managed code?
2. Must I supply my CA with the binary element since you suggest I should
not depend on any files installed yet or can I use one of the assemblies
being installed?
3. Any example of using DTF to build a managed code CA setting a property
that can be used by an element? I've been searching and will continue to do
so but have not really found anything yet.

Thanks again, neat stuff!

Dave

-Original Message-
From: Blair [mailto:os...@live.com] 
Sent: Saturday, October 10, 2009 5:46 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Which way to install a Windows service is best?

If I were you I would use option 4. I would write an immediate CA that
retrieves and decrypts the account and password that I would schedule in
InstallExecuteSequence running sometime before the InstallServices action (I
would probably sequence it before CostInitialize, but that is just me).

That CA you write you should write using DTF if you need to use managed
code. Don't depend on a file you are installing being present in that CA and
don't depend on anything you will be adding to the GAC, which means you may
need to copy your code OR add assemblies to your CA to be used locally as
described in the DTF documentation for creating custom actions.

Each of your other options (including the second part of option 4) are all
forms of self-registration which are considered evil when it comes to
reliably being able to perform upgrades, repairs, rollbacks, removals, etc.
Please don't do them: self-registration is probably the MOST frequent cause
of MSI errors globally.

Professional deployment engineers tend to hate the VS-supplied deployment
solutions because they produce fragile installation packages that cause more
maintenance headaches than the generally solve. They are NOT a good example
to follow.


--
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users