Jump to content

mritter

Member
  • Posts

    1,094
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by mritter

  1. OK. Did some more testing with actual programs. No, it wasn't working the way I thought. Do this:

    {JSCRIPT}=if (getOSlang()=="ENU" && (getOSver()=="XP" || getOSver()=="Vista")) RunCmd("notepad.exe",true,false)

    The second arg is to show output or not. Usually this will be true.

    The last arg is the wait option:

    true: will wait for program to finish

    false: will not wait for program to finish

    No need to specify {RUNBG}, change the last arg in RunCmd().

    Sorry for the confusion.

  2. @mba2049:

    I never thought of it that way. I did some quick tests and it can be done:

    {JSCRIPT}=if (getOSver()=="XP") msiexec.exe /i "%wpipath%\Install\required\IE8\IE8-Setup-Full XP EN.msi" /qb

    {JSCRIPT}=if (getOSver()=="Win7") msiexec.exe /i "%wpipath%\Install\required\IE8\IE8-Setup-Win7.msi" /qb

    You may have to do some tweaking with the quotes. All I did for a test was:

    {JSCRIPT}=if (getOSver()=="XP") alert("XP!")

    You can call any JavaScript or WPI functions with {JSCRIPT}. Be careful with it.

  3. This idea has been on my To Do List for quite some time now. It would make things alot easier to just make folders for each category, then sub folders for each item.

    The major issue would be when there are either multiple .exe's, and/or .bat or .cmd files. Which one is the one to use?

    Whimsy and I talked a bit,and we came up with an idea to use .ini files. Something for the future......................

  4. Just posting a little note that v8.0.0 is coming along very nicely. The amount of new features is HUGE. I still have some things on my To Do List that I want to get done before I release it. It will still be another month or two. But it will be well worth the wait.

  5. icnocop:

    cmd /c taskkill /? >c:\taskkill.txt

    and update this function in core.js

    function ReplacePath(v)
    {
    position="core.js";
    whatfunc="ReplacePath()";

    var i, rs=new String(v);

    rs=rs.replace(/%wpipath%/gi, wpipath); // Replace WPI's special environment variables
    rs=rs.replace(/%root%/gi, root); // WPI parent folder

    if (hdd=="")
    rs=rs.replace(/%cdrom%/gi, cddrv); // started from cdrom
    else
    rs=rs.replace(/%cdrom%/gi, hdd); // not started from cdrom

    rs=rs.replace(/%sysdir%/gi, sysdir); // same as before
    rs=rs.replace(/%dospath%/gi, dospath); // new variable
    rs=rs.replace(/%oslang%/gi, oslang); // operating system language code
    rs=rs.replace(/%userprofileroot%/gi, userprofileroot); // root of user folders

    rs=rs.replace(/%comma%/gi, ','); // Put a comma in command line
    rs=rs.replace(/&/gi, '&'); // Put an ampersand in command line
    rs=rs.replace(/>/gi, '>'); // Put a greater than in command line

    // Replace other (standard) environment variables (either global or defined in the process calling WPI)
    var envarname, envvars=rs.match(/%[^ %\f\n\r\t\v]+%/gi); // find ALL substrings enclosed in '%' and not containing '%' itself or a white space character
    if (envvars) // if any match
    {
    for (i=0; i<envvars.length; i++) // loop on the matches
    {
    envarname=envvars[i].substring(1, envvars[i].length - 1); // strip the match from its enclosing '%'
    rs=rs.replace(envvars[i],WshEnv(envarname)); // replace it by the corresponding env var
    }
    }

    return rs;
    }

  6. Yeah, the Load button issue slipped through. They are fixed now.

    HTA: I didn't create WPI, just took over the programming 3+ years ago. It was just a "simple" script when first created, but I have done my best to advance it. By being an HTA it doesn't have to run in a browser, can use more Windows' features than just plain JavaScript can. An HTA can do just about anything a compiled program can. And it has always been open source.

  7. 1) Right now it does not take this into account. I will make it do as you suggested. Good idea.

    2) No. You would have to either numerically or alphabetically make an entry with {REBOOT} the first in the category.

    3) If you can tell me what reg keys to watch I can look into it.

    4) Honestly, I forget. My install doesn't require a reboot. Anyone?

×
×
  • Create New...