Jump to content

CheckOnLoad


Recommended Posts

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


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 by mritter
Link to comment
Share on other sites

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

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

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

I have a similar problem with CheckOnLoad. I run WPI with command line args like this: %SOURCE%WPI\wpi.hta check=LOGIN timer=4

Till 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

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.js

So 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)

post-258422-1251582386_thumb.png

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.

post-258422-1251582353_thumb.png

I think you understand the problem and change this in the next update

thanks

Holger

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...