TwoJ Posted August 25, 2008 Share Posted August 25, 2008 I've already put a few comments into the wishlist in the sticky section but i wanted to start a new thread for this because it goes a bit beyond wishlistFirst i was really happy to see wpi start to use wmi so that some instllations can be somewhat automatedobviously determining if you have a 32 or 64 bit OS will change some applications as well as language, etc,etcThere is certainly a lot you can use out of the wmi to get info back about the system, but one of the problems is coming up, namely the isInstalled() function, which i'm guessing is the win32_product classI've come across this problem because i deploy software by group policy and occasionally need to do wmi filtering which is the same stuff.The problem is that the stuff in win32_product is only the programs that have used the microsoft installer (msi), so if you have another program like 7zip that uses the nullsoft installer (i think), then it will not register in w32_product. So theres nothing wrong with wpi or the isinstalled(), just that its not going to be complete. You can try isInstalled(7-Zip xxx) and it should return a false even if you have it installed.Personally i would love to have a complete isInstalled function but from what i know it can only be done through wmi & reading the registry (vbs,autoit, etc).As i mentioned in the official wishlist was the capability to have operators like (AND, LIKE, OR) that are available in the wmi scripting, so that you can say something like getOSver==XP AND getOSlang=="ENU" to single out a XP English computerAlso to put in multiple conditions and greyouts, I don't know if this would require a change of the configuration file, but i suspect so, for you guys to decide whats bestenough for now - thanks again for all your workyou guys do great stuff Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted August 25, 2008 Share Posted August 25, 2008 OK looking into the syntax tonight for multiple (getOSver==XP AND getOSlang=="ENU") I know you can already set multpiles just can't remember the syntax off my head...I like instead if isinstalled using the fileexsists statements... Like this --> FileExists('%programfiles%\VMware\VMware Workstation\vmware.exe')Plus you can check files sizez all sorts of different ways to see if an app is installed and disabling\graying out the selection.You can also search for specifice registry keys to see if they exist. Lawrenca is good at that one... Link to comment Share on other sites More sharing options...
TwoJ Posted August 25, 2008 Author Share Posted August 25, 2008 Hi KelThanksI agree that its probably faster to check file sizes or registry keys then to ennumerate the w32_products list each time, but there is a lot of info about the programs that you can read from wmi.Last week i was deploying some software from group policy and you can do a wmi filter on the client so it checks for office (win32_product where Caption LIKE (%Microsoft Office%)), i think that is something like the command - the LIKE and % are wildcards so Microsoft Office XP and Microsoft Office 2003 will both be true. But i also needed to filter by the language of the office, and there is a (win32_product where language = English) or something like that, the probem is that, that function is only available on Vista, it would return a false on WinXP even if it was true.Also perhaps another benifit is that sometimes i am using wpi just to do updates and its nice if you can scan a computer and greyout any versions of software that are current and try to highlight any installers that are more recent on wpi. This is where i think the need for additional condition statements come-in;Maybe instead of having the greyedout option just put it as a choice in the conditional statement, ie;if condition1=true then [option choices]if software1=v1.0.1 then greyedoutif software1<v1.0.1 then (highlight red & Set default tag)if software2=v1.10 & language = ENU then highlight Blueif software2<v1.10 then hightlight gren food for thought, it might be very difficult to implement But that was just to say that there is alot more info about the software installed that might be useful for making choices about which installer to use for WPI.thanks again Link to comment Share on other sites More sharing options...
TwoJ Posted August 26, 2008 Author Share Posted August 26, 2008 While working on the registry entries i was using the Alt-G information window, and i couldn't figure out why the registry entries weren't working, eventually i figured that the double slashes needed to be singles in the GUI. The examples in the info windows were double as they appear in the config file.maybe this could be explained in the info window to help save some keyboards from head dents! 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