Whenever I see someone trying to do something that a built-in action does
quite well, I recommend this concept:
http://www.joyofsetup.com/2007/07/01/semi-custom-actions/

Why reinvent the wheel? Windows Installer does a fantastic job writing
registry entries and removing them later on under all sorts of variable
influences. Custom actions that add temporary rows to built-in tables gives
you the flexibility to deal with whatever is your reason for making a custom
action that writes entries in the registry to begin with (assuming you can't
do this some other way using component conditions, features, or some other
basic elements of WiX).

-----Original Message-----
From: Kurt Jensen [mailto:kurt.jen...@ophir-spiricon.com] 
Sent: Thursday, July 01, 2010 8:33 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Windows 7 Custom Action Registry problem

I have a custom action that needs to create entries in the registry
under HKEY_LOCAL_MACHINE.  The code is written in C# and uses
Registry.LocalMachine.CreateSubKey().  I added some logging that tells
me that the return value is not null and the custom action does not
throw an exception.  But the key is never created.  What is really weird
is that various functions are called that use OpenSubKey().  These
functions also log correct return values and do not throw exceptions.
But the key is never created.  

 

The custom action works fine in XP but fails in Windows 7.  I am running
the custom action with Impersonate="no".

 

 

Kurt Jensen

Senior Software Engineer

Ophir-Spiricon

www.Ophir-Spiricon.com <http://www.ophir-spiricon.com/> 


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.clearswift.com
**********************************************************************


----------------------------------------------------------------------------
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to