Jump to content

WPI v7.2.2


Recommended Posts

mritter,

Here is a small bug.

getOSver() returns "NOT_FOUND" for Windows Server ® 2008.

*****

if (ver.indexOf("Windows7") != -1)

szOSVerCache="Win7";

if (ver.indexOf("Server 2008") != -1) -> will not work as it returns info as "Windows Server ® 2008"

szOSVerCache="08";

if (ver.indexOf("Vista") != -1)

szOSVerCache="Vista";

*****

Better use Build no.

Version 6.0.6000

Build 6000 -> for Vista

Version 6.0.6001

Build 6001 -> for Windows 2008

for time being, I changed this as

if (ver.indexOf("2008") != -1)

szOSVerCache="08";

Hope this helps.

Edited by Meha
Link to comment
Share on other sites


mritter,

Following is the modified version of WMI section of getOSver()

I have tested this on XP, 2003, Vista and 2008 and returns correct value.

I don't have Windows 7, Windows 2000 Pro and 2000 Server test machines. Hope somebody else

Will test it on these platforms and give you the feed back.

This is adapted from GetNativeSystemInfo(ref SYSTEM_INFO lpSystemInfo) using OSVERSIONINFOEX

*****************************************************

objWMIService=GetObject("winmgmts:\\\\" + "." + "\\root\\CIMV2");

colItems=objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly);

enumItems=new Enumerator(colItems);

objItem=enumItems.item();

ver = objItem.Version.substr(0,3);

prodType = objItem.ProductType;

if ( ver == "6.1" ) // please confirm version no. on Windows 7

{

if ( prodType == 1 )

{

sVersionID = "Win7"; // Windows 7

}

else

{

sVersionID = "08R2"; // Windows Server 2008 R2 -> next server version based on Windows 7

}

}

else if ( ver == "6.0" )

{

if ( prodType == 1 )

{

szOSVerCache = "Vista";

}

else

{

szOSVerCache = "08";

}

}

else if ( ver =="5.2" )

{

if ( prodType == 1 )

{

szOSVerCache = "XP"; // 64 bit version as per MSDN doc. not tested by me

}

else

{

szOSVerCache = "03";

}

}

else if ( ver =="5.1" )

{

szOSVerCache = "XP";

}

else if ( ver =="5.0" ) // Not sure about reliability of WMI on Win 2000. Just for completeness. Need not go for 2KP & 2KS

{

if ( prodType == 1 )

{

szOSVerCache = "2KP";

}

else

{

szOSVerCache = "2KS";

}

}

*****************************************************

Here are the possible product types.

wProductType

Any additional information about the system. This member can be one of the following values.

Value Meaning

VER_NT_DOMAIN_CONTROLLER

0x0000002

The system is a domain controller and the operating system is Windows Server 2008, Windows Server 2003, or Windows 2000 Server.

VER_NT_SERVER

0x0000003

The operating system is Windows Server 2008, Windows Server 2003, or Windows 2000 Server.

Note that a server that is also a domain controller is reported as VER_NT_DOMAIN_CONTROLLER, not VER_NT_SERVER.

VER_NT_WORKSTATION

0x0000001

The operating system is Windows Vista, Windows XP Professional, Windows XP Home Edition, or Windows 2000 Professional.

*****************************************************

MSDN library link to OSVERSIONINFOEX Structure

http://msdn.microsoft.com/en-us/library/ms724833(VS.85).aspx

If you like, you can even have IsServer() and IsWorkstation() functions as conditions.

prodType == 1 for Workstation

prodType > 1 for Server

Hope this will settle getOSVersion() issues.

Meha

Edited by Meha
Link to comment
Share on other sites

found 3 problems/bugs in 7.22 ( wpi running from hdd/flash-drive on completely installed Win XP SP3 eng + RyanVM's Post-SP3 Update Pack or at Win XP SP2 rus + all updates via automatiс update service)

1. not working command like:

%extract% "%WPIPATH%\Install\5xx.media\530.vlc\*.7z" "%programfiles%"

in 6.4.1 it's woks fine

2. folder with WPI.hta have got name "WPI_722" and placing in the root of usb flash drive (i:\WPI_722\WPI.hta)

can't save changing in config.js or/and useroptions.js as "can't save to cd/dvd" why????

in 6.4.1 it's woks fine

3. all versions have foll bug:

thera are 4 folders with wpi:

i:\WPI_722\WPI.hta (version 7.2.2) usb flash disk

i:\WPI\WPI.hta (version 6.4.1) usb flash disk

f:\WPI\WPI.hta (version 6.4.1) hdd disk

f:\WPI_722-01\WPI.hta (version 7.2.2) hdd disk

after working with 7.2.2 from usb (i:\WPI_722\WPI.hta), try to run wpi 6.4.1 from hdd or from flash-drive, wpi 6.4.1 using useroptions.js from 7.2.2!!!!

and not works, as at 6.4.1 using Orange_mood theme, 7.2.2 using CorporateIT, and wpi 6.4.1 don't contain theme CorporateIT :)

after rename foder with 7.2.2 can start 6.4.1 normally with using own useroptions.js

the same situation with 7.2.2:

after working with 7.2.2 from usb (i:\WPI_722\WPI.hta), run wpi 7.2.2 from hdd, made changes in config.js and useroptions.js pressed save and exit application, how i was surprised found that all changes saved at wpi folider located at flash disk!!!

Link to comment
Share on other sites

#2 Is fixed redownload (It was done as a silent update like 4 days ago)

#3 WPI leaves reg entry for remembering the last location in the case of reboots and such. So to fix that you need to add the following regfile to your execute after:

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\WPI]

Like so: Regedit /S %wpipath%\install\Clean.reg Remeber to look at your path and file name!

Link to comment
Share on other sites

2 Kelsenellenelvian

thanks, what abt #1

in the previous version user can save several files with extension 7z (for example) in one folder, and all of them will be extracted using one command, in 7.2.2 it's not working...

may be better to add #3 as option to useroptions.js in next version? and give to user chance to choice - keep in registry last location of config files or not? ;)

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

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