Set WshShell = WScript.CreateObject("WScript.Shell")

If WScript.Arguments.Count = 0 Then
    WScript.Echo "Error: No product key provided. Please pass the product key as a parameter."
    WScript.Quit
End If

Dim WinVer
WinVer = WScript.Arguments(0)

Dim RTMkey
RTMkey = WScript.Arguments(1)

If WinVer = "Win10" Then
WshShell.Run "slui 3"
WScript.Sleep 10000
WshShell.SendKeys RTMkey
WScript.Sleep 2000
WshShell.SendKeys "{ENTER}"
WScript.Sleep 3000 
WshShell.SendKeys "{ENTER}"
End If

If WinVer = "Win11" Then
WshShell.Run "slui 3"
WScript.Sleep 5000
WshShell.SendKeys "{ENTER}"
WScript.Sleep 3000
WshShell.SendKeys RTMkey
WScript.Sleep 2000
WshShell.SendKeys "{ENTER}"
WScript.Sleep 3000 
WshShell.SendKeys "{ENTER}"
End If