Jump to content

[BUG+FIX] getArch6432 and getmshtaBits don't work


 Share

Recommended Posts

Fix

In globals.js replace


var sysArch, sysArch6432;

with


var sysArch;

and


var OSBits=32, mshtaBits=32;

with


var OSBits=32;

and remove


var true64bits=false, true32bits=false;

In globals_lang.js replace


var lblArchName=[], lblArchNameString=[], lblArchID=[], lblNumberProcessors=[], lblMHz=[], lblArchType=[], lblSysArch6432=[], lblArchBits=[], lblTrue64Bits=[];

with


var lblArchName=[], lblArchNameString=[], lblArchID=[], lblNumberProcessors=[], lblMHz=[], lblArchType=[], lblArchBits=[];

and remove the lblSysArch6432 and lblTrue64Bits lines from all langfiles.

In information.js remove


ArchitectureGrid.addRow(gId++,getText(lblSysArch6432)+','+sysArch6432+'');

and remove


ArchitectureGrid.addRow(gId++,getText(lblTrue64Bits)+','+true64bits+'');

and remove


ConditionsGrid.addRow(gId++,'getmshtaBits()=='+getmshtaBits());

and remove


ConditionsGrid.addRow(gId++,'getArch6432()=="'+getArch6432()+'"');

In installer_log.js remove


WriteLogLinePlain(" "+getText(lblSysArch6432)+"="+sysArch6432);

and remove


WriteLogLinePlain(" "+getText(lblTrue64Bits)+"="+true64bits);

In core.js remove


getArch6432();

and


getmshtaBits();

In WMI.js remove


function getArch6432()
{
position="wmi.js";
whatfunc="getArch6432()";

sysArch6432=WshShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITEW6432%");
if (sysArch6432=="%PROCESSOR_ARCHITEW6432%" || sysArch6432=="%PROCESSOR_ARCHITECTURE%")
sysArch6432="NOT_DEFINED";

return sysArch6432;
}

and remove


function getmshtaBits()
{
position="wmi.js";
whatfunc="getmshtaBits()";

return mshtaBits;
}

and replace


function getBits()
{
position="wmi.js";
whatfunc="getBits()";

if (sysArch6432=="NOT_DEFINED")
{
if (sysArch=="AMD64" || sysArch=="IA64")
{ // True 64bit system
true64bits=true;
true32bits=false;
mshtaBits=64;
OSBits=64;
}
else
{ // True 32bit system
true64bits=false;
true32bits=true;
mshtaBits=32;
OSBits=32;
}
}
else
{ // Running 32bit mshta on 64bit OS
true64bits=false;
true32bits=false;
mshtaBits=32;
OSBits=64;
}

return OSBits;
}

with


function getBits()
{
position="wmi.js";
whatfunc="getBits()";

OSBits=(sysArch=="AMD64" || sysArch=="IA64") ? 64 : 32;

return OSBits;
}

and replace


if (true32bits)

with


if (OSBits == 32)

In configwizard.js replace


ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 0, "architecture_getmshtaBits", "getmshtaBits()", false, "", "");
ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 1, "architecture_getArch", "getArch()", false, "", "");
ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 2, "architecture_getArch6432", "getArch6432()", false, "", "");
ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 3, "architecture_getBits", "getBits()", false, "", "");
ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 4, "architecture_getArchName", "getArchName()", false, "", "");
ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 5, "architecture_getArchNameString", "getArchNameString()", false, "", "");
ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 6, "architecture_getArchIdentifier", "getArchIdentifier()", false, "", "");
ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 7, "architecture_getNumProcs", "getNumProcs()", false, "", "");
ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 8, "architecture_getArchMHz", "getArchMHz()", false, "", "");

with


ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 0, "architecture_getArch", "getArch()", false, "", "");
ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 1, "architecture_getBits", "getBits()", false, "", "");
ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 2, "architecture_getArchName", "getArchName()", false, "", "");
ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 3, "architecture_getArchNameString", "getArchNameString()", false, "", "");
ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 4, "architecture_getArchIdentifier", "getArchIdentifier()", false, "", "");
ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 5, "architecture_getNumProcs", "getNumProcs()", false, "", "");
ConditionsMenuBar.addNewChild(WhichCond + "_architecture_arch", 6, "architecture_getArchMHz", "getArchMHz()", false, "", "");

and remove


case 'architecture_getmshtaBits':
HandleConditionsSelectionMenu(!InsertCondValues ? "getmshtaBits()" : 'getmshtaBits()=='+getmshtaBits());
break;

and remove


case 'architecture_getArch6432':
HandleConditionsSelectionMenu(!InsertCondValues ? "getArch6432()" : 'getArch6432()=="'+getArch6432()+'"');
break;

Edited by Francesco
Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...