Condition and IniFileSearch

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Condition and IniFileSearch

Ansuya Negi
Hi,
I try to read Check.ini file, which lies in Windows directory, and need to check the value of KeyVersion, i.e., "Test". I try to write custom action for this, but it is giving error.

The file is:

[RegTest]
Name=Check
KeyVersion=Test

In WiX,
<Property Id="SEARCH_INI">
      <IniFileSearch Id="SearchIniFile" Type="raw" Name="Check.ini" LongName="Check.ini" Section="RegTest" Key="KeyVersion" Field="1" />
    </Property>

 <Condition Message="You must have Check.ini file. Installation will now abort.">
       
<![CDATA[SEARCH_INI <> ""]]>

 </Condition> 
 
Also, I need to check value of KeyVersion. This code needs Value?
If the KeyVersion is not Test, installation should abort. How to include this?

 <CustomAction Id='CheckKey' Property='SEARCH_INI' Value='Key' Return='ignore' />

 <InstallExecuteSequence>
  <Custom Action='CheckKey' After='InstallFinalize'>NOT Installed</Custom>
 </InstallExecuteSequence>
 
Thanks,
Ansuya


Reply | Threaded
Open this post in threaded view
|

Re: Condition and IniFileSearch

Bob Arnson-6
Ansuya Negi wrote:
> I try to read Check.ini file, which lies in Windows directory, and need to
> check the value of KeyVersion, i.e., "Test". I try to write custom action
> for this, but it is giving error.
>  

What error?

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



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: Condition and IniFileSearch

Ansuya Negi
Hi,
The error is number 2723. It says:

DEBUG: Error 2723:  Custom action CheckKey specifies unsupported type
The installer has encountered an unexpected error installing this package. This may indicate a problem with  this package. The error code is 2723.

I have used,
 <CustomAction Id='CheckKey' Property='SEARCH_INI' Value="Test" Return='ignore' />
 <InstallExecuteSequence>
  <Custom Action='CheckKey' After='InstallFinalize'>NOT Installed</Custom>
  </InstallExecuteSequence>

Do I have to put it before InstallInitialize.
I have also another question. Can the same thing be achieved by (as the value of SERACH_INI is "Test":
 <Condition Message="You must have Check.ini file. Installation will now abort.">
       
<![CDATA[SEARCH_INI <> "Test"]]>

 </Condition> 


Thanks a lot,
Ansuya


Bob Arnson-6 wrote
Ansuya Negi wrote:
> I try to read Check.ini file, which lies in Windows directory, and need to
> check the value of KeyVersion, i.e., "Test". I try to write custom action
> for this, but it is giving error.
>  

What error?

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



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: Condition and IniFileSearch

Bob Arnson-2
Ansuya Negi wrote:

> DEBUG: Error 2723:  Custom action CheckKey specifies unsupported type
> The installer has encountered an unexpected error installing this package.
> This may indicate a problem with  this package. The error code is 2723.
>
> I have used,
>  <CustomAction Id='CheckKey' Property='SEARCH_INI' Value="Test"
> Return='ignore' />
>  <InstallExecuteSequence>
>   <Custom Action='CheckKey' After='InstallFinalize'>NOT Installed</Custom>
>   </InstallExecuteSequence>
>  

That definition sets a property as the installation finishes -- is that
what you're trying to do?

> Do I have to put it before InstallInitialize.
>  

It depends -- what are you trying to do?

> I have also another question. Can the same thing be achieved by (as the
> value of SERACH_INI is "Test":
>  <Condition Message="You must have Check.ini file. Installation will now
> abort.">
> <![CDATA[SEARCH_INI <> "Test"]]>
>  </Condition>
>  

Sounds like it -- have you tried it?

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



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: Condition and IniFileSearch

Ansuya Negi
Thanks for the reply.
I tried to use just the condition message and it did not work. It only aborts installation if it can not find the ini file. This test was to check inside the ini file and read its contents via IniFileSearch. Am I using IniFileSearch correctly.
This custom action again gives this error message (2723) even when I do it after InstallInitialize. The installation needs to be aborted if the value does not match.
Ansuya



Bob Arnson-2 wrote
Ansuya Negi wrote:
> DEBUG: Error 2723:  Custom action CheckKey specifies unsupported type
> The installer has encountered an unexpected error installing this package.
> This may indicate a problem with  this package. The error code is 2723.
>
> I have used,
>  <CustomAction Id='CheckKey' Property='SEARCH_INI' Value="Test"
> Return='ignore' />
>  <InstallExecuteSequence>
>   <Custom Action='CheckKey' After='InstallFinalize'>NOT Installed</Custom>
>   </InstallExecuteSequence>
>  

That definition sets a property as the installation finishes -- is that
what you're trying to do?

> Do I have to put it before InstallInitialize.
>  

It depends -- what are you trying to do?

> I have also another question. Can the same thing be achieved by (as the
> value of SERACH_INI is "Test":
>  <Condition Message="You must have Check.ini file. Installation will now
> abort.">
>
<![CDATA[SEARCH_INI <> "Test"]]>

>  </Condition> 
>  

Sounds like it -- have you tried it?

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



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: Condition and IniFileSearch

Brian Rogers
Hey Ansuya,
 
I have not tried this out but am thinking this is what you are looking to do.
 
<property id="SEARCH_INI">
   <IniFileSearch id="MY_SEARCH_INI" LongName="[MyDir]myfile.ini" Section="MySection" Key="MyKey" Type="raw"/>
</property>
Make sure that you test the property value after it has been set by the action sequence.
 
Hope this helps; let me know!
 
On 8/14/07, Ansuya Negi <[hidden email]> wrote:

Thanks for the reply.
I tried to use just the condition message and it did not work. It only
aborts installation if it can not find the ini file. This test was to check
inside the ini file and read its contents via IniFileSearch. Am I using
IniFileSearch correctly.
This custom action again gives this error message (2723) even when I do it
after InstallInitialize. The installation needs to be aborted if the value
does not match.
Ansuya




Bob Arnson-2 wrote:

>
> Ansuya Negi wrote:
>> DEBUG: Error 2723:  Custom action CheckKey specifies unsupported type
>> The installer has encountered an unexpected error installing this
>> package.
>> This may indicate a problem with  this package. The error code is 2723.
>>
>> I have used,
>>  <CustomAction Id='CheckKey' Property='SEARCH_INI' Value="Test"
>> Return='ignore' />
>>  <InstallExecuteSequence>
>>      <Custom Action='CheckKey' After='InstallFinalize'>NOT
>> Installed</Custom>
>>   </InstallExecuteSequence>
>>
>
> That definition sets a property as the installation finishes -- is that
> what you're trying to do?
>
>> Do I have to put it before InstallInitialize.
>>
>
> It depends -- what are you trying to do?
>
>> I have also another question. Can the same thing be achieved by (as the
>> value of SERACH_INI is "Test":
>>  <Condition Message="You must have Check.ini file. Installation will now
>> abort.">
>>      <![CDATA[SEARCH_INI <> "Test"]]>
>>  </Condition>
>>
>
> Sounds like it -- have you tried it?
>
> --
> sig://boB
> http://joyofsetup.com/
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>   http://get.splunk.com/
> _______________________________________________
> WiX-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>

--
View this message in context: http://www.nabble.com/Condition-and-IniFileSearch-tf4251162.html#a12148268
Sent from the wix-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>   http://get.splunk.com/
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users



--
Brian Rogers
"Intelligence removes complexity." - BR
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: Condition and IniFileSearch

Bob Arnson-6
In reply to this post by Ansuya Negi
Ansuya Negi wrote:
> I tried to use just the condition message and it did not work. It only
> aborts installation if it can not find the ini file. This test was to check
> inside the ini file and read its contents via IniFileSearch. Am I using
> IniFileSearch correctly.
>  

I'm not clear what you're trying to do. I suggest capturing a verbose
log (using /l*vx) to capture property changes so you can see what MSI
detects during the AppSearch action.

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



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users