SpotX-Official / SpotX

SpotX patcher used for patching the desktop version of Spotify
MIT License
13.75k stars 767 forks source link

Old install script detects my OS as Windows 7/8.x instead of Windows 10 #639

Closed defautluser0 closed 2 days ago

defautluser0 commented 2 weeks ago

🧐 Have you read the FAQ and viewed similar issues?

Сountry of your account

Spain

What is your Spotify Plan?

Free

Do you have Spicetify installed?

No

ℹ Computer information

- Spotify: 1.2.5.1006.g22820f93
- Windows: Windows 10 21H2 19044.4894 (LTSC IoT 2021)
- PowerShell: 5.1.19041.4894

📝 Description

  1. Install this transformation pack.
  2. Run install script.
  3. Get warning [1st screenshot] saying that my windows version is 7/8.x instead of 10.

📸 Screenshots

Warningimage

Winver(as you can probably tell, 21H2 is not a valid Windows 7 version. Its a valid 10/11 version(10 in this case) tho. image

amd64fox commented 2 weeks ago

Why did you open this here lol

try to run this code in a powershell terminal and show the response

$registryVersion = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ProductName

$environmentVersion = [System.Environment]::OSVersion.VersionString

$cimInstanceVersion = (Get-CimInstance Win32_OperatingSystem).Caption

Write-Host "(Regedit): $registryVersion"
Write-Host "(System.Environment): $environmentVersion"
Write-Host "(Get-CimInstance): $cimInstanceVersion"
defautluser0 commented 1 week ago

Why did you open this here lol

???

Anyways, heres the output

(Regedit): Windows 10 IoT Enterprise LTSC 2021
(System.Environment): Microsoft Windows NT 10.0.19044 Service Pack 1
(Get-CimInstance): Microsoft Windows 7 Ultimate
amd64fox commented 1 week ago

I'm saying that the patch you installed changes the system specifications of Windows, but you are asking for help not where the source of the problem is, but on the side, which is quite strange.

All I can do is try to use a more universal way to check the OS

for example, you can try to show your response from this code:

switch ([System.Environment]::OSVersion.Version) {
    { $_.Major -eq 10 -and $_.Build -ge 22000 } { 
        "Windows 11"
        break
    }
    { $_.Major -eq 10 } { 
        "Windows 10"
        break
    }
    { $_.Major -eq 6 -and $_.Minor -eq 0 } { 
        "Windows Vista"
        break
    }
    { $_.Major -eq 6 -and $_.Minor -eq 1 } { 
        "Windows 7"
        break
    }
    { $_.Major -eq 6 -and $_.Minor -eq 2 } { 
        "Windows 8"
        break
    }
    { $_.Major -eq 6 -and $_.Minor -eq 3 } { 
        "Windows 8.1"
        break
    }
    default { 
        "Unknown Windows Version"
    }
}
defautluser0 commented 2 days ago

i installed arch linux before running this, i forgot

amd64fox commented 2 days ago

what does arch linux have to do with it

I will add the construction with System.Environment later, for now this is closed