View Issue Details

IDProjectCategoryView StatusLast Update
0004612JEDI API & WSC LibraryWindows Security Code Library (JWSCL)public2009-01-31 09:27
ReporterChristianWimmerAssigned ToChristianWimmer 
PrioritynormalSeveritytweakReproducibilityunable to reproduce
Status resolvedResolutionfixed 
Summary0004612: EJwsclUnsupportedWindowsVersionException on Windows 7
Description“An Exception of type EJwsclUnsupportedWindowsVersionException was raised.

Source method: GetRunElevation
Source class: TJwSecurityToken
Source file: JwsclToken.pas
Source line: 0

Message: Unsupported version “Unknown”. Need “Windows Vista” or higher”

Vista and Win7 are based on the same core so I’m quite sure this and similar errors can be avoided by including Win7 as a known OS and treating it the same way as Vista. What do you think?
Additional InformationCW:
The main source of this exception is TJwWindowsVersion.CheckWindowsVersion, which clearly states in its docs that parameter "iWinVer" must be a known Windows Versions.

The trunk revision 0000654 contains a fixed (but untested) version:

The uploaded file contains a merge of the trunk fix and the 0.9.2a branch. It does not contain new features.

I'm unable to reproduce because Windows 7 is not available yet.
TagsNo tags attached.

Activities

2008-12-04 02:28

 

JwsclVersion_W7fix.pas (33,459 bytes)

ChristianWimmer

2008-12-04 02:32

administrator   ~0015079

This fix does not remedy the fact that Windows 7 is not supported at all by JWA&JWSCL.

anonymous

2008-12-04 06:29

viewer   ~0015081

In line 690:

  if not ((fWindowsType = iWinVer) or (bOrHigher and
    (fWindowsType > iWinVer))) then

need to be changed to

  if not ((fWindowsType = iWinVer) or (bOrHigher and
    (fWindowsType = cOsUnknown))) then

This is because fWindowsType will always be -1 for newer/unknown OS and therefore can't be greater than iWinVer (e.g. 10).

With this changes everything works fine with Win7.

anonymous

2008-12-04 06:43

viewer   ~0015082

For newer, but known OS like Win7 actually JwsclConstants and JwsclVersion should be updated with the new information as they are certain. Win7 is (FMajorVersion = 6) and (FMinorVersion = 1).

anonymous

2008-12-08 10:29

viewer   ~0015085

A similar fix was already added as a file from 0.9.2a branch. See notes.

ChristianWimmer

2009-01-31 09:27

administrator   ~0015273

The issue is fixed in latest trunk.

Issue History

Date Modified Username Field Change
2008-12-04 02:28 ChristianWimmer New Issue
2008-12-04 02:28 ChristianWimmer Status new => assigned
2008-12-04 02:28 ChristianWimmer Assigned To => ChristianWimmer
2008-12-04 02:28 ChristianWimmer File Added: JwsclVersion_W7fix.pas
2008-12-04 02:32 ChristianWimmer Note Added: 0015079
2008-12-04 06:29 anonymous Note Added: 0015081
2008-12-04 06:43 anonymous Note Added: 0015082
2008-12-08 10:29 anonymous Note Added: 0015085
2009-01-31 09:27 ChristianWimmer Note Added: 0015273
2009-01-31 09:27 ChristianWimmer Status assigned => resolved
2009-01-31 09:27 ChristianWimmer Resolution open => fixed