Kelsenellenelvian Posted August 8, 2012 Posted August 8, 2012 (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 August 8, 2012 by Kelsenellenelvian
Kelsenellenelvian Posted August 8, 2012 Posted August 8, 2012 (edited) Save the attachment as a .vbs and run from a cmd prompt in win8.Post the displayed info here for me. Edited August 9, 2012 by Kelsenellenelvian
ricktendo Posted August 9, 2012 Posted August 9, 2012 (edited) Gives errorC:\Users\<Username>\Downloads>cscript winver.vbsMicrosoft (R) Windows Script Host Version 5.8Copyright (C) Microsoft Corporation. All rights reserved.C:\Users\<Username>\Downloads\winver.vbs(39, 1) Microsoft VBScript compilation error: Syntax error Edited August 9, 2012 by ricktendo64
myselfidem Posted August 9, 2012 Posted August 9, 2012 Works fine for me on Windows 7, if I remove: & _at this line: "Build Number : " & objItem.BuildNumber & vbCrLf
Francesco Posted August 9, 2012 Author Posted August 9, 2012 (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'sif (getOSver()=="XP" || getOSver()=="Vista" || getOSver()=="Win7" || || getOSver()=="Win8")instead ofif (getOSver()=="XP" || getOSver()=="Vista" || getOSver()=="Win7") Edited August 9, 2012 by Francesco
Kelsenellenelvian Posted August 9, 2012 Posted August 9, 2012 Just for the sake of completeness (Plus I know someone else will ask) I have added it to the next version.
myselfidem Posted August 9, 2012 Posted August 9, 2012 (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 VirtualBoxFichier journal de l'installation WPIDébut de l'installation: jeudi 9 août 2012 13:43:18Information WPI: Version=8.5.4 Exécutable utilisé=true Version d'Internet Explorer=9.0 Connexion Internet=falseSystème d'exploitation Système d'exploitation=Not found ID Edition=Not found Service Pack=1Architecture 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 LocalizationRegards*Edit: thanks to move this post if it is not in the good place but for Request thread! Edited August 9, 2012 by myselfidem
Kelsenellenelvian Posted August 9, 2012 Posted August 9, 2012 WFM:Operating System Operating System=Win7 Edition ID=Not found Service Pack=1Architecture 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
ricktendo Posted August 10, 2012 Posted August 10, 2012 (edited) You guys should check out the latest CCleaner, it does something to skip UAC warning using the task schedulerGood luckhttp://forum.piriform.com/index.php?showtopic=35964&st=0&p=216222entry216222Found this alsohttp://maketecheasier.com/selectively-disable-uac-prompt-for-certain-applications/2010/10/06 Edited August 10, 2012 by ricktendo64
myselfidem Posted August 10, 2012 Posted August 10, 2012 UAC is disabled on my computer and I have the same result!
Francesco Posted August 10, 2012 Author Posted August 10, 2012 You guys should check out the latest CCleaner, it does something to skip UAC warning using the task schedulerGood luckhttp://forum.piriform.com/index.php?showtopic=35964&st=0&p=216222entry216222Found this alsohttp://maketecheasier.com/selectively-disable-uac-prompt-for-certain-applications/2010/10/06The startup task is actually the 2nd option in the pool.
Francesco Posted August 10, 2012 Author Posted August 10, 2012 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.
myselfidem Posted August 10, 2012 Posted August 10, 2012 (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 August 10, 2012 by myselfidem
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now