
Francesco
Content Type
Profiles
Forums
Events
Posts posted by Francesco
-
-
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;
}
}
}
} -
-
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
EDIT: Updated boxes.js to fix the last item going on a new line issue.
-
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; -
Is there a way to have dependencies install before the programs that require them? Having to keep track of all the install order numbers is a nightmare when there are many items.
-
UAC is disabled on my computer and I have the same result!
Without this fix WPI reboots won't work on any os newer than XP.
-
You guys should check out the latest CCleaner, it does something to skip UAC warning using the task scheduler
Good luck
http://forum.piriform.com/index.php?showtopic=35964&st=0&p=216222entry216222
Found this also
http://maketecheasier.com/selectively-disable-uac-prompt-for-certain-applications/2010/10/06
The startup task is actually the 2nd option in the pool.
-
Fix
In core.js and installer.js replace all the occurrences of
HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce
with
HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce
Please report if anything breaks on XP/2000.
-
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") -
Not change, if you can support both options would be nice
This MSI LaunchCondition:
Installed OR (WindowsBuild >= 6002) Windows Vista Service Pack 2 or higher is required to install the Microsoft Camera Codec Pack.NOT (VersionNT > 601) This version of the Microsoft Camera Codec Pack is not compatible with Windows 8 or Windows Server 2012. You can get the codec pack through Windows Update on Windows 8. The codec pack is not available for Windows Server 2012.
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.
-
Hi, found an interesting reg file which turns off the UAC, may be it will be useful for You:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLUA"=dword:00000000Using RegShot i traced tha to undo this change it is necessary to use this:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLUA"=dword:00000001But there is one disadvantage: to make this tweak work it is necessary to reboot
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;
} -
You can't put a condition for the checkbox value but you can put one to disable the checkbox or hide it. If you use WPI to install updates you can use conditions to hide the entries if the application on WPI is equal or older than the one installed on the system.
-
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;
} -
I think I spoke too soon, its catching some but not all of my "dependent of"
When I check and uncheck the dependent installer, only then the checkbox is disabled
I think its due to the fact that it also ha a grey condition
Are you sure it doesn't happen on other layouts as well?
-
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"
-
-
I have a problem with "Excludes" when theme is in horizontal mode: http://i3.lulzimg.com/5c36ed3d21.png (I cant check either of the two)
Vertical up and down there is no problem selecting one or the other: http://i3.lulzimg.com/d5ae391582.png
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.
-
Those characters are the unicode BOM. Save the file as ANSI/ASCII to remove them.
-
As title says. In case of the 2nd choice WPI will always launch with/after explorer.
[BUG+FIX] Category not translated in config wizard proglist
in Windows Post-Install Wizard (WPI)
Posted
Fix
In configwizard.js replace
with