BlueLabel Posted January 1, 2005 Share Posted January 1, 2005 Working through the night trying to get the unattended CD/DVD I'm trying to setup I ran into a limitation of WPI and pulled together an enhancement that others might find of use:My problem is that I want to create a single DVD that brings up WPI, but only with certain applications available to install. Why? In my case, it's hardware-specific information, but it can be almost any reason. The attached version of WPI, which for simplicity I'll dub WPI-BL, adds a new entry in the Config screen for each application called 'Condition' that expects a Javascript statement. When generating the menu, WPI will evaluate the condition -- if it evaluates to true (1) then it's displayed...if it evaluates to false (0) then the entry won't appear on the menu.As a practical example:fso.FileExists("%windir%\\System32\\Drivers\b57xp32.sys") || fso.FileExists("%windir%\\System32\\Drivers\\bcm4sbxp.sys")This will check to see if (in this case) the Broadcom Ethernet drivers are installed in the system. I have attached to an entry that installs the Broadcom Advanced Diagnostics for Windows. Installing this (or even making it an option) just doesn't make sense on a system that doesn't have the right network card.fso.FileExists("%windir%\\System32\\atiddc.dll")This checks to see if the ATI drivers are installed...I have this condition attached to an entry to install some ATI-specific software. In my environment, I need a swiss army knife installation CD -- I know what all the hardware combinations are and rather than be inundated with options for things that don't make sense on the machine I'm on at the moment, we just hide them...but I still have all the convinience of keeping a single image to maintain.Enjoy...WPI_BL.zip Link to comment Share on other sites More sharing options...
Astalavista Posted January 1, 2005 Share Posted January 1, 2005 aren't u using bashrat's device drivers? it automatically installs drivers but your work is appreciated. Link to comment Share on other sites More sharing options...
BlueLabel Posted January 1, 2005 Author Share Posted January 1, 2005 aren't u using bashrat's device drivers? it automatically installs drivers but your work is appreciated.No, I'm not...but the drivers themselves aren't the issue. All the drivers do, in fact, get installed automatically. That's not what I was originally trying to do. There are certain hardware-specific applications that I was interested in.In my situation, I've got several Dell laptops to contend with that are different models and have different hardware configurations. The ASF Management and Broadcom Diagnostics applications, for instance, will only work if the system in question has a Broadcom card in the first place. This isn't a driver question -- the drivers are in fact already installed and working just fine.Another example, that's relevant for me -- some of these laptops have NVidia cards and some have ATI cards. Again, the drivers get installed fine...but what I want to do is also have the option to install tweaks/tools based on which card is in the system, so conceptually I do:if(This machine has an NVidia card) { Add menu entries for NVDVD, NVHardPage, GeForceTweakUtility, etc.}if(This machine has an ATI card) { Add menu entries for ATI Tray Tools, etc...}The hardware selection aspect is just one example (the one I happened to use the most so far in my builds). You can also do funky things like (on Dells and other systems that have a service/asset tag accessible) make menu options available only on certain specific machines.Another use I've had for this functionality already is not making applications with a large footprint available if the hard drive is below a certain size, for instance.I'm sure everyone here whose had a lot more sleep than I have will come up with infinitely more ways to use the functionality provided. Hope this helps... Link to comment Share on other sites More sharing options...
Wile.E Posted January 2, 2005 Share Posted January 2, 2005 Sounds very interesting to me. Especially for installing the Ati Drivers.Have to do some test.Maybe Hasi could put it into the final version. Link to comment Share on other sites More sharing options...
hasi001 Posted January 2, 2005 Share Posted January 2, 2005 This I'll do for sure.Nice changes BlueLabel. Cool enhancement. I'll replace the cons-property with your cond-property, since it's more useful.Changes will be included in next WPI version (this week). Link to comment Share on other sites More sharing options...
Wile.E Posted January 5, 2005 Share Posted January 5, 2005 Do somebody have more examples to use it with wpi? Link to comment Share on other sites More sharing options...
hasi001 Posted January 5, 2005 Share Posted January 5, 2005 See here. Link to comment Share on other sites More sharing options...
BlueLabel Posted January 11, 2005 Author Share Posted January 11, 2005 This I'll do for sure.Nice changes BlueLabel. Cool enhancement. I'll replace the cons-property with your cond-property, since it's more useful.Changes will be included in next WPI version (this week).Sorry I've been a bit indisposed...glad to see it incorporated and that it's of some use. Hasi -- nice example usage. I might have a few examples to post in short order that others might find of use.Is there a 'script repository' or perhaps a 'cond repository' thread anywhere? Or do we just let folks search and stumble upon it? Link to comment Share on other sites More sharing options...
hasi001 Posted January 11, 2005 Share Posted January 11, 2005 no - but people would happy, if you'd open one to spare them searching Link to comment Share on other sites More sharing options...
ankap Posted January 13, 2005 Share Posted January 13, 2005 Please insert statements to check if registry key and value exists or equals smth. Link to comment Share on other sites More sharing options...
hasi001 Posted January 13, 2005 Share Posted January 13, 2005 Good idea. Next version. Will take a while. 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