Jump to content

gillesg

Members
  • Posts

    183
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by gillesg

  1. Thank you for sharing.

    But the method seems complicated for an automated method for the user!

     

    However, the idea is interesting and deserves to be improved

     

    Regards

    This is just right, but when you start using variables, you are not anymore a simple user.

    In fact, just adding the function in core.js opens the possibility to use variables defined in the WPI_program_file.js

    Regards.

    Gilles

  2. Hi,

     

    Sorry for the delay.

     

    To make it run

    Add in core.js

    function include(fileName){document.write("<script src='../UserFiles/"+fileName+"'></script>" );}include('WPI_program_config.js');// WPI_program_config.js can be any name you want to add in UserFiles Folder[/font]
     

    In UserFiles folder create a file named "WPI_program_config.js"

    Syntax of WPI_program_config.js file

    var APPS_DIR = "..\\MyApps" // Adobe Flash et shockwavevar FlashVersion="install_flash_player_ax (11.7.700.202)"var ShockwaveVersion="sw_lic_full_installer (12.0.2.122)"var FLASH_DIR="..\\Restore Hope - Admin Tools\\Adobe Flash & Shockwave" // Javavar Javax64_version="jre-7u21-windows-x64"var Java_version="jre-7u21-windows-i586"var Java_dir="..\\Restore Hope - Admin Tools\\Java"
     

     

    use in config.js file

    prog[pn]=['Installer les KB Windows 7 x64 sans reboot'];uid[pn]=['KB'];desc[pn]=['Installer les KB Windows 7 x64 sans reboot'];dflt[pn]=['yes'];forc[pn]=['no'];bit64[pn]=['no'];cat[pn]=['Admin Tools'];configs[pn]=['Win7,7 Add'];cmds[pn]=['{x64} {START} "KB2533552" /B /WAIT "%wpipath%\\' + APPS_DIR + '\\KB2533552\\Windows6.1-KB2533552-x64.msu" /quiet /norestart','{x64} {START} "KB2603229" /B /WAIT "%wpipath%\\' + APPS_DIR + '\\KB2603229\\Windows6.1-KB2603229-x64.msu" /quiet /norestart','{x64} {START} "msXML 4 SP3" /B /WAIT "%wpipath%\\' + APPS_DIR + '\\msXML 4 SP3\\msxml4 SP3.msi" /quiet /norestart','{x64} {START} "msXML4 KB2758694" /B /WAIT "%wpipath%\\' + APPS_DIR + '\\msXML 4 SP3\\msxml4-KB2758694-fra.exe" /quiet /norestart','{x64} {START} "DirectX" /B /WAIT "%wpipath%\\' + APPS_DIR + '\\DirectX.End-User.Runtimes.(June 2010)\\DXSETUP.exe" /Silent','{x64} {START} "rvkroots" /B /WAIT "%wpipath%\\' + APPS_DIR + '\\rvkroots\\rvkroots.exe"','{x64} {START} "rootsupd" /B /WAIT "%wpipath%\\' + APPS_DIR + '\\rootsupd\\AMD64-all-rootsupd.exe"'];cond[pn]=['getOSver()=="Win7" && FileExists("%wpipath%\\" + APPS_DIR + "\\KB2533552\\Windows6.1-KB2533552-x64.msu")'];pn++;  prog[pn]=['Flash Player'];uid[pn]=['FLASH'];desc[pn]=['Installer Flash player pour IE'];dflt[pn]=['yes'];forc[pn]=['no'];bit64[pn]=['no'];cat[pn]=['Admin Tools'];configs[pn]=['Win7,Lite,Post SP3'];cmds[pn]=['{START} "FLASH" /B /WAIT "%wpipath%\\' + FLASH_DIR + '\\' + FlashVersion + '.exe" -install'];cond[pn]=['FileExists("%wpipath%\\" + FLASH_DIR + "\\" + FlashVersion + ".exe")'];pn++; prog[pn]=['Shockwave player'];uid[pn]=['SHOCKWAVE'];desc[pn]=['Installer ShockWave player'];dflt[pn]=['yes'];forc[pn]=['no'];bit64[pn]=['no'];cat[pn]=['Admin Tools'];configs[pn]=['Win7,Lite,Post SP3'];cmds[pn]=['{START} "Shock" /B /WAIT "%wpipath%\\' + FLASH_DIR + '\\' + ShockwaveVersion + '.exe" /S'];cond[pn]=['FileExists("%wpipath%\\" + FLASH_DIR + "\\" + ShockwaveVersion + ".exe")'];pn++;
     

    So when there is an update, just modify WPI_Program_config.js and not the config.js file

     

    Regards.

    PS : if needed I can post full config.js and WPI_Programl_config.js files.

  3. Hi,
     
    For my personnal usage I found a way to use variable in config.js.
    Before publishing anyting, I was wondering if there is a standard way to do so  ?
     
    Regards.
     
    Gilles
     
     
    An example of what I want to achieve in config.js

    cmds[pn]=['{START} "VC2008" /B /WAIT "%wpipath%\\' + VC2008_DIR + '\\' + vc_2008 + 'x86.exe" /q',	'{x64} {START} "VC2008x64" /B /WAIT "%wpipath%\\' + VC2008_DIR + '\\' + vc_2008 + 'x64.exe" /q'];cond[pn]=['getOSver()=="Win7" && FileExists("%wpipath%\\" + VC2008_DIR + "\\" + vc_2008 + "x86.exe")'];pn++;

    with

    // For VC2008var VC2008_DIR = "..\\Restore Hope - Admin Tools\\Microsoft Visual C++\\VC++ 2008 SP1"var vc_2008 = "vc 2008SP1+ redist_"
  4. You can try:

    cmds[pn]=['"%systemdrive%\\Folder_Name\\MainExe.exe" /s /v/qn'];cond[pn]=['FileExists("C:\\Folder_Name\\MainExe.exe")'];
    Change Folder_Name with the location folder name!

    hello,

     

    This is not the problem I want to solve.

    MainExe.exe is always present if the program has to be installed

    ExeFile.exe is a patch that if present should be installed.

    That's why the IF EXIST statement.

     

     

    I track down something !

     

    A change I made, long time ago in "installer.js" file

     

    Around line 1080, I added the following block.

     

    case 'CMD': 
                                    cmd="CMD /C " + cmd; 
                                    fsoCmd=true; 
                                    break;
     
    Is that correct ?
    May be that should be added definitely ?
     
    Gilles 
  5. Hi crashfly,

     

    Sorry about that small mistake EXISTS instead of EXIST. 

    This is only when explaining my problem. 

    my config.js file is correctely spelled.

     

    Any idea of the reason of the trouble

     

    Edit:  Just noticed, you need to drop the "S" on your "EXISTS" part.  See below for the other part of my post.

    -----------------------

    Try using the command "if /?", you get the following:

  6. Hi,

     

    I has been using WPIW for quite a while.

    Moving from XP to Seven, I bump into a syntax problem I suppose.

     

    I used a cmds[pn] statement as follow

     

     

     

    cmds[pn]=[' "%wpipath%\\PathToExe\\MainExe.exe" /s /v/qn','{CMD} IF EXIST "%wpipath%\\PathToExe\\ExeFile.exe" start "Title" /WAIT   "%wpipath%\\PathToExe\\ExeFile.exe" /s /v/qn ']; cond[pn]=['FileExists("%wpipath%\\PathToExe\\MainExe.exe")'];

     

    I always get and error 

     

     

    cmd2 *** Fail *** (returned code 999): IF EXIST "D:\WPI\PathToExe\ExeFile.exe" start "Title" /WAIT "D:\WPI\PathToExe\ExeFile.exe" /s /v/qn

     

    What is really weird, it is working under XP (tested with version 8.5)

    but not with version 8.6.3

     

     

    Can anyone give some advices/hints to debug it ?

     

    Regards.

     

    Giles 

×
×
  • Create New...