Yes, a property is the easiest way to share data between an immediate CA and
the wix code.

It's also possible to temporarily alter the MSI database at install time if
you want Windows Installer to alter the system state for you, such as adding
or changing rows in the registry table. 
http://www.joyofsetup.com/2007/07/01/semi-custom-actions/


-----Original Message-----
From: Natalie Carr [mailto:natalie.c...@measuresoft.com] 
Sent: 14 August 2012 09:49
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Wix C++ variables

Is there a way to use certain variables in your wix code and your c++ dll
functions?

 

extern "C" UINT __stdcall RegProductName(MSIHANDLE hInstall) { HRESULT hr =
S_OK; UINT er = ERROR_SUCCESS; char szLocalPath[MAX_PATH];


hr = WcaInitialize(hInstall, "RegProductName"); ExitOnFailure(hr, "Failed to
initialize");

WcaLog(LOGMSG_STANDARD, "Initialized.");

strcpy(szLocalPath, Orc_Get_Product_Name()); MsiSetProperty(hInstall,
"ProductName",  szLocalPath);

LExit:
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; return
WcaFinalize(er); }

 

That is my code for my custom action, although im not sure if MsiSetProperty
is what I need here, Is it possible what I am trying to achieve? If so does
anyone have any examples on how I would set my variable so that I can access
it in both WIX and the C++ Custom Action?

 

Thanks

 

Natalie 

 

-----------------------------------------------------------------------------
-
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat
landscape has changed and how IT managers can respond. Discussions will
include endpoint security, mobile security and the latest in malware threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to