Jump to content

Check OS and install hotfixes


rokey

Recommended Posts

looking for a good solution... or is this a bug?

i wont use wihu to install hotfixes. i have made an entry in wihu that check the os and then it checks if the hotfix is installed or not.

but i have problem diselect the hotfix when it is not the right os :( have someone made the same with a working solution? or made i a mistake in the install.ini?

here is the install.ini

[Test for Hotfixes]help=help\hotfix.rtf

description.0=Hotfixes WinXP

command.0="command"

test.0.0 = HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentVersion?=5.0

test.eval.0 = 0

Disabled.0 = if.false, inherit

Selected.0 = if.true, inherit

description.0.0=Hotfix 1

command.0.0="command"

test.0.0.0 = HKLM:SOFTWARE\Microsoft\Updates\Windows XP\SP1\Q282784\

test.eval.0.0 = 0

Disabled.0.0 = if.true

Selected.0.0 = if.false

description.0.1=Hotfix 2

command.0.1 ="command"

test.0.1.0 = HKLM:SOFTWARE\Microsoft\Updates\Windows XP\SP2\KB282010\

test.eval.0.1 = 0

Disabled.0.1    = if.true

Selected.0.1 = if.false

description.0.2=Hotfix 2

command.0.2 ="command"

test.0.2.0 = HKLM:SOFTWARE\Microsoft\Updates\Windows XP\SP2\KB814841\

test.eval.0.2 = 0

Disabled.0.2    = if.true

Selected.0.2 = if.false

here is a picture how it looks:

post-90-1097159243_thumb.png

Link to comment
Share on other sites


Hi rokey,

you are testing for "CurrentVersion=5.0" here which only returns TRUE if, and only if you are using Windows 2000. So only if you are using Windows items get selected and enabled.

So once again, if "Hotfixes WinXP" is unchecked then, NONE of it's subitems will be installed although it's subitems may be checked. So dont worry about this. But may be I should modify WIHU for consistency reasons. selected.x = v, inherit should also set it's subitems to "v"

Benjamin

Link to comment
Share on other sites

wow thanks man! the subitems will now be unchecked!! THX

...but i believe there is now an other small bug. if the inherit switch is there, the key check for the subitems will not work an the section will not be unchecked, if the os is ok :( without the inherit switch it works. but without the inherit switch the os check wil not really work, because the subitems will not be disabled :(

Link to comment
Share on other sites

I had to revert changes I made yesterday because this causes some more parsing problems.

Take following example:

[My Section]
test.0.0 = wihu.exe
test.eval.0 = 0
command.0 = ...
description.0 = ...
selected.0 = if.true, inherit
disabled.0 = if.false, inherit

test.0.0.0 = wihu.abc.exe
test.eval.0.0 = 0
selected.0.0 = if.true
command.0.0 = ...
description.0.0 = ...

If we presume that test.eval.0 returns TRUE (wihu.exe) exists, we will select this item. So further we presume test.eval.0.0 will return FALSE. Here is the point. Which state should be set to selected.0.0? If we inherit it from selected.0 (checked) we will check this item although test.eval.0.0 returned FALSE. Othwerwise if test.eval.0.0 would have returned TRUE this item will selected too. This doesn't make any sense.

Benjamin

Link to comment
Share on other sites

I agree, if a sub item doesn't respect the same selection rules than the orignal item, inherit sould not be used, it's just logic.

I got the same problem to differentiate a program installation than the icon removal and the registering. At the end it's more logic to just add a different test per sub item, even is the test is the same for several sub items...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...