ICANIT Posted August 20, 2009 Share Posted August 20, 2009 I have a small problem with CheckOnLoad.I run WPI from a server share, and would like to start WPI in two different ways, and only have one config.js file to maintain.If WPI is called from my RIS setup it should mark those entries with "default=yes" and have the timer on, Install all default applications and reboot the computer.but if started from elsewere, it should have "CheckOnLoad=none" and timer off.I do this:"start wait wpi.hta options:useroptionsRIS.js config=config.js check=xxx timer=60" for my RIS setup, and no parameters when started from anywhere else. (shortcut on desktop)I have tried with the configs[pn] option, and the check=xxx parameter, but it seems that the config.js file overrules the check= parameter. The only way I know of to get this to work is by having two config files, and i dont want that.Maybe if the function "CheckOnLoad" was put back into the useroptions.js file it would do the trick.?Anyone who can understand what I'm trying to say, and help me accomplish my goal? Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted August 20, 2009 Share Posted August 20, 2009 I understand you. The function shouldn't be broken. Can you attach or send me your config.js file so I can try?(I don't use multi def's otherwise I could try it right away) Link to comment Share on other sites More sharing options...
AlBundy33 Posted August 20, 2009 Share Posted August 20, 2009 Yepp - argument check=default definitely does not work.Al Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted August 20, 2009 Share Posted August 20, 2009 (edited) )(*^$%Man I will talk to mritter and see if he can get a fix for it. Edited August 20, 2009 by Kelsenellenelvian Link to comment Share on other sites More sharing options...
mritter Posted August 20, 2009 Share Posted August 20, 2009 (edited) My bad. I forgot to move 2 lines of code. I already fixed it in next version; I was hoping no one would have a problem. Download the attached fixed WPI.hta. Edited August 22, 2009 by mritter Link to comment Share on other sites More sharing options...
ICANIT Posted August 21, 2009 Author Share Posted August 21, 2009 thanks for the effort everyone. :-)I still cant get it to do what i want. in my config file i have "CheckOnLoad=none" but i thought that if i do the Check=default argument, the entries with dflt=yes should be marked and installed.ofcourse if I do "CheckOnLoad=default" in my config file, it works. but then defaults are loaded all the time. just for the test I tried this, and with argument Check=none - defaults are marked.conclusion: the Check= argument doesnt work in version 7.7.0, arguments must be "stronger" than entries in config file or CheckOnLoad should go back to Useroptions.My config file is about 1500 lines and is maintained/fine tuned allmost everyday, so i would rather keep it with only one file. Useroptions however is quite static, so i dont mind having two of those.Thx all :-) Link to comment Share on other sites More sharing options...
AlBundy33 Posted August 21, 2009 Share Posted August 21, 2009 I tried it but afterWPIcmdArgs=argLine.match(regexpSearch);WPIcmdArgs is nullAl Link to comment Share on other sites More sharing options...
mritter Posted August 21, 2009 Share Posted August 21, 2009 I don't know what happened. I am still looking in to it. It gets the command line arg fine, but it is getting set back to default somewhere. I will get figured out............Sorry about that. Link to comment Share on other sites More sharing options...
mritter Posted August 22, 2009 Share Posted August 22, 2009 Holy cow! I figured it out, but that one had me stumped! What a pain!I am going to leave things that way; it makes much more sense having those settings in the config file, not the options file.Download the fix here: Link to comment Share on other sites More sharing options...
ICANIT Posted August 22, 2009 Author Share Posted August 22, 2009 Absolutely beautiful, now it works perfectlyTHX :-) Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted August 23, 2009 Share Posted August 23, 2009 Updated main archive... Link to comment Share on other sites More sharing options...
HOLGER.ONE Posted August 28, 2009 Share Posted August 28, 2009 I have a similar problem with CheckOnLoad. I run WPI with command line args like this: %SOURCE%WPI\wpi.hta check=LOGIN timer=4Till WPI version 7.0 this works always fine. With all newer versions - WPI starts with the timer, but the configuration always is ignored.I found out - when i exclude the "CheckOnLoad" in the config.js: //CheckOnLoad='default';WPI starts correct with the configuration from the command line arg.But after the next use of WPI (when i save a new configuration) the config.js contains again: CheckOnLoad='default'; (without the //)With the newest fix (from post 9) this trick also don't work longer! Please help. I need the start with the configuration from the command line arg. I don't know if this is a bug or what can i do.sorry for my bad englisch - I'm german (vielleicht kann mir jemand in deutsch helfen) Link to comment Share on other sites More sharing options...
mritter Posted August 28, 2009 Share Posted August 28, 2009 Download the latest copy. It will prompt you about updating the config files. Do it. Close WPI. Test from cmd line again. Link to comment Share on other sites More sharing options...
HOLGER.ONE Posted August 29, 2009 Share Posted August 29, 2009 Hello mritter,i download WPI 7.7.0 again. I use my config.js and useroptions.js from 7.0 and update the config and the option files. After the update the Configurations and SortOrder are gone. But that's no problem, i rebuild this manuell.Configurations=['HOTFIX','RUNONCE','LOGIN','MAIN','MANUELL'];SortOrder=['Browser', ....Then i start again from cmd line "wpi.hta check=LOGIN timer=4"The same result, which I describe already. WPI starts with the timer, but the configuration is ignored.When i want to run wpi.hta with cmd-line-args, I think, it is essential, that there is no line with "CheckOnLoad='...'" in the config.jsSo i change one line in the configwizard.js: tf.WriteLine("//CheckOnLoad='" + document.getElementById("CheckOnLoad").value + "';");Restart with "wpi.hta check=LOGIN timer=4"WPI start with the LOGIN configuration, but shown is configuration: default (in german: Standard) To show the configuration i use the WPI.hta Version before you update at Aug 22 2009; which include in line 192: if (checkOL) CheckOnLoad=checkOL;Now the configuration from the cmd line is loaded and shown.I think you understand the problem and change this in the next updatethanks Holger Link to comment Share on other sites More sharing options...
mritter Posted August 30, 2009 Share Posted August 30, 2009 For one, if you read the ChangeLog.txt file you will see I moved the above settings from useroptions.js to config.js so they are specific to that config file. This is needed when have multile configs, like Work and Home, with different Configuration names, but only one useroptions.js.Are you editting the config.js file directly? If so, why?As you can see above: the fix is working. Works for me and Kels.Send me your useroptions.js and config.js files and I will see what is up. 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