Jump to content

  

15 members have voted

  1. 1. How to make WPI support UAC?

    • Disable UAC before reboot and re-enable it after reboots
      9
    • Maintain UAC always on and remove the incompatible LoadDesktopBeforeInstall option
      3
    • I don't know, but I like turtles!
      3


Recommended Posts

Posted (edited)

Naw the Windows 8 code for this section here:

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;

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)
{
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;
}

This is the main part I need:

if (Caption.indexOf("Windows 7") != -1)

I have NO clue what MS is calling it internally.

Edited by Kelsenellenelvian

Posted (edited)

Gives error

C:\Users\<Username>\Downloads>cscript winver.vbs
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Users\<Username>\Downloads\winver.vbs(39, 1) Microsoft VBScript compilation error: Syntax error

Edited by ricktendo64
Posted (edited)

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")

Edited by Francesco
Posted (edited)

It's possible to add the WinVer.vbs to WPI, because works fine to give informations ?

It seems some infos are missing inside WPI_Log.txt, like Windows version and Build number:

Result on Oracle VirtualBox

Fichier journal de l'installation WPI

Début de l'installation: jeudi 9 août 2012 13:43:18

Information WPI:

Version=8.5.4

Exécutable utilisé=true

Version d'Internet Explorer=9.0

Connexion Internet=false

Système d'exploitation

Système d'exploitation=Not found

ID Edition=Not found

Service Pack=1

Architecture

Nom de l'Architecture=GenuineIntel

Chaîne du Nom de l'Architecture=Intel® Core™ i5 CPU 650 @ 3.20GHz

ID Architecture=x86 Family 6 Model 37 Stepping 2

Nombre de Processeurs=1

MHz=3063

Type d'Architecture=x86

SysArch6432=NOT_DEFINED

Bits Architecture=32

64 Bits réel=false

Fichier Options=D:\wpi\UserFiles\useroptions.js

Fichier Configuration=D:\wpi\UserFiles\config.js

Fichier Réseau=D:\wpi\UserFiles\networkoptions.js

....

Also using WPI Information options: Computer tab: missing: Windows version, Build number, Language and Localization

Regards

*Edit: thanks to move this post if it is not in the good place but for Request thread!

Edited by myselfidem
Posted

WFM:

Operating System

Operating System=Win7

Edition ID=Not found

Service Pack=1

Architecture

Architecture Name=AuthenticAMD

Architecture Name String=AMD Phenom II X6 1100T Processor

Architecture ID=AMD64 Family 16 Model 10 Stepping 0

Number Of Processors=6

MHz=3300

Architecture Type=AMD64

SysArch6432=NOT_DEFINED

Architecture Bits=64

True 64 Bits=true

Posted (edited)

Thanks Francesco!

However, I see on the registry that the values about Windows are inside:


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"CurrentVersion"="6.1"
"CurrentBuild"="7601"
"EditionID"="Ultimate"
"ProductName"="Windows 7 Ultimate"
"CurrentBuildNumber"="7601"
"CSDBuildNumber"="1130"
"CSDVersion"="Service Pack 1"

Regards

Edited by myselfidem

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...