Category filter

Script to allow user access to specific third-party apps on Windows

As an IT administrator, you might be facing problems with your users running undesired third-party apps in your Microsoft Windows environment. If you want to allow users access only to specific third-party apps on Windows devices, here’s how you can deploy custom scripts using Hexnode to serve your purpose.


The Sample Scripts provided below are adapted from third-party Open-Source sites.

PowerShell script

The script below edits the Windows registry to allow users to run only specific third-party applications. For instance, for $Value1 and $Value2, replace firefox.exe and wordpad.exe with the name of the third-party apps you want users to access. Users will be restricted from all the other third-party apps. To specify more than two applications, you may add apps as $Value3, $Value4, etc., and set the values for those apps using Set-ItemProperty.


  • Once the script is run successfully, restart the device, and the users should only be able to run the third-party apps to which you have explicitly allowed access in the script.
  • Users’ access to system apps is unaffected by the script.
  • To revert the changes made on the device due to the above script and allow users to access all apps, run the below command:
  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository