kof94 Posted July 8, 2006 Share Posted July 8, 2006 I wish to blank all installations if Windows 2000/XP/2003 is not found.I was reading an old thread about using GetOSver to disable an installation though Condition. I was wondering weather this has been implemented in v5.1 and if so how to use it.I'm a complete n00b when it comes to java scripting so please be precise.Thanks Link to comment Share on other sites More sharing options...
kof94 Posted July 8, 2006 Author Share Posted July 8, 2006 (edited) deleted Edited July 13, 2006 by kof94 Link to comment Share on other sites More sharing options...
kof94 Posted July 13, 2006 Author Share Posted July 13, 2006 (edited) Ok, I've been trying to get this to work using this:gcond[pn]=['(getOSver()=="2K" || getOSver()=="XP" || getOSver()=="03")'];But it's greying out the selections in XP, what am I doing wrong?If I use a combination I get no problem.gcond[pn]=['(getOSver()=="2K" || getOSver()=="XP" || getOSver()=="03") && !FileExists(\'%Systemroot%\\system32\\drivers\\sptd.sys\')'];I am sorry but I really don't know what I'm doing wrong , help pleeeeeeeeeeeeeeaaaaaaaaaaaaaaase. Edited July 13, 2006 by kof94 Link to comment Share on other sites More sharing options...
Djé Posted July 13, 2006 Share Posted July 13, 2006 Well, as you put it, the condition means:"if OS is 2K, XP or 03, THEN grey it out".Your item is greyed out in XP BECAUSE the condition is met!In facts it's working the other way around what you're thinking it is.Good news, tho, you just have to reverse it! :gcond[pn]=['!(getOSver()=="2K" || getOSver()=="XP" || getOSver()=="03")'];orgcond[pn]=['!(getOSver()=="2K" || getOSver()=="XP" || getOSver()=="03") || !FileExists(\'%Systemroot%\\system32\\drivers\\sptd.sys\')']; Link to comment Share on other sites More sharing options...
oneless Posted July 13, 2006 Share Posted July 13, 2006 for me, for your need , the simply way is to use cond (vs gcond)if cond is false , WPI do not show the entry ,so if you do not see it , you cannot check it ...sample here, for a critical hotfix for XPcond[pn]=['getOSver()=="XP" && FileExists("%wpipath%\\_WPIapp\\_XP32\\Hotfixes_Critical\\KB873339.exe") && FileExists("%windir%\\Debug\\KB873339.log")'];if os is DIFFERENT THAN XP , WPI hide this entry .for me gcond is good to know if the entry is already installed.gcond only change the color for me (good thing also) .maybe you must look for the operators :== equal!= not equal&& and|| or! not .... those i usei dont know all of them , maybe this kind of list can be helpful for all of us...? kel ? i am sure you can help us with this ? a complet list of operators , variables..(some of us are not friends with applets,scripts... java, html.....) Link to comment Share on other sites More sharing options...
kof94 Posted July 13, 2006 Author Share Posted July 13, 2006 Thanks guys I've been trying to figure this out for days. Problem solved . Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now