Why not just create a new project and select the C++ Custom Action
Project under Windows Installer XML. That will get you a project with
the proper setup in place.

-----Original Message-----
From: Kevin Hebert [mailto:ke...@legendary-immersion.com] 
Sent: Wednesday, November 23, 2011 10:15 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom Action to verify input

Just attempted to add the wcautil_2010.lib as a reference, but it failed

saying it wasn't a proper WiX library.  I'll keep working on how to 
figure this out.  Thanks for bearing with me.  Feeling very under the 
weather today, so I'm not even at 85%.

On 11/23/2011 9:52 AM, Hoover, Jacob wrote:
> But the Wca wrappers come with WiX. Since you are using WiX for the
UI,
> I assume your CA build machine would have WiX installed. Worse case,
you
> could download the WiX source and include the lib source directly in
> your project (I don't think there would be any licensing issues
there).
>
>
> -----Original Message-----
> From: Kevin Hebert [mailto:ke...@legendary-immersion.com]
> Sent: Wednesday, November 23, 2011 9:39 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Custom Action to verify input
>
> It's probably cause I'm posting via the forums directly, and not using
> email.  And the only way to post code without it looking silly is to
do
> raw text.
>
> The reason I'm not using Wca wrappers is that I was told I had to work
> with what I've got.  I can't install any other frameworks or anything
to
>
> help me out.  As for the suggestion of the messagebox not being inside
> the custom action, I'll again point to my newbness.  I'm not sure how
to
>
> do that, but I'll start looking into it.  Thank you.
>
> On 11/22/2011 11:12 AM, Hoover, Jacob wrote:
>> Argh,
>>     Having issues getting this right because I have to keep going to
>> nabble to see your posts. (Maybe you are sending rich HTML, but
>> something is causing the emails I get from the list to be blank.)
>>
>> You are still using a message box inside of your custom action, which
> I
>> would strongly urge against doing. (I believe a silent install that
is
>> automated would hang.)
>>
>> I also see you aren't adding in the Wca wrappers. Is there a reason
> for
>> this?
>>
>> // Custom Action
>> UINT __stdcall VerifyUserInformation(
>>       __in MSIHANDLE hInstall
>>       )
>> {
>>
>>      LPWSTR userName = NULL;
>>      LPWSTR email = NULL;
>>       HRESULT hr = S_OK;
>>      UINT er = ERROR_SUCCESS;
>>
>>       hr = WcaInitialize(hInstall, "VerifyUserInformation");
>>      ExitOnFailure(hr, "Failed to Initialize");
>>      
>>      hr = WcaSetProperty(L"UserInfoError", L"");
>>      ExitOnFailure(hr, "Failed to initialize UserInfoError");
>>      
>>      if (WcaIsPropertySet(L"UNAME"))
>>      {               
>>              hr = WcaGetProperty(L"UNAME", userName);
>>              ExitOnFailure(hr, "Failed to get UNAME.");
>>              WcaLog(LOGMSG_VERBOSE, "UNAME is %ls.", userName);
>>      }
>>      
>>      if (WcaIsPropertySet(L"EMAIL"))
>>      {
>>              hr = WcaGetProperty(L"EMAIL", email);
>>              ExitOnFailure(hr, "Failed to get EMAIL.");
>>              WcaLog(LOGMSG_VERBOSE, "EMAIL is %ls.", email);
>>      }
>>      
>>      if(wcslen(userName) == 0)
>>      {
>>              hr = WcaSetProperty(L"UserInfoError", L"Please enter
>> your name.");
>>              WcaLog(LOGMSG_VERBOSE, "Please enter your name.");
>>      }
>>      else if(wcslen(email) == 0)
>>      {
>>              hr = WcaSetProperty(L"UserInfoError", L"Please enter
>> your email address.");
>>              WcaLog(LOGMSG_VERBOSE, "Please enter your email
>> address.");
>>      }
>>
>> LExit:
>>      ReleaseStr(userName);
>>      ReleaseStr(email);
>>       if (FAILED(hr))
>>       {
>>           er = ERROR_INSTALL_FAILURE;
>>       }
>>       return WcaFinalize(er);
>> }
>>
>> <Publish Event="DoAction" Value="verifyUserInformation" Order="1">
>> 1</Publish>
>>
>> <Publish Event="SpawnDialog" Order="2"
> Value="AccountVerifiedFailedDlg">
>> <![CDATA[ UserInfoError ]]>
>> </Publish>
>>
>> <Publish Event="NewDialog" Order="3" Value="PassDlg">
>> <![CDATA[ NOT UserInfoError ]]>
>> </Publish>
>>
>> Note, the SpawnDialog call intent was to spawn a custom error dialog
> to
>> display your error message.  If you are trying to SpawnDialog the
> exact
>> same dialog that you pressed next on you won't get the expected
> result.
>> With this, you could still do a spawn dialog, or you could include an
>> additional static text control on the same dialog and then remove:
>>
>> <Publish Event="SpawnDialog" Order="2"
> Value="AccountVerifiedFailedDlg">
>> <![CDATA[ UserInfoError ]]>
>> </Publish>
>>
>> Make the static text then consume the UserInfoError property. (Note,
I
>> vaguely remember needing setting a property to itself in a publish
>> sequence to get the dialog to update.)
>>
>>
>> -----Original Message-----
>> From: Hoover, Jacob [mailto:jacob.hoo...@greenheck.com]
>> Sent: Tuesday, November 22, 2011 9:54 AM
>> To: General discussion for Windows Installer XML toolset.
>> Subject: Re: [WiX-users] Custom Action to verify input
>>
>> The property name alone only tests to see that the property is
> assigned.
>>           <Publish Event="SpawnDialog" Order="2"
>> Value="ConfigDlg">UserInfoVerified</Publish>
>>             <Publish Event="NewDialog" Order="3" Value="PassDlg">Not
>> UserInfoVerified</Publish>
>>
>>
>> should be
>>
>>           <Publish Event="SpawnDialog" Order="2"
>> Value="ConfigDlg">UserInfoVerified ~= "TRUE"</Publish>
>>             <Publish Event="NewDialog" Order="3" Value="PassDlg">
>> (UserInfoVerified ~= "FALSE")</Publish>
>>
>> -----Original Message-----
>> From: AxiomaticImpact [mailto:ke...@legendary-immersion.com]
>> Sent: Monday, November 21, 2011 2:30 PM
>> To: wix-users@lists.sourceforge.net
>> Subject: Re: [WiX-users] Custom Action to verify input
>>
>>
>>
>> --
>> View this message in context:
>>
>
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Custom-Act
>> ion-to-verify-input-tp7004942p7017845.html
>> Sent from the wix-users mailing list archive at Nabble.com.
>>
>
------------------------------------------------------------------------
>> ------
>> All the data continuously generated in your IT infrastructure
>> contains a definitive record of customers, application performance,
>> security threats, fraudulent activity, and more. Splunk takes this
>> data and makes sense of it. IT sense. And common sense.
>> http://p.sf.net/sfu/splunk-novd2d
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>
>
------------------------------------------------------------------------
>> ------
>> All the data continuously generated in your IT infrastructure
>> contains a definitive record of customers, application performance,
>> security threats, fraudulent activity, and more. Splunk takes this
>> data and makes sense of it. IT sense. And common sense.
>> http://p.sf.net/sfu/splunk-novd2d
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>
>
------------------------------------------------------------------------
> ------
>> All the data continuously generated in your IT infrastructure
>> contains a definitive record of customers, application performance,
>> security threats, fraudulent activity, and more. Splunk takes this
>> data and makes sense of it. IT sense. And common sense.
>> http://p.sf.net/sfu/splunk-novd2d
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>
>


-- 
Kevin Hebert


------------------------------------------------------------------------
------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to