Jump to content

lawrenca

Member
  • Posts

    129
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by lawrenca

  1. faaip565,

    Tough question given the way this program installs...

    Could possibly set a flag (whether in registry or file) that would key a conditional statement within the wpi.exe file (I think the source is contained within the Tools folder now. It would definately have to be a custom job with modifications. Probably better solutions, just not sure of how to make them not seen.

  2. One other observation I overlooked:

    Will add support for debug in generate.js

    if (!debugOn)

    Just before the line to launch kTool.exe

    WshShell.Run(kTool_exe, 1, true);

    Also, sounds like the change from writing ktool.ini to the system32 directory worked for Yurek3 in the early stages of install, can make that mod as well to change the location if there is no objection.

    Results at this post...Thanks Yurek3, I would not have caught that!

    http://www.msfn.org/board/index.php?s=&sho...ndpost&p=462388

  3. My msi installs seem to be working O.K. so far with the "msiexec /i" used but will take another look.

    The items I added in the generate.js file to write kTool.ini is only one specific command..."RunWait" which seemed to translate into most of the commands used to install applications.

    There are other commands available to kTool, like:

    1. RunWait="command"

    2. Run="command"

    3. MSI="command"

    4. DOS="command"

    5. REG="command"

    6. WaitProcess= "process_name"

    7. WinWaitClose = window_title

    8. Reboot

    Plus a few others.

    It would take a small learning curve to add these commands in front of the cmd entries and modify generate.js again to replace the lines "RunWait" with just the command, or...will look into building Case Select Logic into generate.js so transparent to user...will take a while.

  4. Just a few observations that we can consider to change:

    1. There is a more complete WPI.cmd from Doc Symbiosis, do you want to include it? Found Here...started our quest for path independence...maybe write WPIPATH instead of SWPATH...WPIPATH needed to launch kTool.exe from Tools Directory and we wouldn't have to change the generate.js again? I'm sure Doc would be happy to help us out on any mods or let us do them.

    http://www.msfn.org/board/index.php?s=&sho...ndpost&p=458149

    2. Get rid of my comments in generate.js before going final.

    3. Look at the T-12 stage of install and possibly change kTool.ini location, see post from Yurek3:

    Hopefully, he will get to test and give us some feedback on whether it works, I do not implement like this.

    http://www.msfn.org/board/index.php?s=&sho...ndpost&p=462258

    4. Re-Compile wpi.exe with WPI.ico? Won't attach due to file limits, but can compile with the icon imbedded. Would be able to lose the wpi.ico file as long as changes to file detection dependencies (like cd detect in generate.js) for this file were redirected to another file like the wpi.exe or wpi.hta.

    Details so far excluding the write-up above.

    -Works well with 7 application installs with UNC path, Mounted Network Drive, and CD.

    --CD install called from GUIRunOnce in Winnt.sif

    -Noticed I had to change my .msi files to include the "msiexec /i" preceding the install path...think it is a function of how kTool handles msi.

  5. Yurek3,

    Investigating, not sure if the current user is developed at that stage of Windows install, program currently writes the ktool.ini file to the current user TEMP folder and I'm not sure that path exists at that time in the install. If you would like, try using the modified generate.js below or manually updating yours to add a different path. It's currently set for system32 folder, just uncomment if you want to try Windows folder, both are included.

    //*See if ktool.ini exists, then delete
    kTool_ini = [b]WshEnv("TEMP") [/b] + "\\kTool.ini"; //Placed in Temp drive now for access during cd/dvd session
    if (fso.FileExists(kTool_ini))
    fso.DeleteFile(kTool_ini, true);

    to:

    kTool_ini = WshEnv("WinDir") + "\\kTool.ini";

    or

    kTool_ini = WshEnv("WINDIR") + "\\system32\\kTool.ini";

    Let me know how it works, we may have to change this in the master I give to Kel if it fixes your bug.

    generate.js

  6. Rename old config.js in the Wpiscripts folder or back it up, then add this test config.js file! If on local system, launch wpi.hta or wpi.cmd...You should see the notepad and cmd window open.

    If not, check that you have kTool.exe loaded inside of your WPI>Tools folder.

    If you still see the RunOnceEx dialog, make sure you placed the new generate.js in the Wpiscripts folder, either way, you should still be installing/launching notepad and cmd.

    This will tell if your commands inside your original config.js need to be relooked.

    BTW: were you using global variables?

    config.js

  7. WPI.exe - Seperate Project but posted for completeness on above Progress Bars

    (plus not enough space in last post due to size limitations)

    *Now closes out the audioplayer

    If used, wpi.exe now provides:

    Global variable %wpipath%
    -Can use from relative paths - mapping to first available drive letter
    -Closure of mshta.exe after detection of start of installation via kTool - Keying on kTool.exe process existence.
    -Command line support with profile and timer (i.e. wpi.exe Home 30), type "wpi.exe ?" for help

    Added lines in wpi.au3/wpi.exe:
    -Launch fontinstaller and ResChange Executables (remarked out for now, just remove; in front of Run line)
    -Launch Shutdown and cleanup (both remarked out for now)

    Otherwise, you can still launch with wpi.cmd

    wpi.au3

    wpi.exe

  8. Kel,

    Will have some time today to do some mods. Didn't see any problems on my machines using the options wizard though. Maybe a repost of what I'm working with. Able to save and change, one caveat, did get asked by one member why it wouldn't change when on a cd/dvd (the option must be selected before burning to read-only media as the scripts can't be changed later).

    If we remove it as an option, then we will not have to worry about that.

    Still working on some hanging wpi.exe issues, seems that kTool.exe doesn't close everytime and that is what wpi.exe keys on to close itself out, still investigating, however...

    Also, not closing the audioplayer...will add this to the wpi.exe today (forgot it closes out of generate.js code and loses this when mshta.exe closes)

    if launched by wpi.cmd, (I recommend Doc Symbioses at the link below as it will also work relative path issues and sets a global wpi variable...he uses %SWPATH%). For now, it just doesn't try to monitor the installation and close out mshta.exe nor accept command-line support.

    http://www.msfn.org/board/index.php?s=&sho...ndpost&p=458149

  9. mritter,

    Thanks for the feedback, I'm very new to jscript programming (about 1 week now)...I do mostly vb & c#...Code definately needs to be scrubbed with more error detection before implementation to the public. As I said before, just stimulating ideas and discussion while trying to learn.

    Reposted a new generate.js with mritter's feedback implemented, Thanks again, mritter!

  10. Lost Soul,

    I see the error also, comes from trying to write the kTool.ini file to startup folder>Tools...will correct, possibly writing the kTool.ini to Windows>Temp?...must be a writeable source.

    Will try a more elegant solution later, for now, the kTool.ini file will be written to c:\

    Changed line 35 in generate.js
    from: kTool_ini = ".\\Tools\\kTool.ini"
    to: kTool_ini = "c:\\kTool.ini"

    Attached new generate.js with above included...must go to SuperBowl Party now.

    Reposted generate.js with mritter's feedback (hopefully, got them all).

    generate.js

  11. You can add other executables that can be called from within wpi.exe...add the code to the wpi.au3 from post above. Comment out if you don't want to run these by adding semi-colon ";" without quotes in front of what you don't wish to run and then compile to .exe using autoit. AutoIT is free and can be found here:

    AutoIT v3

    Once installed, you should be able to right-click the .au3 file then click "Compile Script". You now have a new wpi.exe.

    ;*****Can add other executables using this syntax*****
    ;Run ( "filename" [, "workingdir" [, flag]] )
    ;Where:
    ;filename = The full name of the executable (EXE, BAT, COM, or PIF) to run.
    ;workingdir [optional] The working directory.
    ;flag [optional] The "show" flag of the executed program:
    ; @SW_HIDE = Hidden window
    ; @SW_MINIMIZE = Minimized window
    ; @SW_MAXIMIZE = Maximized window


    ;Force resolution to needed size for wpi interface.
    Run(@ScriptDir & "\Tools\ResChange.exe -width=1280 -height=1024 -depth=max -refresh=max", "", @SW_MAXIMIZE)

    ;Font installation - the smooth and customizable way.
    Run(@ScriptDir & "\Tools\fonts\fontinstaller.exe", "", @SW_MAXIMIZE)

    I've added the contents to the wpi.au3 from post:

    http://www.msfn.org/board/index.php?s=&sho...ndpost&p=459723

  12. Kel,

    I believe the exit problem is fixed...

    Also, closing mshta.exe from within the wpi.exe, couldn't find a better way to do it outside the startup .exe, not a java programmer.

    Still working on passing in command-line parameters to wpi.hta, don't want to lose that capability.

    I'll also try to take down/update the previous files with the newer fixed versions.

    New wpi.exe can be found at start of the thread:

    http://www.msfn.org/board/index.php?s=&sho...ndpost&p=459446

    Source code attached here: wpi.au3

    wpi.au3

  13. Kel,

    Can be found here, just download the wpi.au3, Doc Symbiosis' wpi.cmd works well too, didn't find it until I finished my work under that thread "Ideas needed to get rid of cd check".

    http://www.msfn.org/board/index.php?s=&sho...ndpost&p=459322

    Code removed and updated at the location below:

    http://www.msfn.org/board/index.php?s=&sho...ndpost&p=459723

    Sonic,

    These progress bars have no real relation to actual thread/process useage in code. It is only displaying the application count progress...the progress bars are only counting up as the number of apps being installed decrease. BTW, with 3 or more commands under any application will also trigger a secondary progress bar under the app being installed, while the one displayed at the bottom is for the total app count.

  14. Changelog: 7 Feb 06, 5:00am CST

    Modified to include new wpi.au3, wpi.exe, and generate.js...thanks mritter for help with a few bugs in code.

    Writing kTool.ini to Temp directory (Read/Write Path) now...thanks Lost Soul

    If used, wpi.exe now provides:

    Global variable %wpipath%

    Can use from relative paths - mapping to first available drive letter

    Closure of mshta.exe after detection of start of installation via kTool or RunOnceEx - Keying on rundll32.exe or kTool.exe process existence.

    Admin Check...not like we needed it, but...

    Command line support with profile and timer (i.e. wpi.exe Home 30)

    Added lines in wpi.au3/wpi.exe:

    Launch fontinstaller and ResChange Executables (remarked out for now, just remove ; in front of Run line)

    Launch Shutdown and cleanup (both remarked out for now)

    Otherwise, you can still launch with wpi.cmd

    For those interested, I've been playing around with kTools progress bars..included copies of the pertinent

    files. Thanks again to Kel for a great product and thanks to kenedy, kTools developer.

    1. Replace the files of your original WPI...I'm using version 4.3.8. Make sure to have backups!

    (under Common folder)

    a. optionswizardtemplate.htm

    b. main.js

    (under Wpiscripts folder)

    c. generate.js

    d. optionswizard.js

    2. Download kTool v1.1a and add the kTool.exe under the WPI>Tools folder (This drives the progress bars)

    Details and screenshots can be found here:

    http://www.msfn.org/board/index.php?s=&sho...ndpost&p=194610

    I've used WPI as the front-end, modified generate.js to write all the checked Applications to kTool.ini in

    the WPI>Tools Directory instead of to the RunOnceEx registry key. Then we launch kTool.exe with kTool.ini

    as the source of installs.

    3. Add wpi.exe under the WPI root (if you want to use it), see post below...same wpi.exe but different generate.js files:

    http://www.msfn.org/board/index.php?s=&sho...ndpost&p=459322

    4. Launch WPI (preferably from the new wpi.exe as it will install global variable %wpipath% to be used in

    your config.js file and will also take care of any relative path problems, but will still work from wpi.hta

    or wpi.cmd)

    5. Click "Options" Button and check 'yes' to "kTool RunOnceEx Progress Bars", then save...Launch Begin

    Install and you should see your RunOnceEx dialog "look-a-like" on a form with progress bars.

    Not a lot of testing went into this mod but seems to work o.k. for me. Maybe some tweaking on the way it

    imports registry info and copy/delete commands.

    Only throwing it out to the forum to stimulate ideas and discussion.

    pbWPI_a1.zip

  15. Script to replace wpi.cmd...

    1. Doc's works great above, finished my autoit script for completeness...had to do it.

    2. When accessed via network path (non-mapped drive), will mount to first available drive letter starting from z to a (can be modified in autoit script. Placed all registry entries into script as well but obviously could be taken out and continue to use the .reg files provided by Kel...same thing.

    Remember to use the %wpipath% for application install (BTW, the wpi.exe should be used to start WPI or you will revert back to the defaults in the original scripts.

    Example for config.js entry:

    prog[pn]=['ResHacker']
    picw[pn]=['128']
    pich[pn]=['128']
    textl[pn]=['Bottom']
    texti[pn]=['1']
    cat[pn]=['Application Category']
    cmd1[pn]=['"%wpipath%\\Install\\ResHacker\\ResHacker.exe"']
    dflt[pn]=['yes']
    gcond[pn]=['FileExists(\'%programfiles%\\\')']
    configs[pn]=['yes']
    pn++

  16. Doc Symbiosis,

    Sorry if I didn't give you the credit in the original post but tried to catch it here:

    http://www.msfn.org/board/index.php?s=&sho...ndpost&p=457757

    ...I used your idea from a ways back but must have had an early project...did not have your final wpi.cmd...Your's tested great on my systems and even found an empty Drive Letter to mount, which is the next step that I was working on with my autoit script (almost done). Thanks! This is just what WPI needs to get rid of the uncertainty of startup directory, cd, and relative path.

    Thanks!

  17. Sorry for the add, just wanted to pass on test details:

    Used WPI 4.3.8 Full version (Thanks Kel!)

    Also wanted to thank Doc Symbiosis for his ideas on mounting network share.

    Testing details...All Successful!

    Only mounts Network drive if accessed via Network Neighborhood (or equivalent)...not if share is already mapped or if run from local source to include CD/DVD.

    Non-Mounted Network Drive (accessed through browsing Network Neighborhood)... wpipath = Z:\Install

    Mounted Network Drive (showed as my local M:)... wpipath = M:\Install

    Created an .iso image and ran from virtual cd drive... wpipath = Virtual CD Drive (V:\ for my case)

    Burned to CD and ran from physical DVD drive... wpipath = R:\Install (R:\ is my recorder drive)

    Please pass any feedback as I believe this is worth pursuing.

    Will be working on a section to map network drive on first available drive, so user will not have to worry about whether the drive letter is available.

    Tony

×
×
  • Create New...