You're encountering two separate issues while trying to run PsExec:
- "This app can’t run on your PC" Error
This usually means that the version of PsExec you're using is not compatible with your operating system (e.g., 32-bit tool on a 64-bit OS, or unsigned binary blocked by policy). To resolve:
- Download the latest PsExec from Microsoft Sysinternals: https://docs.microsoft.com/sysinternals/downloads/psexec Make sure you download the correct version for your system architecture.
- Unblock the file:
- Right-click on
PsExec.exe
, select Properties. - If there's an "Unblock" checkbox at the bottom, check it and click OK.
- Right-click on
- Ensure Compatibility:
- Run it on a compatible OS (PsExec is not supported on Windows S mode or ARM versions).
- Try running from
cmd.exe
orpowershell.exe
with "Run as Administrator".
- Access is denied
This means the current command prompt session lacks the required privileges.
- Open CMD as Administrator: Right-click
cmd.exe
→ "Run as administrator". - Use correct syntax (assuming you downloaded PsExec to
C:\tools\PSTools
):C:\tools\PSTools\PsExec.exe -i -s regedit
If trying to launch a GUI app (like regedit
) in system context (-s
), you must also use -i
(interactive) and run from an elevated session.
In addition, check Group Policy / Defender Policies: Make sure AppLocker or software restriction policies aren't blocking PsExec.exe
.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin