on error resume next
Dim Regkey
Dim WshShell: Set WshShell = CreateObject("WScript.Shell")
RegKey=WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\O365ProPlusRetail - en-us\DisplayName")
If RegKey ="Microsoft Office 365 ProPlus - en-us" Then
wscript.echo "Success"
Else
Wscript.quit
End if
Dim Regkey
Dim WshShell: Set WshShell = CreateObject("WScript.Shell")
RegKey=WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\O365ProPlusRetail - en-us\DisplayName")
If RegKey ="Microsoft Office 365 ProPlus - en-us" Then
wscript.echo "Success"
Else
Wscript.quit
End if