← Back to team overview

sikuli-driver team mailing list archive

[Bug 1946925] Re: [2.0.5] Win11: Env.getOSVersion() gets incorrect version (10.0) --- Java problem (fixed with Java18)

 

Thanks for this idea :-)

I will implement it for Win11 on the Java level in 2.0.6, so we have a
general solution until it is finally fixed in Java 18 (hopefully ;-).

** Description changed:

  looks like there is an open bug for windows 11
  that is expected to be fixed in java 18
  https://bugs.openjdk.java.net/browse/JDK-8274840
  
  tracked on GitHub: https://github.com/RaiMan/SikuliX1/issues/479
  
  ----------------------------------------------------------------------
  
+ --- workaround ---
+ in Python scripting for other user who may see similar issue
+ 
+ get OS details from sysinfo
+ 
+ cmd='powershell\nsysteminfo | findstr /B /C:\"OS Name\"'
+ cmdoutput=ExecuteWinCommand(cmd)
+ 
+ def ExecuteWinCommand(cmdToExecute):
+     returnCode = runScript(cmdToExecute)
+     commandOutput = RunTime.get().getLastCommandResult()
+     sleep(2)
+     return commandOutput
+ 
+ --------------------------------------------------------------
+ 
  Env.getOSVersion() gets incorrect version for Windows 11
  
  we are expecting version to be returned as 11 but get 10.0
  
  OS: Win 11
  Java : 14

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to SikuliX.
https://bugs.launchpad.net/bugs/1946925

Title:
  [2.0.5] Win11: Env.getOSVersion() gets incorrect version (10.0) ---
  Java problem (fixed with Java18)

Status in SikuliX:
  Confirmed

Bug description:
  looks like there is an open bug for windows 11
  that is expected to be fixed in java 18
  https://bugs.openjdk.java.net/browse/JDK-8274840

  tracked on GitHub: https://github.com/RaiMan/SikuliX1/issues/479

  ----------------------------------------------------------------------

  --- workaround ---
  in Python scripting for other user who may see similar issue

  get OS details from sysinfo

  cmd='powershell\nsysteminfo | findstr /B /C:\"OS Name\"'
  cmdoutput=ExecuteWinCommand(cmd)

  def ExecuteWinCommand(cmdToExecute):
      returnCode = runScript(cmdToExecute)
      commandOutput = RunTime.get().getLastCommandResult()
      sleep(2)
      return commandOutput

  --------------------------------------------------------------

  Env.getOSVersion() gets incorrect version for Windows 11

  we are expecting version to be returned as 11 but get 10.0

  OS: Win 11
  Java : 14

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1946925/+subscriptions



References