Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Registry File Conditional Check

10 views
Skip to first unread message

Sachin

unread,
Jul 15, 2003, 9:10:36 PM7/15/03
to
I am attempting to create an installer using the Windows Installer
product under Visual Studio NET 2003.

I am attempting to read a registry value (DWORD), do a comparison (
greater than or less than) and depending on result, abort install.

Below are my property settings:

Requirements on Target Machine - Search Target Machine - CPUSpeed.

(Name) : CPUSpeed
Property : CPUSPEED
RegKey : HARDWARE\DESCRIPTION\System\CentralProcessor\0
Root : vsdrrHKLM
Value : ~MHz

After I set this, under Launch Conditions I have:

Requirements on Target Machine - Launch Conditions.

(Name) : CPU Speed > 300
Condition : CPUSPEED > 300
InstallURL : // blank
Message : Requires CPU speed greater than 300

One would think this would be a simple task. I have now spent 3
frustrating hours trying to figure out what I could be doing wrong.

If anybody could please respond, I'd much appreciate it.


Sachin Desai

Kallely Sajan

unread,
Jul 16, 2003, 12:50:52 AM7/16/03
to
The registry value you are reading is of DWORD type. When the Installer
reads back the value from registry it will prefix the data by #. Pls read
the Remarks section at
http://msdn.microsoft.com/library/en-us/msi/setup/reglocator_table.asp for
more details.

Run the installer with logging to see the value of the property.
--
Regards,
Sajan.

PS: Please don't send me direct emails, use the newsroom.

"Sachin" <sac...@realityfusion.com> wrote in message
news:2351203f.03071...@posting.google.com...

Sachin

unread,
Jul 16, 2003, 3:08:23 PM7/16/03
to
Thanks for the quick response Kallely.

I am using the Visual Studio UI and still can't comprehend what the
syntax for the conditional should be.

If I understand correctly, The CPUSPEED value contains a DWORD value
#xxx. How would I set the conditional against that? CPUSPEED > #300?

The log file generated the following lines:

<snip>
AppSearch: Property: CPUSPEED, Signature:
__142ED0EED12B4750A584EA383D5D1A49
MSI (c) (90:88): Note: 1: 2262 2: Signature 3: -2147287038
MSI (c) (90:88): Note: 1: 2262 2: CompLocator 3: -2147287038
Action ended 11:51:15: AppSearch. Return value 1.
</snip>

Am I not understanding the process here? Sorry if I am being dense
about this.

Sachin


"Kallely Sajan" <saj...@hotmail.com> wrote in message news:<eQ5S6S1S...@TK2MSFTNGP10.phx.gbl>...

Kallely Sajan

unread,
Jul 16, 2003, 5:37:16 PM7/16/03
to
I think you should write a simple custom action to trim off # from the
returned value and do a numeric comparison. It is not advisable to do a
textual comparison.
0 new messages