sputnik089 Posted April 17, 2012 Posted April 17, 2012 Hi,how could I automatically select an item (checkbox checked) depending on a fileexists().Scenario:I run a software to check if there is an update available for a specific program, if yes, it creates a flagfile.If I start WPI, I want to see all the available installs, but the ones where there exists a flagfile I would like to have checkmarked right after WPI was started.For example:If there is a file %wpipath%\flags\firefox_flg.txt I would like to have Firefox to be checkmarked in the selection right away.The other available installs should be listed but not checkmarked for selection by default (because they are not recommended to be done). If the user then would like to install Thunderbird in addition, he could just select that on his own.Sorry, it´s hard to describe for me in English ...Thanks for all your help,Sputnik089
Kelsenellenelvian Posted April 21, 2012 Posted April 21, 2012 There is a very expansive area in the conditions tab of the config wizard..
sputnik089 Posted August 5, 2012 Author Posted August 5, 2012 Hi Kel,sorry to come back to this, but I think you did not understand my question/problem.I checked the conditions tab: When the condition is true it will show the program to be installed on the selection list, if the condition is false it will not even show the program at all (like does not exist).I checked the "Grayed condition": When the condition there is true the program to be installed will be displayed, but the option to select (install) that is grayed out, so the user could not install the program at all, which is very useful, but will not solve my problem, because:I want to display all items (the complete list) and want to use the conditions to set or not set the checkmark (not the item).The user should see all programs (none of them grayed out) and should be able to change the proposed (default) selection that I would like to get from flag files or registry keys.With your conditions I could change the appearance of he line itself (or gray it out) but not the default checkmarks.The only way I know right now to get closer to what I would need is to change the config.js file and have a unique configs[pn] section, but to change the config.js file every time (for every update level for example) is a lot of work.My idea is like:If FileExists("%wpipath%\flags\firefox_flg.txt") or "HKEY_CURRENT_USER\Software\WPI\Apps\Thunderbird_Install")=="1" DefaultSetCheckMark = TRUEElse DefaultSetCheckMark = FALSEEndIfThanks for all your help,Sputnik089
Kelsenellenelvian Posted August 5, 2012 Posted August 5, 2012 Is this for business or corporate uses?
sputnik089 Posted August 5, 2012 Author Posted August 5, 2012 What´s the difference between those two?For now I am still testing WPI@home - no I am not at work on Sundays :-)I am looking for a way to:Install Windows7 unattended (WinToolkit)download sources (wsusoffline update & Ketarin)Install Windows Updates & Apps & RegTweaks (both wsusoffline update and WPI)or if PC is installed since years (like mine)check for necessary Updates (Filehippo Updatechecker) or own database andInstall necessary Updates (WPI)To deal with the data I am thinking of a sqlite database (ketarins database extended) or registry keys, that´s where my question comes from.If I succeed in doing all this and will use this for a non friend (= customer) I will let you know.If there is no way with those checkmarks please let me know and see my thread as a suggestion for future development.Thanks again.
Francesco Posted August 5, 2012 Posted August 5, 2012 You can't put a condition for the checkbox value but you can put one to disable the checkbox or hide it. If you use WPI to install updates you can use conditions to hide the entries if the application on WPI is equal or older than the one installed on the system.
sputnik089 Posted August 5, 2012 Author Posted August 5, 2012 Thanks you Francesco,that´s what my testing of WPI discovered.So I probably have to test it with the configs[pn] section and put all to a specific config_datetime.js file.Like for the recommended update: configs[pn]=['datetime'] and then start wpi withwpi.exe config=config_datetime.js check=datetimeLets see.Thanks a lot!
Kelsenellenelvian Posted August 5, 2012 Posted August 5, 2012 The difference is WPI is not free for business or corp uses and you mention ALLOT of thing in your second post that made\makes it seem like you are using it in that setting.
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