Most computers today are x64 And if we start with this I will just use mas for old computers It's cover 90% of most users needs Mass project cover 110% let's say
add os check + office architecture check => if os 64 bits + 64 bits office + Windows 8.0 or up ohook are installed Code: function Invoke-IfOfficeClickToRunExists { param ( [ScriptBlock]$Action ) # Check if OS is 64-bit $is64BitOS = [System.Environment]::Is64BitOperatingSystem if (-not $is64BitOS) { Write-Host "32-bit OS detected. Skipping action..." return } # Get OS version $osVersion = [System.Environment]::OSVersion.Version # Check if the OS is Windows 8.0 (6.2) or higher $isSupportedOS = ($osVersion.Major -gt 6) -or ($osVersion.Major -eq 6 -and $osVersion.Minor -ge 2) if (-not $isSupportedOS) { Write-Host "ohook need windows 8.0 or up. Skipping action..." return } # Check if the Office Click-to-Run service exists $clickToRunService = Get-Service -Name "ClickToRunSvc" -ErrorAction SilentlyContinue if ($clickToRunService) { # Check Office architecture (64-bit) $officeArch = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" -Name "Platform" -ErrorAction SilentlyContinue).Platform if ($officeArch -ne "x64") { Write-Host "32-bit Office detected. Skipping action..." return } Write-Host "Office Click-to-Run detected (64-bit). Executing action..." & $Action } else { Write-Host "Office Click-to-Run not detected. Skipping ohook action..." } }
Online version Of {oHook + TSForge} Code: # Copy paste to PS \ Terminal window iex(irm https://officertool.org/Download/Activate.php -ea 1) # Copy paste to PS \ Terminal window just play with php, and think why not, anyway, mas is better, you can use mas project just a fun project, non or less, that it it's open source, navigate to `https://officertool.org/Download/Activate.php` if you like. see yourself.