Jump to content


  • Posts

  • Joined

  • Last visited

  • Donations

  • Country

    United States

About lawrenca

  • Birthday 05/19/1963

Contact Methods

  • Website URL

lawrenca's Achievements



  1. This Link may be what you are looking for. Haven't tried it recently but I remember doing a whole project with links in all my tooltips.
  2. Best place to start is right here in the MSFN. There is a very nice tutorial in the unattended section that should be the starting point for all administrators (stuff they don't teach in Microsoft Certification Courses). Link below. MSFN Unattended As for the programming, any of the "Teach Yourself" series is good for an overview but nothing takes the place of diving in on a project and making mods yourself, leaning on friends in the forums for expert advice, and lets not leave out or forget to search for the answers first before taking up the moderators time to answer...nothing more frustrating than answering the same questions over and over when the info is in help files or forum topics. Good luck!
  3. @Nobby Barnes, I have a lot of luck checking the HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall Key for Add/Remove Programs. Below is a sample of my condition and gcondition that I use for checking whether an app is installed AND available for install on my disk or network store. prog[pn]=['Notepad++ v4.0.2']; ordr[pn]=[170]; uid[pn]=['NOTEPAD402']; dflt[pn]=['no']; cat[pn]=['Commercial Applications']; forc[pn]=['no']; cond[pn]=['FileExists("%root%\\Applications\\Commercial\\Notepad++ v4.0.2\\npp.4.0.2.Installer.exe")']; gcond[pn]=['RegKeyExists("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Notepad++\\DisplayName")']; cmd1[pn]=['"%root%\\Applications\\Commercial\\Notepad++ v4.0.2\\npp.4.0.2.Installer.exe" /S']; pn++; Hope this helps. -Tony
  4. Should work perfectly from a NAS as long as the drive is mapped as a network share...WPI currently doesn't handle relative paths.
  5. Sorry for the late addition: Happy Birthday!!!!
  6. @deadbug, There are two quick ways you can call another function from within WPI (without a lot of recoding effort). 1. You can take advantage of a function inside of core.js called "function ReplacePath(v)" that starts around line 323 (which is what I think you want). This will require you to define a new variable and replace text within the command with the data contained inside the variable. There are several examples contained within this function, an easy one to look at is the way Kel handles %wpipath% and replaces that token with the variable wpipath. wpipath actually gets resolved in this same file around line 15 under "function defaultWPI()". 2. Or you can make a call from an outside executable, script, or dll through a function inside of installer.js called "function handleCommand(cmd)" that starts around line 337. This is where you could substitute a command you've included in the cmd lines (I currently invoke an AutoIT Script from this function that contains many of my functions inside that I just pass commandlines like ProcessWaitClose, ProcessCloseAll, ProcessClose, ProcessWait, WinClose, WinKill...I've also added all the Delete, Copy, and Sleep functions as I don't like the CMD Window in my face during install - just a quirk on my part. Probably the harder part is figuring out if you want to thump those commands everytime in the config page or remember to include them everytime there is a new release. You could also mod configwizardtemplate_config.htm to add those new commands in the dropdowns of each of the commands. I'd also be interested in seeing your LimitedWaitForFile function if you're willing to post it. Note: If the function line numbers don't match up properly, just do a search on those functions...I'm working on wpi6.2 but also make a few mods here and there so they may not exactly match up.
  7. Kel, I'm hoping you are looking for something like this in java script: function Deleterunentry() { position="api.js"; whatfunc="Deleterunentry()"; var wsh = new ActiveXObject("WScript.Shell"); try { wsh.RegDelete("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\WPI"); } catch (ex) {; } } Oops, Sorry about that Yzöwl, didn't look through the dropdown .js section of your code well enough...that was where I was going. Kel, did Yzöwl's code not help?
  8. @rline, Does the folder "app" already exist on the destination - %systemroot%\Program files\app? If not, you will have to create the directory first, MAKEDIR "%systemroot%\Program files\app" then copy the file...you will also need quotes if there are spaces in your path. See this post for more info. FILECOPY "%wpipath%\Install\app\app.exe" "%systemroot%\Program files\app" /y You could also just do a DIRCOPY...See this post for more info.
  9. This was on my wishlist from a while back. I know there are probably more elegent solutions, I was having trouble maintaining the highlight while tabbing around on the page without creating the highlightlink funtion. All changes I made are in the configwizard.js. The colors and fonts could certainly be moved to the css file for consistency. Below is my implementation: Changes in function CreateNavigation(). I have accesskey to directly access the links in the list but they conflict with current implementation of hotkeys...I still use the Ctrl+? for my hotkeys. I also use the UID so you will highlight entries that are not unique: From this: txt += '<td valign="top"><a class="opTxt" onClick="JumpToEntry(' + i + ')">' + configList[i].prog + '</a></td>'; To this: txt += '<td valign="top"><a class="opTxt" href="java script:JumpToEntry(' + i + ')" id="'+ configList[i].uid + '" accesskey="'+ configList[i].prog.substring(0,1) + '";>' + configList[i].prog + '</a></td>'; Add as the last line of function FillInConfig(CreateNav,pos) to call the new highlightlink function: highlightlink(pos); Finally, add the new function. Not called in the link itself as it lost focus as I tabbed around the config page to change values for this item: function highlightlink(pos) //Tony add...Highlight link persistently even when link doesn't have focus { position="configwizard.js"; whatfunc="highlightlink()"; var regularColor='black'; var hoverColor='purple'; var selectedColor='yellow'; var anchors = document.getElementsByTagName('a'); for (var i=0; i < document.anchors.length; i++) { if (document.anchors[i].id==document.getElementById("uid").value) { document.anchors[i].focus(); document.anchors[i].style.color = regularColor; document.anchors[i].style.backgroundColor = selectedColor; } else { document.anchors[i].style.backgroundColor = ""; document.anchors[i].style.color = regularColor; document.anchors[i].onmouseover = new Function("this.style.color = \"" + hoverColor + "\";"); document.anchors[i].onmouseout = new Function("this.style.color = \"" + regularColor + "\";"); } } } configwizard.js
  10. Extract the ISO to your WPI install folder with a program like WinRAR and then point WPI to the executable. WPI will not mount an ISO for installation at this time.
  11. You will have to manipulate these for the logic you wish to implement. This example compares strings, notice I'm pulling from the DisplayVersion now: prog[pn]=['Adobe Reader 7.0.8']; ordr[pn]=[100]; desc[pn]=['Adobe® Reader® — free software for viewing and printing Adobe Portable Document Format (PDF) files.']; uid[pn]=['ADOBE708']; dflt[pn]=['yes']; cat[pn]=['Commercial Applications']; forc[pn]=['no']; configs[pn]=['default']; cond[pn]=['FileExists("%root%\\Applications\\Commercial\\Adobe Reader 7.0.8\\reader708.exe")']; gcond[pn]=['RegKeyValue("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{AC76BA86-7AD7-1033-7B44-A70800000002}\\DisplayVersion")=="7.0.8"']; cmd1[pn]=['"%root%\\Applications\\Commercial\\Adobe Reader 7.0.8\\reader708.exe"']; pn++; This example will parse the strings to numbers, then you can use <,>,= or any combination to compare the numbers to determine if the installed version is greater than the version you wish to install...you may want to move this logic to the condition statement since you may not want the user to even see an older version available. prog[pn]=['Adobe Reader 7.0.8']; ordr[pn]=[101]; desc[pn]=['Adobe® Reader® — free software for viewing and printing Adobe Portable Document Format (PDF) files.']; uid[pn]=['ADOBE708']; dflt[pn]=['yes']; cat[pn]=['Commercial Applications']; forc[pn]=['no']; configs[pn]=['default']; cond[pn]=['FileExists("%root%\\Applications\\Commercial\\Adobe Reader 7.0.8\\reader708.exe")']; gcond[pn]=['parseFloat(RegKeyValue("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{AC76BA86-7AD7-1033-7B44-A70800000002}\\DisplayVersion")) >= parseFloat("7.0.8")']; cmd1[pn]=['"%root%\\Applications\\Commercial\\Adobe Reader 7.0.8\\reader708.exe"']; pn++;
  12. XCougar, I think the manual is worded correctly. Use the cond (Condition) statement to show/hide entire checkbox and entry based on a certain condition, like if the application is available on the disk (wouldn't want to try to install it if it wasn't there), or if it required a certain OS or Hardware to be installed. Kel is referring to Grayed Condition in his response. Use gcond (Grayed Condition) to gray out checkbox entry if that condition is true, like if something is already installed whether it be a file or registry setting. I prefer to key on registry keys as they provide path independence for the application if they are standard installations, this is where all the Add/Remove Programs get tracked. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall Example for checking for 7-Zip, This line just checking for RegKey is not version specific: gcond[pn]=['RegKeyExists("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\7-Zip\\DisplayName")']; You could easily break it down to the exact registry value, this will key to a specific version: gcond[pn]=['RegKeyValue("HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\7-Zip\\DisplayName")=="7-Zip 4.45 beta"'];
  13. This is a good link to take a look at, as a matter of fact, the whole site is worth a read... WPI Help Look for a solution about half way down the page with the header:
  14. Forgot to mention that it would be very easy to implement geezery's Dialog Box into the script above. You could also call/compare your encryption from this dialog with a few modifications. I just wanted to show a quick and easy way with just a password input prompt.
  15. Are you sure that it just doesn't need the working directory set within WPI? I'm not familiar with Aspect WinSet but have never had this kind of trouble ever installing anything, and I've installed my share with AutoIT and WPI. Maybe if you could provide more details to include the config.js and also the autoit script you are launching.

  • Create New...