Francesco
MemberContent Type
Profiles
Forums
Events
Everything posted by Francesco
-
Fix In configwizard.js replace NavGrid.addRow(i,[configList[i].ordr,ConvertSpecialCharactersToEntities(configList[i].cat),configList[i].uid,ConvertSpecialCharactersToEntities(configList[i].prog)]); with NavGrid.addRow(i,[configList[i].ordr,GetCategoryTranslation(ConvertSpecialCharactersToEntities(configList[i].cat)),configList[i].uid,ConvertSpecialCharactersToEntities(configList[i].prog)]);
-
There's also else //If program checkbox was checked { if (!prog[thisChk]) return; //Ensure checkbox exists thisCat=cat[thisChk].toString(); } to replace with else //If program checkbox was checked { if (!prog[thisChk] || document.getElementById("chkbox"+thisChk) == null) return; //Ensure checkbox exists thisCat=cat[thisChk].toString(); } or the categories wouldn't be checked at startup
-
Fix In check.js replace if (state) { for (i=1; cat[i] != null; i++) { if (cat[i]==thisCat) { if (!isChecked(i)) { allChked=false; break; } } } } with if (state) { for (i=1; cat[i] != null; i++) { if (cat[i]==thisCat && document.getElementById("chkbox"+i) != null) { if (!isChecked(i)) { allChked=false; break; } } } }
-
WPI Bug Report Thread
Francesco replied to Kelsenellenelvian's topic in Windows Post-Install Wizard (WPI)
When I'm in the command list and a command is larger than the editbox and I hit save the command list layout becomes all messed up (happens also on the deps window and every time an alert box is displayed). -
Fix In program.js remove function ProgsInCat(whichCat) { position="program.js"; whatfunc="ProgsInCat()"; var i, res; res=0; for (i=1; prog[i]; i++) { if (cat[i] && cat[i]==whichCat) res++; } return res; } and replace boxes.js with the attached file boxes.js EDIT: Updated boxes.js to fix the last item going on a new line issue.
-
Please vote: Vista/Win7/Win8 UAC support poll
Francesco replied to Francesco's topic in Windows Post-Install Wizard (WPI)
The strings for windows server 2012 (and 2008R2) are missing among with all the server 2012 and win8 editions. Also there isn't any exposed function to use the edition in conditions (should be getOSeditionID). -
In WMI.js replace function getOSver() { position="wmi.js"; whatfunc="getOSver()"; if (szOSVerCache==NOT_FOUND) // this function is called often - get it once and cache the result { var Caption; try { objWMIService=GetObject("winmgmts:\\\\" + "." + "\\root\\CIMV2"); colItems=objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); enumItems=new Enumerator(colItems); objItem=enumItems.item(); Caption=objItem.Caption; /* alert("BuildNumber="+objItem.BuildNumber+"\n"+ "BuildType="+objItem.BuildType+"\n"+ "Caption="+objItem.Caption+"\n"+ "OperatingSystemSKU="+objItem.OperatingSystemSKU+"\n"+ "ProductType="+objItem.ProductType+"\n"+ "Version="+objItem.Version); */ if (Caption.indexOf("Windows 7") != -1) // Still waiting for official name szOSVerCache="Win7"; if (Caption.indexOf("2008") != -1) szOSVerCache="08"; if (Caption.indexOf("Vista") != -1) szOSVerCache="Vista"; if (Caption.indexOf("2003") != -1) szOSVerCache="03"; if (Caption.indexOf("XP") != -1) szOSVerCache="XP"; if (Caption.indexOf("2000") != -1) szOSVerCache="2K"; } catch(ex) { try { ver=WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\CurrentVersion"); } catch(ex1) { try { ver=WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Version"); } catch(ex2) { ; } } if (ver=="5.0") szOSVerCache="2K"; if (ver=="4.0") szOSVerCache="NT"; if (ver=="Windows 98") szOSVerCache="98"; if (ver=="Windows Millennium Edition") szOSVerCache="ME"; if (ver=="Windows 95") szOSVerCache="95"; } } return szOSVerCache; } with function getOSvernum() { try { return WshShell.RegRead("HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\CurrentVersion"); } catch(ex1) { } return NOT_FOUND; } function getOSver() { position="wmi.js"; whatfunc="getOSver()"; if (szOSVerCache==NOT_FOUND) // this function is called often - get it once and cache the result { try { objWMIService=GetObject("winmgmts:\\\\" + "." + "\\root\\CIMV2"); colItems=objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); enumItems=new Enumerator(colItems); objItem=enumItems.item(); var Caption=objItem.Caption; if (Caption.indexOf("Windows 8") != -1) szOSVerCache="Win8"; if (Caption.indexOf("Windows 7") != -1) szOSVerCache="Win7"; if (Caption.indexOf("2008") != -1) szOSVerCache="08"; if (Caption.indexOf("Vista") != -1) szOSVerCache="Vista"; if (Caption.indexOf("2003") != -1) szOSVerCache="03"; if (Caption.indexOf("XP") != -1) szOSVerCache="XP"; if (Caption.indexOf("2000") != -1) szOSVerCache="2K"; } catch(ex) { } } return szOSVerCache; } In configwizard.js replace ConditionsMenuBar.addNewChild("cond_architecture_os", 0, "architecture_getOSver", "getOSver()", false, "", ""); ConditionsMenuBar.addNewChild("cond_architecture_os", 1, "architecture_getSPver", "getSPver()", false, "", ""); ConditionsMenuBar.addNewChild("cond_architecture_os", 2, "architecture_getOSlang", "getOSlang()", false, "", ""); ConditionsMenuBar.addNewChild("cond_architecture_os", 3, "architecture_getOSlocale", "getOSlocale()", false, "", ""); with ConditionsMenuBar.addNewChild("cond_architecture_os", 0, "architecture_getOSver", "getOSver()", false, "", ""); ConditionsMenuBar.addNewChild("cond_architecture_os", 1, "architecture_getOSvernum", "getOSvernum()", false, "", ""); ConditionsMenuBar.addNewChild("cond_architecture_os", 2, "architecture_getSPver", "getSPver()", false, "", ""); ConditionsMenuBar.addNewChild("cond_architecture_os", 3, "architecture_getOSlang", "getOSlang()", false, "", ""); ConditionsMenuBar.addNewChild("cond_architecture_os", 4, "architecture_getOSlocale", "getOSlocale()", false, "", ""); and replace GrayedConditionsMenuBar.addNewChild("gcond_architecture_os", 0, "architecture_getOSver", "getOSver()", false, "", ""); GrayedConditionsMenuBar.addNewChild("gcond_architecture_os", 1, "architecture_getSPver", "getSPver()", false, "", ""); GrayedConditionsMenuBar.addNewChild("gcond_architecture_os", 2, "architecture_getOSlang", "getOSlang()", false, "", ""); GrayedConditionsMenuBar.addNewChild("gcond_architecture_os", 3, "architecture_getOSlocale", "getOSlocale()", false, "", ""); with GrayedConditionsMenuBar.addNewChild("gcond_architecture_os", 0, "architecture_getOSver", "getOSver()", false, "", ""); GrayedConditionsMenuBar.addNewChild("gcond_architecture_os", 1, "architecture_getOSvernum", "getOSvernum()", false, "", ""); GrayedConditionsMenuBar.addNewChild("gcond_architecture_os", 2, "architecture_getSPver", "getSPver()", false, "", ""); GrayedConditionsMenuBar.addNewChild("gcond_architecture_os", 3, "architecture_getOSlang", "getOSlang()", false, "", ""); GrayedConditionsMenuBar.addNewChild("gcond_architecture_os", 4, "architecture_getOSlocale", "getOSlocale()", false, "", ""); and add below case 'architecture_getOSver': HandleConditionsSelectionMenu(!InsertCondValues ? "getOSver()" : 'getOSver()=="'+getOSver()+'"'); break; this code case 'architecture_getOSvernum': HandleConditionsSelectionMenu(!InsertCondValues ? "getOSvernum()" : 'getOSvernum()=="'+getOSvernum()+'"'); break;
-
Please vote: Vista/Win7/Win8 UAC support poll
Francesco replied to Francesco's topic in Windows Post-Install Wizard (WPI)
Without this fix WPI reboots won't work on any os newer than XP. -
Please vote: Vista/Win7/Win8 UAC support poll
Francesco replied to Francesco's topic in Windows Post-Install Wizard (WPI)
The startup task is actually the 2nd option in the pool. -
Please vote: Vista/Win7/Win8 UAC support poll
Francesco replied to Francesco's topic in Windows Post-Install Wizard (WPI)
I already have all the code to recognize win8 but it's pretty pointless since like with vista and win7 nothing that requires reboots works. In wmi.js it's if (Caption.indexOf("Windows 8") != -1) szOSVerCache="Win8"; and in wpi.hta and core.js it's if (getOSver()=="XP" || getOSver()=="Vista" || getOSver()=="Win7" || || getOSver()=="Win8") instead of if (getOSver()=="XP" || getOSver()=="Vista" || getOSver()=="Win7") -
Please vote: Vista/Win7/Win8 UAC support poll
Francesco replied to Francesco's topic in Windows Post-Install Wizard (WPI)
In WPI could look like: getOSver2()>="6.0.6002"&&getOSver2()<"6.1" It would make WPI "future proof". You wont have to add a Win9/10/11 when/if another operating system comes out it will simply work, one would just have to increase the decimal point You can already read the windows version number from the registry (HKLM\Software\Microsoft\Windows NT\CurrentVersion\CurrentVersion) also you can't compare versions as strings there's a function for that. -
Please vote: Vista/Win7/Win8 UAC support poll
Francesco replied to Francesco's topic in Windows Post-Install Wizard (WPI)
I already figured out how to disable UAC and how to set a task on reboot but until people vote I'm not writing anything since both workarounds are extremely annoying. -
Fix From installer.hta remove <object id="MediaPlayer" name="MediaPlayer" width="215" height="45" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"> </object> and replace document.getElementById("MediaPlayer").url=InstallAudioPath; with document.getElementById("MediaPlayerDIV").innerHTML = '<object id="MediaPlayer" name="MediaPlayer" width="215" height="45" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"></object>'; document.getElementById("MediaPlayer").url=InstallAudioPath;
-
Fix In registry_dos.js replace function fileVersionGreaterThan(fileVersion1,fileVersion2) { position="registry_dos.js"; whatfunc="fileVersionGreaterThan()"; var split1, split2; split1=fileVersion1.toString().split("."); split2=fileVersion2.toString().split("."); for (var i=0; i<split1.length; i++) { var split2item=parseInt(split2[i]); if ((parseInt(split1[i]) > (isNaN(split2item) ? 0 : split2item))) return true; } return false; } with function fileVersionGreaterThan(fileVersion1,fileVersion2) { position="registry_dos.js"; whatfunc="fileVersionGreaterThan()"; var split1 = fileVersion1.toString().split("."), split2 = fileVersion2.toString().split("."); for (var i=0; i<split1.length; i++) { var split1int = parseInt(split1[i]), split2int=parseInt(split2[i]); if (!isNaN(split2int) && (split1int < split2int)) return false; else if (split1int > (isNaN(split2int) ? 0 : split2int)) return true; } return false; }
-
Fix In aboutupdate.js replace function CheckForUpdate() { position="aboutupdate.js"; whatfunc="CheckForUpdate()"; var iVersion, lVersion; UpdateAvailable=false; ShowUpdate(); // if (!loadXMLDoc("http://www.internetepicenter.com/wpi.xml",ExtractUpdateInfo)) if (!loadXMLDoc("http://www.wpiw.net/downloads/wpi.xml",ExtractUpdateInfo)) { alert(getText(txtUpdateError)); HideUpdate(); return; } Pause(2,0); iVersion=ShortVersion.split("."); lVersion=UpdateVersion.split("."); if (lVersion[0]>iVersion[0]) UpdateAvailable=true; else if (lVersion[0]==iVersion[0] && lVersion[1]>iVersion[1]) UpdateAvailable=true; else if (lVersion[0]==iVersion[0] && lVersion[1]==iVersion[1] && lVersion[2]>iVersion[2]) UpdateAvailable=true; else UpdateAvailable=false; FillInUpdate(); document.getElementById("Btn_DownloadUpdate").disabled=!UpdateAvailable; // The opposite } with function CheckForUpdate() { position="aboutupdate.js"; whatfunc="CheckForUpdate()"; UpdateAvailable=false; ShowUpdate(); if (!loadXMLDoc("http://www.wpiw.net/downloads/wpi.xml",ExtractUpdateInfo)) { alert(getText(txtUpdateError)); HideUpdate(); return; } Pause(2,0); UpdateAvailable=fileVersionGreaterThan(UpdateVersion,ShortVersion); FillInUpdate(); document.getElementById("Btn_DownloadUpdate").disabled=!UpdateAvailable; // The opposite }
-
Fix In check.js replace function parentsAreChecked(i) { position="check.js"; whatfunc="parentsAreChecked()"; var j, elem; for (j=0; deps[i] && j<deps[i].length; j++) //run through all dependencies of prog[i] { //find parent's checkbox try { elem=eval("document.all." +deps[i][j]); } catch(ex) { return false; } if (elem != null) { if (!elem.checked || elem.disabled) return false; } } return true; } function parentsAreEnabled(i) { position="check.js"; whatfunc="parentsAreEnabled()"; var j, elem; for (j=0; deps[i] && j<deps[i].length; j++) //run through all dependencies of prog[i] { //find parent's checkbox try { elem=eval("document.all." +deps[i][j]); } catch(ex) { return false; } if (elem.disabled) return false; } return true; } with function parentsAreChecked(i) { position="check.js"; whatfunc="parentsAreChecked()"; for (var j=0; deps[i] && j<deps[i].length; j++) //run through all dependencies of prog[i] { var itemIndex=findProgByUID(deps[i][j]); if (itemIndex>0) { var itemCheckbox = document.getElementById("chkbox"+itemIndex); if (!itemCheckbox.checked || itemCheckbox.disabled) return false; } } return true; } function parentsAreEnabled(i) { position="check.js"; whatfunc="parentsAreEnabled()"; var j, elem; for (j=0; deps[i] && j<deps[i].length; j++) //run through all dependencies of prog[i] { var itemIndex=findProgByUID(deps[i][j]); if (itemIndex>0 && document.getElementById("chkbox"+itemIndex).disabled) return false; } return true; }
-
Fix In themes.js replace function SetBoxChecked4(id) { position="themes.js"; whatfunc="SetBoxChecked4()"; if (LayoutStyle != 4) return; if (document.getElementById("lbl"+id).value=="Forced") document.getElementById("box"+id).className="forcedBox"; else if (document.getElementById("lbl"+id).value=="IsGray" && !DisableIfDoGray) { if (document.getElementById("chkbox"+id).checked) document.getElementById("box"+id).className="selectedBox"; else document.getElementById("box"+id).className="grayedBox"; } else if (document.getElementById("lbl"+id).value=="IsGray" && DisableIfDoGray) document.getElementById("box"+id).className="disabledBox"; else if (document.getElementById("chkbox"+id).disabled) document.getElementById("box"+id).className="disabledBox"; else document.getElementById("box"+id).className="selectedBox"; } function SetBoxUnchecked4(id) { position="themes.js"; whatfunc="SetBoxUnchecked4()"; if (LayoutStyle != 4) return; if (document.getElementById("lbl"+id).value=="Forced") document.getElementById("box"+id).className="forcedBox"; else if (document.getElementById("lbl"+id).value=="IsGray" && !DisableIfDoGray) document.getElementById("box"+id).className="grayedBox"; else if (document.getElementById("lbl"+id).value=="IsGray" && DisableIfDoGray) document.getElementById("box"+id).className="disabledBox"; else if (document.getElementById("chkbox"+id).disabled) document.getElementById("box"+id).className="disabledBox"; else document.getElementById("box"+id).className="normalBox"; } function SetBoxEnabled4(id) { position="themes.js"; whatfunc="SetBoxEnabled4()"; if (LayoutStyle != 4) return; // Forced should never be an issue? if (document.getElementById("lbl"+id).value=="IsGray" && !DisableIfDoGray) document.getElementById("box"+id).className="grayedBox"; else if (document.getElementById("lbl"+id).value=="IsGray" && DisableIfDoGray) document.getElementById("box"+id).className="disabledBox"; else if (document.getElementById("chkbox"+id).checked) document.getElementById("box"+id).className="selectedBox"; else document.getElementById("box"+id).className="normalBox"; } function SetBoxDisabled4(id) { position="themes.js"; whatfunc="SetBoxDisabled4()"; if (LayoutStyle != 4) return; // Forced should never be an issue? if (document.getElementById("lbl"+id).value=="IsGray" && !DisableIfDoGray) document.getElementById("box"+id).className="grayedBox"; else if (document.getElementById("lbl"+id).value=="IsGray" && DisableIfDoGray) document.getElementById("box"+id).className="disabledBox"; else if (document.getElementById("chkbox"+id).checked) document.getElementById("box"+id).className="selectedBox"; else document.getElementById("box"+id).className="disabledBox"; } with function RefreshElement4(id) { position="themes.js"; whatfunc="RefreshElement4()"; if (document.getElementById("chkbox"+id).disabled || (document.getElementById("lbl"+id).value=="IsGray" && DisableIfDoGray)) document.getElementById("box"+id).className="disabledBox"; else if (document.getElementById("lbl"+id).value=="IsGray" && !document.getElementById("chkbox"+id).checked && (document.getElementById("lbl"+id).value!="Forced")) document.getElementById("box"+id).className="grayedBox"; else if (document.getElementById("lbl"+id).value=="Forced") document.getElementById("box"+id).className="forcedBox"; else if (document.getElementById("chkbox"+id).checked) document.getElementById("box"+id).className="selectedBox"; else document.getElementById("box"+id).className="normalBox"; } In check.js replace all occurrences of "SetBoxChecked4", "SetBoxUnchecked4", "SetBoxEnabled4" and "SetBoxDisabled4" with "RefreshElement4"
-
WPI Bug Report Thread
Francesco replied to Kelsenellenelvian's topic in Windows Post-Install Wizard (WPI)
I can't reproduce it. Maybe both items having the same category is what disables both? I need a copy of the whole WPI folder (without Install) to debug that. -
WPI Bug Report Thread
Francesco replied to Kelsenellenelvian's topic in Windows Post-Install Wizard (WPI)
Those characters are the unicode BOM. Save the file as ANSI/ASCII to remove them.