Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Does 'Set windows installer property' works on Windows 7 ?

Updated: 21 May 2010 | 8 comments
Walter vd Sloot's picture
0 0 Votes
Login to vote
This issue has been solved. See solution.

Hi,

In my WIS7.0 script I'm using an action 'Run Wisescript from Installation"
In this sub-script I read the windows version from the Registry in "SOFTWARE\Microsoft\Windows NT\CurrentVersion  value: CurrentVersion for check on Vista / Win7 because my installation must be canceling on these platforms.
The results are 5.1=XP  6.0=Vista 6.1=Windows7
these numers will be shown in a debug Message Box on ALLE THREE Windows versions, this works correct !!

After checking this number in a Parse string left/right and  If...then greater than or equal 6 ,  I start the action "Set Windows Installer Property VISTA  to 1' (see code below)
for debug, i made a display message INSIDE the if...then >=6 to be sure these check is ok
In both 6.x versions (6.0 and 6.1) the script is running the If...then  this works correct

BUT:
Back in the main script of WIS 7:
here i check the property VISTA and:
must be 0 in XP, this works correct
must be 1 in VISTA, this works correct
must be 1 in WINDOWS7, this is NOT OKE, the property is 0 !!!

code sub-script:
Parse String "%WIN_VERSION%" into WINLEFT and WINRIGHT
Display message %WIN_VERSION%, %WINLEFT%, %WINRIGHT%
If WINLEFT greater than of equal "6" then
    Display message "i am inside the if"        ....................................FOR SO FAR EVERYTHING WORKS FINE, ALSO ON WINDOWS 7  !!!!!
    Set Windows Installer Property VISTA to 1
End

code mainscript:
Display message [VISTA]    ................... 0 on XP, 1 on VISTA, 0 on Windows7 !!!!!
If VISTA=1 then
   Cancel installation   ....................................ON WINDOWS 7 THERE IS NO CANCELING !!!!!!!!!!
End

Comments

EdT's picture
23
Nov
2009
0 Votes 0
Login to vote

Try setting the Windows

Try setting the Windows Installer property [VISTA] to 1 explicitly in the Wisescript and then see if the mainscript works properly. This will immediately tell you whether the set Windows Installer property command works correctly on Windows 7.
If this test works, I suggest you try changing the test logic to test if %WIN_VERSION% is LESS THAN 6, and explicitly set the VISTA property to 0, otherwise set it explicitly to 1

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Walter vd Sloot's picture
23
Nov
2009
0 Votes 0
Login to vote

EdT, test without if

EdT, i have set the Windows Installer Property directly to 1 (without the if...then)
but result is still 0

In Vista, the result is 1

EdT's picture
23
Nov
2009
0 Votes 0
Login to vote

Try VBScript

The tests you are making are quite easy to code in vbscript, so I would recommend you try this instead of wisescript. You may well be correct that Windows 7 behaviour is somehow different - it is using Windows Installer V5 for a start.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Walter vd Sloot's picture
25
Nov
2009
0 Votes 0
Login to vote

Run WiseScript is not always working in Windows 7

I've test some situations:

old situation:
In my mainscript (A) is an action 'Run WiseScript from Installation'
In this WSE sub-script (B), I called again some 'WSE Include scripts' (C,D,E,F,G)

This works fine in all Windows OS, but not in Windows 7
C,D,E,F,G are working in B but the simply "Set Windows Installer Property" after the includes in the WiseScript B does NOT work

When i delete all includes, the "Set Windows Installer Property" works in the WiseScript B

Solution:
Now I have put the "Set Windows Installer Property" directly in the include script G and call G as a 'Run WiseScript from Installation' (BB) , directly in the mainscript (A) after the first call 'Run WiseScript from Installation' (B)

Its verry strange, but now it works with this workaround.
Windows 7 (Windows installer 5) cannot work with many (deep) includes

EdT's picture
24
Nov
2009
0 Votes 0
Login to vote

Are you running SP1 ?

You did not mention that you were using include scripts in your Wisescripts. There is a known bug with include scripts which you can find in the Altiris knowledgebase - http://kb.altiris.com.
What I cannot recall is whether this was fixed in SP1 or via a hotfix, but the KB should tell you.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Walter vd Sloot's picture
25
Nov
2009
0 Votes 0
Login to vote

The problem is not in a

The problem is not in a include script in my WiseScript (i've changed my soultion a little)
All include scripts are working, but the "if..then" (AFTER some includes) to Set the Windows Installer Property does not work (in the WiseScript)
When I delete some include script, this if...then, and Set Windows Installer Property works.

I have searched for this, but in Article ID: 35236 (Wise Installation Studio/Express 7.x Hotfix Summary) there is no fix or error mentioned

My Version is WIS 7 SP1

AngelD's picture
25
Nov
2009
0 Votes 0
Login to vote

When you mentioned include

When you mentioned include and the If statement I remembered we had a similar issue along time ago regarding If Else.
Maybe the same will apply for you, check out KB Article: 27819

Walter vd Sloot's picture
25
Nov
2009
0 Votes 0
Login to vote

Not my problem

I had read this KB
My problem was an other   (and I'm working with SP1)

MainScript
Run WiseScript-1 from installation :
        Include Script include1.wse (other function)
        Include Script include2.wse (other function)
        Include Script include3.wse (check WINversion)
        If WINversion Equals "6" then
             Display message "I'am inside the if"                      !! working
             Set Windows Installer Property VISTA to 1            !! NOT working
       End
Property VISTA = 0

MainScript
Run WiseScript-2 from installation :
       Include Script include1.wse (other function)
       Include Script include2.wse (other function)
       Include Script include3.wse (check WINversion)   INCLUDING the If...then + Set Windows installer property VISTA to 1)              !! not working
Property VISTA = 0

MainScript
Run WiseScript-2 from installation :
       Include Script include1.wse (other function)
       Include Script include2.wse (other function)
Run WiseScript-3 from installation (check WINversion)   INCLUDING the If...then + Set Windows installer property VISTA to 1)              !! working
Property VISTA = 1