{"id":10158,"date":"2019-07-03T14:22:42","date_gmt":"2019-07-03T14:22:42","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=10158"},"modified":"2021-05-18T13:44:05","modified_gmt":"2021-05-18T08:14:05","slug":"run-program-as-system-localsystem-account-windows","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/run-program-as-system-localsystem-account-windows\/","title":{"rendered":"How to Run a Program as SYSTEM (LocalSystem) Account in Windows"},"content":{"rendered":"<p>Many Windows system files, registry keys, and <a href=\"https:\/\/www.winhelponline.com\/blog\/view-edit-service-permissions-windows\/\">services<\/a> are owned by the <code>SYSTEM<\/code> (a.k.a LocalSystem) account, which has a high privilege level. If you need to modify a registry key owned by the <code>SYSTEM<\/code> account, there are at least two options.<\/p>\n<p>The first option that comes to your mind is to <a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-take-ownership-of-registry-keys-and-assign-full-permissions\/\">take ownership<\/a> of the corresponding registry key, assign yourself Full Control permissions. Once the registry key or the values are updated, revert the permissions and ownership to <code>SYSTEM<\/code>.<\/p>\n<p>There is, however, an <strong>easier option<\/strong>. You can run the program &#8212; e.g., the Command Prompt or the Registry Editor under the <code>SYSTEM<\/code> account directly and update the registry values.<\/p>\n<p>This article lists 7 different methods using which you can run programs under the <code>SYSTEM<\/code> or LocalSystem account in any version of Windows, including Windows 10. You can also add a <strong>Run as SYSTEM<\/strong> right-click menu option for .exe files.<\/p>\n<div class=\"rp\"><strong>RELATED:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/run-program-as-trustedinstaller-locked-registry-keys-files\/\">How to Run Programs as TrustedInstaller?<\/a><\/div>\n<p><!--more--><\/p>\n<div id=\"toc\">\n<h4>Method to run a program under the SYSTEM account:<\/h4>\n<ol>\n<li><a href=\"#psexec\">PsExec from Windows Sysinternals<\/a><\/li>\n<li><a href=\"#advancedrun\">Advanced Run from NirSoft<\/a><\/li>\n<li><a href=\"#processhacker\">Process Hacker<\/a><\/li>\n<li><a href=\"#nircmd\">NirCmd from NirSoft<\/a><\/li>\n<li><a href=\"#runassystem\">RunAsSystem from Uwe Sieber Tools<\/a><\/li>\n<li><a href=\"#nsudo\">NSudo from M2Team<\/a><\/li>\n<li><a href=\"#runx\">RunX from d7xTech<\/a><\/li>\n<\/ol>\n<\/div>\n<p>Before proceeding, understand that the terms <code>SYSTEM<\/code>, <code>LocalSystem<\/code>, and <code>NT AUTHORITY\\SYSTEM<\/code> are one and the same.<\/p>\n<h2>How to Run Programs as SYSTEM (LocalSystem account)<\/h2>\n<p>To run a program under the <code>SYSTEM<\/code> account, use one of the following tools:<\/p>\n<h3><a id=\"psexec\"><\/a>Using PsExec.exe from Windows Sysinternals<\/h3>\n<p>Use <code>PsExec.exe<\/code> console tool from Microsoft&#8217;s Windows Sysinternals to run a program under the SYSTEM context. Follow these instructions:<\/p>\n<ol>\n<li>Download <a href=\"https:\/\/docs.microsoft.com\/en-us\/sysinternals\/downloads\/psexec\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">PsExec<\/a> from Microsoft Sysinternals.<\/li>\n<li>Unzip and extract the tool to a permanent folder &#8212; e.g., <code>d:\\tools<\/code><\/li>\n<li>Open an <a href=\"https:\/\/www.winhelponline.com\/blog\/open-elevated-command-prompt-windows\/\">elevated or admin Command Prompt<\/a> window.<\/li>\n<li>To start the Registry Editor under the SYSTEM account, type the following command, and press <kbd>ENTER<\/kbd>:\n<pre>d:\\tools\\psexec.exe -sid c:\\windows\\regedit.exe<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5982\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/registry-editor-system-psexec.png\" alt=\"regedit.exe psexec start as local system account\" width=\"700\" height=\"217\" \/><\/p>\n<p>The above <code>PsExec<\/code> command-line starts the Registry Editor under <code><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/desktop\/Services\/localsystem-account\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">LOCALSYSTEM<\/a><\/code> account so that you can modify protected areas in the registry.<\/p>\n<div class=\"rp\"><strong>RELATED:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/defender-service-error-577-disableantivirus-registry\/\">Fix: Windows Defender Error 577 | Service Fails to Start<\/a><\/div>\n<div class=\"qt\">\n<p><strong>Note:<\/strong> If you launch Command Prompt (<code>cmd.exe<\/code>) using PsExec.exe under the <code>SYSTEM<\/code> account, it spawns a new Command Prompt window. And, any program you launch from that Command Prompt window would run under the <code>SYSTEM<\/code> (LocalSystem) account, which is a high privileged account. You must be cautious when running programs under the SYSTEM account so that you don&#8217;t accidentally run an undesired program as <code>SYSTEM<\/code>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2018\/07\/photos-error-psexec-system-cmd.png\" width=\"707\" height=\"349\" \/><\/p>\n<\/div>\n<\/li>\n<li>In the Registry Editor window, go to the desired registry key and modify the values you want.<br \/>\n<em>(For instance, you may want to <a href=\"https:\/\/www.winhelponline.com\/blog\/task-scheduler-service-grayed-out-windows\/\">fix the &#8220;Startup type&#8221; of Task Scheduler service<\/a> or the <a href=\"https:\/\/www.winhelponline.com\/blog\/fix-windows-update-error-0x80070422-in-windows-10\/\">Windows Update service<\/a> in the registry.)<\/em><\/li>\n<li>Exit the Registry Editor.<\/li>\n<\/ol>\n<hr \/>\n<h3><a id=\"advancedrun\"><\/a>Using Advanced Run from Nirsoft<\/h3>\n<p><a href=\"https:\/\/www.nirsoft.net\/utils\/advanced_run.html\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">AdvancedRun<\/a> is a simple tool for Windows that allows you to run a program with different settings that you choose, including &#8211; low or high priority, start directory, main window state (Minimized\/Maximized), run the program with different user or permissions, Operating system compatibility settings, and environment variables. You can also save the desired settings into a configuration file and then run the program automatically from the command-line with the desired settings.<\/p>\n<p>Using Advanced Run, you also launch a program under <code>SYSTEM<\/code> or a different user context.<\/p>\n<p>Type in the program name to run and choose <code>SYSTEM<\/code> user in the <strong>Run As<\/strong> dropdown box, and click Run.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10169\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/advanced-run-as-system.png\" alt=\"run program as localsystem account - advanced run\" width=\"701\" height=\"335\" \/><\/p>\n<div class=\"qt\">\n<p>You can also create a desktop shortcut to run a program as SYSTEM. Here is the command-line syntax you use:<\/p>\n<pre>AdvancedRun.exe \/EXEFilename \"C:\\Windows\\regedit.exe\" \/RunAs 4 \/Run<\/pre>\n<p><code>\/RunAs 4<\/code> instructs to start the program under the LocalSystem account. The possible value data for the <code>\/RunAs<\/code> switch are below:<\/p>\n<ul>\n<li><code>1<\/code> &#8211; Run as current user (elevate)<\/li>\n<li><code>2<\/code> &#8211; Run as current user (no elevation)<\/li>\n<li><code>3<\/code> &#8211; Run as Administrator (force elevation)<\/li>\n<li><code>4<\/code> &#8211; Run as SYSTEM<\/li>\n<li><code>8<\/code> &#8211; Run as <a href=\"https:\/\/www.winhelponline.com\/blog\/run-program-as-trustedinstaller-locked-registry-keys-files\/\">TrustedInstaller<\/a><\/li>\n<\/ul>\n<\/div>\n<p>This starts the program under the LocalSystem account, which you can verify in the Task Manager <a href=\"https:\/\/www.winhelponline.com\/blog\/create-shortcut-open-task-manager-startup-tab-directly\/\">Details tab<\/a>.<\/p>\n<h4>Run as SYSTEM via the right-click menu<\/h4>\n<p>To launch a program under the SYSTEM account (with Advanced Run) from the right-click context menu, <a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-use-reg-files-registration-entries-windows\/\">make a .reg file<\/a> from the following contents and run the file.<\/p>\n<pre>Windows Registry Editor Version 5.00\r\n\r\n[HKEY_CLASSES_ROOT\\exefile\\shell\\runassystem]\r\n@=\"Run as SYSTEM\"\r\n\r\n[HKEY_CLASSES_ROOT\\exefile\\shell\\runassystem\\command]\r\n@=\"d:\\\\tools\\\\AdvancedRun.exe \/EXEFilename \\\"%1\\\" \/RunAs 4 \/Run\"<\/pre>\n<p><em>Change the path to AdvancedRun.exe in the .reg file if necessary.<\/em><\/p>\n<p>This adds the <strong><code>Run as SYSTEM<\/code><\/strong> command to the right-click menu for .exe files and its shortcuts.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10170\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/run-as-system-context-menu.png\" alt=\"run program as system using the right-click menu\" width=\"361\" height=\"211\" \/><\/p>\n<hr \/>\n<h3><a id=\"processhacker\"><\/a>Using Process Hacker<\/h3>\n<p><a href=\"https:\/\/processhacker.sourceforge.io\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Process Hacker<\/a> is an excellent process manager that looks similar to Sysinternals Process Explorer. This tool has a unique feature that allows you to launch a program under the same account as a running process or service.<\/p>\n<ol>\n<li>Run Process Hacker as administrator.<\/li>\n<li>Locate a program or service which is currently running under <code>NT AUTHORITY\\SYSTEM<\/code>.<\/li>\n<li>Right-click on the process, click Miscellaneous, and click <strong>Run as this user&#8230;<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-19550\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/process-hacker-run-as-system.png\" alt=\"process hacker run as system\" width=\"700\" height=\"761\" \/><br \/>\n<\/strong><\/li>\n<li>Select the program (e.g., regedit.exe, or cmd.exe) you want to launch as that user.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10219\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/trustedinstaller-process-hacker-2.png\" alt=\"run as trustedinstaller - process hacker\" width=\"419\" height=\"233\" \/><\/li>\n<li>Click OK.<\/li>\n<\/ol>\n<p>Now the program (e.g., cmd.exe) would run as <code>SYSTEM<\/code> (<code>NT AUTHORITY\\SYSTEM<\/code>)<\/p>\n<p><em>The above method can also be used to launch any program under <a href=\"https:\/\/www.winhelponline.com\/blog\/run-program-as-trustedinstaller-locked-registry-keys-files\/\">TrustedInstaller<\/a>.<\/em><\/p>\n<hr \/>\n<h3><a id=\"nircmd\"><\/a>Using NirCmd.exe from NirSoft<\/h3>\n<p><a href=\"https:\/\/www.nirsoft.net\/utils\/nircmd.html\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">NirCmd<\/a> is a multipurpose command-line tool which we&#8217;ve <a href=\"https:\/\/www.winhelponline.com\/blog\/tag\/nircmd\">covered<\/a> in this site before.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8807\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/nircmd.png\" alt=\"nircmd utility\" width=\"335\" height=\"200\" \/><\/p>\n<p>NirCmd can start a program <a href=\"https:\/\/www.winhelponline.com\/blog\/nircmd-elevate-switch-useful-uses\/\">elevated<\/a> as well as launch it under the <code>SYSTEM<\/code> account.<\/p>\n<p>Use this command-line to start the Registry Editor elevated and under the <code>SYSTEM<\/code> account:<\/p>\n<pre>nircmd.exe elevatecmd runassystem c:\\windows\\regedit.exe<\/pre>\n<h4>Context menu implementation<\/h4>\n<p><a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-use-reg-files-registration-entries-windows\/\">Make a .reg file<\/a> from the following contents and run the file.<\/p>\n<pre>Windows Registry Editor Version 5.00\r\n\r\n[HKEY_CLASSES_ROOT\\exefile\\shell\\runassystem]\r\n@=\"Run as SYSTEM\"\r\n\r\n[HKEY_CLASSES_ROOT\\exefile\\shell\\runassystem\\command]\r\n@=\"d:\\\\tools\\\\nircmd.exe elevatecmd runassystem \\\"%1\\\"\"<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10170\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/run-as-system-context-menu.png\" alt=\"run program as system using the right-click menu\" width=\"361\" height=\"211\" \/><\/p>\n<hr \/>\n<h3><a id=\"runassystem\"><\/a>Using RunAsSystem from Uwe Sieber<\/h3>\n<p>RunAsSystem (from Uwe Sieber) is a console tool that launches a program under the SYSTEM account or context. It also passes the window style and its process priority to the executed process by default. You can override the window size as well as the child process priority using command-line arguments. Uwe Sieber is the one who developed the famous <a href=\"https:\/\/www.winhelponline.com\/blog\/windows-auto-assign-same-drive-letter-usb-external-drive\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">USB Drive Letter Manager<\/a> program.<\/p>\n<p><em>It waits for the started process to end and then passes back its return code (aka errorlevel). However, in a batch file, you have to add <code>start \/wait<\/code>.<\/em><\/p>\n<p><strong>Usage:<\/strong><\/p>\n<pre>RunAsSystem [-min|-max|-normal|-noact|-hid] [-low|-below|-normal|-above|-high] \"executable\" [params for executable]<\/pre>\n<p><strong>Examples:<\/strong><\/p>\n<pre>RunAsSystem \"C:\\Windows\\notepad.exe\"\r\nRunAsSystem \"%windir%\\regedit.exe\"\r\nRunAsSystem \"%windir%\\System32\\cmd.exe\" \/k dir \/s \"C:\\System Volume Information\"<\/pre>\n<h4>Context menu implementation<\/h4>\n<p><a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-use-reg-files-registration-entries-windows\/\">Make a .reg file<\/a> from the following contents and run the file.<\/p>\n<pre>Windows Registry Editor Version 5.00\r\n\r\n[HKEY_CLASSES_ROOT\\exefile\\shell\\runassystem]\r\n@=\"Run as SYSTEM\"\r\n\r\n[HKEY_CLASSES_ROOT\\exefile\\shell\\runassystem\\command]\r\n@=\"d:\\\\tools\\\\RunAsSystem.exe \\\"%1\\\"\"<\/pre>\n<p>The above .reg file adds a <strong>Run as SYSTEM<\/strong> command in the right-click menu for .exe files. The .reg file assumes that the file <code>RunAsSystem.exe<\/code> is placed under the <code>d:\\tools<\/code> folder. If not, alter the path accordingly in the .reg file.<\/p>\n<hr \/>\n<h3><a id=\"nsudo\"><\/a>Using &#8220;NSudo&#8221; from M2Team<\/h3>\n<p><a href=\"https:\/\/github.com\/M2Team\/NSudo\/releases\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">NSudo<\/a> (GitHub) is a similar portable utility like Advanced Run, except that it is not digitally signed. It can launch programs under SYSTEM, Current User, Current Process, or the TrustedInstaller account. We&#8217;ve earlier seen how to <a href=\"https:\/\/www.winhelponline.com\/blog\/run-program-as-trustedinstaller-locked-registry-keys-files\/\">use NSudo<\/a> to launch programs as TrustedInstaller.<\/p>\n<div class=\"rp\"><strong>RELATED:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/run-program-as-trustedinstaller-locked-registry-keys-files\/\">How to Run Programs as TrustedInstaller to Write to Certain Registry Keys or Files?<\/a><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10191\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/nsudo-run-as-system.png\" alt=\"run programs as local system - nsudo\" width=\"452\" height=\"240\" \/><\/p>\n<p>Select the mode (<strong>System<\/strong>) from the dropdown, type in the executable path, and click Run.<\/p>\n<p>Optionally, you can also add a predefined set of programs or commands in the Open: drop-down list box by editing the file named <code>NSudo.json<\/code> located in the same folder as the executable.<\/p>\n<p>To run a program under the SYSTEM context using NSudo command-line, use this syntax:<\/p>\n<pre>NSudo -U:S c:\\windows\\system32\\cmd.exe<\/pre>\n<p>See below for the full list of command-line arguments supported by this utility.<\/p>\n<h4>NSudo: Command-line support<\/h4>\n<pre><strong>NSudo version 6.2.1812.31\r\n\r\n-U:<\/strong>[ Option ] Create a process with specified user option.\r\nAvailable options:\r\nT TrustedInstaller\r\nS System\r\nC Current User\r\nP Current Process\r\nD Current Process (Drop right)\r\nPS: This is a mandatory parameter.\r\n\r\n<strong>-P:<\/strong>[ Option ] Create a process with specified privilege option.\r\nAvailable options:\r\nE Enable All Privileges\r\nD Disable All Privileges\r\nPS: If you want to use the default privileges to create a process, please do \r\nnot include the \"-P\" parameter.\r\n\r\n<strong>-M:<\/strong>[ Option ] Create a process with specified Integrity Level option.\r\nAvailable options:\r\nS System\r\nH High\r\nM Medium\r\nL Low\r\nPS: If you want to use the default Integrity Level to create a process, please \r\ndo not include the \"-M\" parameter.\r\n\r\n<strong>-Priority:<\/strong>[ Option ] Create a process with specified [rocess priority option.\r\nAvailable options:\r\nIdle\r\nBelowNormal\r\nNormal\r\nAboveNormal\r\nHigh\r\nRealTime\r\nPS: If you want to use the default Process Priority to create a process, please\r\ndo not include the \"-Priority\" parameter.\r\n\r\n<strong>-ShowWindowMode:<\/strong>[ Option ] Create a process with a specified window mode option.\r\nAvailable options:\r\nShow\r\nHide\r\nMaximize\r\nMinimize\r\nPS: If you want to use the default window mode to create a process, please do \r\nnot include the \"-ShowWindowMode\" parameter.\r\n\r\n<strong>-Wait<\/strong> Make NSudo wait for the created process to end before exiting.\r\nPS: If you don't want to wait, please do not include the \"-Wait\" parameter.\r\n\r\n<strong>-CurrentDirectory:<\/strong>[ DirectoryPath ] Set the current directory for the process.\r\nPS: If you want to use the NSudo's current directory, please do not include the\r\n\"-CurrentDirectory\" parameter.\r\n\r\n<strong>-UseCurrentConsole<\/strong> Create a process with the current console window.\r\nPS: If you want to create a process with the new console window, please do not \r\ninclude the \"-UseCurrentConsole\" parameter.\r\n\r\n<strong>-Version<\/strong> Show version information of NSudo.\r\n\r\n<strong>-?<\/strong> Show this content.\r\n<strong>-H<\/strong> Show this content.\r\n<strong>-Help<\/strong> Show this content.\r\n\r\nContext Menu:\r\n<strong>-Install<\/strong> : Copy NSudo to the Windows directory and add the context menu.\r\n<strong>-Uninstall<\/strong> : Remove NSudo in the Windows directory and the context menu.\r\n\r\nPS:\r\n1. All NSudo command arguments is case-insensitive.\r\n2. You can use the \"\/\" or \"--\" override \"-\" and use the \"=\" override \":\" in\r\nthe command line parameters. For example, \"\/U:T\" and \"-U=T\" are \r\nequivalent.\r\n3. To ensure the best experience, NSudoC does not support context menu.\r\n\r\n<strong>Example:<\/strong>\r\nIf you want to run Command Prompt with TrustedInstaller, enable all \r\nprivileges and the default Integrity Level.\r\n<strong>NSudo -U:T -P:E cmd<\/strong><\/pre>\n<h4>Context menu addition<\/h4>\n<ul>\n<li>Run NSudo with <code>-Install<\/code> parameter. It copies NSudo to the Windows directory and adds the context menu.<\/li>\n<li>To remove the context menu, run NSudo with the <code>-Uninstall<\/code> parameter. It removes NSudo from the Windows directory and the context menu.<\/li>\n<\/ul>\n<hr \/>\n<h3><a id=\"runx\"><\/a>RunX from d7xTech<\/h3>\n<p>RunX is a digitally signed executable that can launch any process with a Local System account or TrustedInstaller account privileges. It is also designed to optionally pass command line arguments to that app without having to open an admin Command Prompt window and navigate to the appropriate path first. It can also capture and display the program\u2019s exit code.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24077\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/runx-run-as-system.png\" alt=\"runx - run as system\" width=\"419\" height=\"288\" \/><\/p>\n<p><em>The &#8220;Run inside CMD.EXE&#8221;<\/em> option will launch Command Prompt window first and launch the target program from there. That way you can see the exit code in the Command Prompt window or run subsequent commands under System privileges.<\/p>\n<p>Download RunX and RunXcmd from:<\/p>\n<pre>New App: RunX and RunXcmd \u2013 d7xTech.com (formerly Foolish IT):\r\nhttps:\/\/www.d7xtech.com\/new-app-runx-and-runxcmd\/<\/pre>\n<p>The package also includes a console version of the tool named\u00a0RunXcmd. It&#8217;s designed to do the above but for scripting purposes, when you need your script to wait on the process you are running to terminate, and\/or when you or your script needs to know the process exit code via <code>%errorlevel%<\/code> output.<\/p>\n<p>Here&#8217;s the list of command-line switches it supports:<\/p>\n<pre>Usage:\r\nRunXcmd.exe \/exec=\"[path\\file.exe]\" \/wait \/account=[user|system|ti] \/args=[]\r\n\r\nArguments:\r\n\/exec=\"[path\\file.exe]\" (Required; must be wrapped in quotes.)\r\n\/wait (Optional, Wait for the app to finish; useful in scripting.\r\nRunX also returns the \/exec file's exit code as it's own.)\r\n\/account=[user|system|ti]\r\n(Optional, Run as User(Non-Admin), System, or TrustedInstaller.\r\nIf this switch is not specified, TrustedInstaller is assumed.)\r\n\/args= (Optional, must be the LAST switch, everything after this is passed\r\nto the \/exec file. Do NOT wrap args in quotes, unless you intend for\r\nthe quotes to be passed to the \/exec file.)\r\n\r\nExample: (Run as Standard User with Arguments)\r\n\r\nRunXcmd.exe \/exec=\"c:\\path\\file.exe\" \/account=user \/args=\/Arg1 \/Arg2 \/Etc.\r\n\r\nExample: (Run as Trusted Installer and Wait\/Return Exit Code)\r\n\r\nRunXcmd.exe \/exec=\"c:\\path\\file.exe\" \/wait<\/pre>\n<hr \/>\n<p><strong>Editor&#8217;s Pick:<\/strong> <strong>Advanced Run<\/strong> for GUI (and CLI), and <strong>PsExec<\/strong> for CLI.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many Windows system files, registry keys, and services are owned by the SYSTEM (a.k.a LocalSystem) account, which has a high privilege level. If you need to modify a registry key owned by the SYSTEM account, there are at least two options. The first option that comes to your mind is to take ownership of the &#8230; <a title=\"How to Run a Program as SYSTEM (LocalSystem) Account in Windows\" class=\"read-more\" href=\"https:\/\/www.winhelponline.com\/blog\/run-program-as-system-localsystem-account-windows\/\" aria-label=\"Read more about How to Run a Program as SYSTEM (LocalSystem) Account in Windows\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,7],"tags":[106,335,441],"class_list":["post-10158","post","type-post","status-publish","format-standard","hentry","category-utilities","category-windows","tag-command-prompt","tag-nircmd","tag-registry"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":44,"url":"https:\/\/www.winhelponline.com\/blog\/task-scheduler-service-grayed-out-windows\/","url_meta":{"origin":10158,"position":0},"title":"Task Scheduler Service Grayed Out in Services MMC","author":"Ramesh","date":"March 4, 2008","format":false,"excerpt":"When you open the Services management console (services.msc), the Task Scheduler service may be in a disabled state. In the Task Scheduler properties page, all the options may be grayed out, and the service Startup type cannot be changed. RELATED: How to View and Modify Service Permissions in Windows This\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/03\/schedule-grayed.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1505,"url":"https:\/\/www.winhelponline.com\/blog\/how-to-take-ownership-of-registry-keys-and-assign-full-permissions\/","url_meta":{"origin":10158,"position":1},"title":"Take Ownership of a Registry Key And Assign Full Permissions","author":"Ramesh","date":"August 28, 2015","format":false,"excerpt":"Certain areas of the Windows registry cannot be accessed due to the Permissions assigned (or lack thereof) for those keys. For instance, some registry keys are owned by the LocalSystem account, and some are owned by TrustedInstaller. There are legitimate cases where you need to access a registry key to\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/10\/reg-key-error-delete.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":10139,"url":"https:\/\/www.winhelponline.com\/blog\/fix-windows-update-error-0x80070422-in-windows-10\/","url_meta":{"origin":10158,"position":2},"title":"Error 0x80070422 in Windows Update and Store","author":"Ramesh","date":"July 3, 2019","format":false,"excerpt":"When you open Settings and check for updates on your Windows 10 or 11 computer, the error 0x80070422 appears. Here is the entire error message: There were some problems installing updates, but we'll try again later. If you keep seeing this and want to search the web or contact support\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"store error 0x80070422","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/store-error-0x80070422-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/store-error-0x80070422-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/store-error-0x80070422-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/07\/store-error-0x80070422-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":19471,"url":"https:\/\/www.winhelponline.com\/blog\/cannot-import-reg-not-all-data-was-successfully\/","url_meta":{"origin":10158,"position":3},"title":"Cannot import .REG file; Not all data was successfully written to registry","author":"Ramesh","date":"October 22, 2020","format":false,"excerpt":"Sometimes, when applying the registry settings using a .reg file, you may get one of the following errors: Cannot import file.reg: Not all data was successfully written to the registry. Some keys are open by the system or other processes, or you have insufficient privileges to perform this operation. Cannot\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"cannot import .reg file - error accessing registry","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-4.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-4.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-4.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-4.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":31967,"url":"https:\/\/www.winhelponline.com\/blog\/trustedinstaller-service-missing-error-3\/","url_meta":{"origin":10158,"position":4},"title":"Windows Modules Installer (TrustedInstaller) Service Missing or Throws Error 3","author":"Ramesh","date":"January 15, 2023","format":false,"excerpt":"When you open the Services MMC, the Windows Modules Installer Service (\"TrustedInstaller\") service may be missing from the list. On some systems, the Windows Modules Installer service may exist, but attempting to start the service causes error 3. Windows could not start the Windows Modules Installer service on Local Computer.\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"Regedit.exe File Import menu - Registry Editor","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/01\/regedit-file-import-menu.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":3815,"url":"https:\/\/www.winhelponline.com\/blog\/run-program-as-trustedinstaller-locked-registry-keys-files\/","url_meta":{"origin":10158,"position":5},"title":"How to Run Programs as TrustedInstaller to Write to Certain Registry Keys or Files","author":"Ramesh","date":"August 15, 2016","format":false,"excerpt":"Even when running programs elevated (Administrator), certain registry keys and files are not writable. This may be because the files are owned by TrustedInstaller, and no write access granted for Administrators. In that case, running the program as TrustedInstaller can help fix a locked registry key or clear a file\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"advancedrun - trustedinstaller","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/advancedrun-screen.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/advancedrun-screen.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/advancedrun-screen.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/advancedrun-screen.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/10158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=10158"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/10158\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=10158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=10158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=10158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}