- Использование запуска приложения с учетной записи администратора в Windows Server 2003
- Аннотация
- Действия, необходимые для запуска приложения с учетной записи администратора
- Missing «Run as administrator» option in context menu in start menu searches
- Replies (12)
- How To Run Windows Update From Command Line
- Check for Windows updates using Windows Settings
- Run Windows Update from PowerShell (Command-line)
- Run Windows Update from Command Prompt (Command-line)
- Continue Reading:
- 14 thoughts on “ How To Run Windows Update From Command Line ”
- 13 ways to use “Run as administrator” in Windows 10
- First things first: About UAC and Run as administrator
- 1. Run a program as admin from the contextual menu of its Start Menu shortcut or tile
- 2. Run as administrator using “Ctrl + Shift + Click” on its Start Menu shortcut or tile
- 3. Run a program as administrator from its desktop shortcut
- 4. Run a desktop app as administrator from its taskbar shortcut
- 5. Run a program as administrator from its right-click menu
- 6. Use “Run as administrator” from File Explorer’s ribbon
- 7. Run a desktop app as admin from the Search window
- 8. Run a program as administrator using “Ctrl + Shift + Enter” on its taskbar search result
- 9. Run a program as administrator from the Run window
- 10. Run as admin from the Task Manager
- 11. Run a desktop app as admin using the RunAs command in Command Prompt (CMD) or PowerShell
- 12. Always run a program with administrator permissions
- 13. Run a program with administrator permissions and without a UAC prompt
- Which method(s) do you plan to use?
Использование запуска приложения с учетной записи администратора в Windows Server 2003
В этой статье описывается использование команды для запуска Run as приложения в качестве администратора.
Исходная версия продукта: Windows Server 2003
Исходный номер КБ: 325362
Аннотация
Можно использовать для запуска приложения в качестве администратора, если вы хотите выполнять административные задачи при входе в систему в качестве члена другой группы, например «Пользователи» или Run as «Power Users».
Действия, необходимые для запуска приложения с учетной записи администратора
Чтобы запустить Run as приложение в качестве администратора, выполните следующие действия.
- Найдите приложение, которое нужно запустить в проводнике Windows, консоли управления (MMC) или панели управления.
- Нажимайте и удерживайте клавишу SHIFT, щелкнув правой кнопкой мыши исполняемый файл или значок приложения, а затем выберите «Запустить как».
- Выберите следующего пользователя.
- В полях «Имя пользователя»и «Пароль» введите учетную запись администратора и пароль, а затем выберите «ОК».
- Некоторые приложения могут не поддерживать использование Run as команды.
- Возможно, вы не сможете запустить приложение, консоль MMC или средство панели управления из сетевого расположения с помощью команды, если учетные данные, используемые для подключения к сетевой сети, отличаются от учетных данных, используемых для запуска Run as приложения. Учетные данные, используемые для запуска приложения, могут не разрешить доступ к одной сетевой сети.
- Вы также можете использовать Run as команду из командной строки. Для получения дополнительных сведений выберите «Начните» и выберите «Выполнить». В поле «Открыть» введите cmd и выберите «ОК». В командной подсказке введите runas /?, а затем нажмите ввод.
Missing «Run as administrator» option in context menu in start menu searches
Replies (12)
* Please try a lower page number.
* Please enter only numbers.
* Please try a lower page number.
* Please enter only numbers.
1. Were there any changes made on the computer prior to the issue?
Follow these methods and check if it helps:
I would suggest you to try performing SFC (System File Checker) scan on your computer and check if the issue still persists. To view how to perform the SFC Scan click on the Kb article and follow the steps.
I would suggest you to creating a new user account and check if you face the similar issue:
1 person found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Now Ive had this with word.
If you press and then right-click the item, is it there then?
My Notepad has the ‘run as admin’ choice, but word does not for me. (TBH I’m not sure if word should or not?) But if I as well, then its there for word.
76 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
3 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Follow these mehtods and check:
I would suggest you to follow these steps:
a. Right click on the program.
b. Under Compatibility tab, check if you have the option “Run this program as an administrator”.
Try to run Microsoft Safety Scanner for any spyware or malware infection and check if it helps.
Note : The Microsoft Safety Scanner expires 10 days after being downloaded. To rerun a scan with the latest anti-malware definitions, download and run the Microsoft Safety Scanner again. Any data files that are infected may only be cleaned by deleting the file entirely, which means there is a potential for data loss.
1 person found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How To Run Windows Update From Command Line
In Windows 10, Windows Update can be found in Settings –> Update & Security –> Windows Update. Normally Windows Update keeps on running in the background and will install new updates automatically.
You can also run Windows Update manually to check for new updates at any time. Here are three ways to check for new Windows updates.
Check for Windows updates using Windows Settings
To check for new updates and configure Windows Update settings, follow the steps below:
- Open Windows Settings (Windows key + i).
- Choose Update & Security.
- Choose Windows Update from the left hand menu.
- Press the Check for updates button in the right hand pane.
Check for updates
Run Windows Update from PowerShell (Command-line)
There is a PowerShell module for Windows Update. You can install and run the module to check for new updates. There are three steps for running Windows Update through PowerShell. Run the following commands step by step:
- Install-Module PSWindowsUpdate Install Module PSWindowsUpdate
This will install the Windows Update module in PowerShell.
Get-WindowsUpdate Get WindowsUpdate
This command will check for updates.
Install-WindowsUpdate Install WindowsUpdate
This command will install the available updates (which were listed in step 2)
Run Windows Update from Command Prompt (Command-line)
Windows Update can also be run through legacy CMD. The only limitation running Windows Update through command prompt is that it won’t show any progress. Only results are shown. Let’s see how to run it:
- Go to Run –> cmd
- Run the following command to check for new updates:
wuauclt /detectnow - Run the following command to install new updates
wuauclt /updatenow
Since the command prompt does not show any progress, a better approach would be to check and install updates at the same time. Here’s the command for this:
wuauclt /detectnow /updatenow
The above mentioned command will work in all versions of Windows including Windows 7 and Windows Server 2008 R2. But if you are using Windows 10 or Windows Server 2016, you can use UsoClient command which has more options than wuauclt. You can run UsoClient with the following switches:
StartScan – Start checking for updates
StartDownload – Start downloading updates
StartInstall – Start installing downloaded updates
RestartDevice – Restart Windows after updates are installed
ScanInstallWait – Check for updates, download available updates and install them
Hopefully this will be useful in situations where you want to automate certain Windows functions. What other purposes do you want to use command line options for running Windows Update?
Continue Reading:
Usman Khurshid is a seasoned IT Pro with over 15 years of experience in the IT industry. He has experience in everything from IT support, helpdesk, sysadmin, network admin, and cloud computing. He is also certified in Microsoft Technologies (MCTS and MCSA) and also Cisco Certified Professional in Routing and Switching. Reach him at Twitter @usmank11
14 thoughts on “ How To Run Windows Update From Command Line ”
Thank you Usman! Wow Microsoft has a new cli USOClient.exe awesome!
Thank you. Refurbished machine – needed to update in order to move from other machine to “new to me” machine after just getting ti to cooperate with the network. I have never run across a machine that would not update before. The cmd options did not work, but the PS option was exactly what I needed. Added to my bag of tricks. Thank you so much!!
usoclient.exe /StartScan does not update the shown ‘Last checked date’ shown in the GUI on a Windows Server 2016 or 2019.
PS C:\> Start-Service wuauserv -Verbose
PS C:\> $updateSession = new-object -com “Microsoft.Update.Session”;$updates=$updateSession.CreateupdateSearcher().Search($criteria).Updates
PS C:\> (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
This is work on a Windows 10 – the Last checked time is updated in the GUI
BUT it’s not workting om Windows 2016 or 2019
Any know of a way to make this work on a Server 2016 ??
I don’t get any of these from article to work. Not even: Start-Service wuauserv -Verbose
PS C:\WINDOWS\system32> Start-Service wuauserv -Verbose
VERBOSE: Performing the operation “Start-Service” on target “wuauserv (wuauserv)”.
Start-Service : Failed to start service ‘wuauserv (wuauserv)’.
At line:1 char:1
+ Start-Service wuauserv -Verbose
+
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],
ServiceCommandException
+ FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand
Please run PowerShell with administrative privileges.
usoclient StartScan does NOT make any changes to the Last checked date shown in the GUI
Neither does the Powershell command Get-WindowsUpdate
In previous Windows I had to updating the Last checked value in registry after performing a scan using the API (as they dont). But MS has moved the location to an unknown place i 2016 and 2019.
Anyone who knows how to update the “Last checked date” from CMD or API .
Function Force-WSUSCheckin($Computer)
<
Invoke-Command -computername $Computer -scriptblock < Start-Service wuauserv -Verbose >
# Have to use psexec with the -s parameter as otherwise we receive an “Access denied” message loading the comobject
$Cmd = ‘$updateSession = new-object -com “Microsoft.Update.Session”;$updates=$updateSession.CreateupdateSearcher().Search($criteria).Updates’
& c:\bin\psexec.exe -s \\$Computer powershell.exe -command $Cmd
Write-host “Waiting 10 seconds for SyncUpdates webservice to complete to add to the wuauserv queue so that it can be reported on”
Start-sleep -seconds 10
Invoke-Command -computername $Computer -scriptblock
<
# Now that the system is told it CAN report in, run every permutation of commands to actually trigger the report in operation
wuauclt /detectnow
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
wuauclt /reportnow
c:\windows\system32\UsoClient.exe startscan
>
>
Hi Glenn, thank you for such a detailed explanation.
Get-WindowsUpdate: The ‘Get-WindowsUpdate’ command was found in the module ‘PSWindowsUpdate’, but the module could
not be loaded. For more information, run ‘Import-Module PSWindowsUpdate’.
At line:1 char:1
+ Get-WindowsUpdate
+
+ CategoryInfo : ObjectNotFound: (Get-WindowsUpdate:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
To remedy that, please try the following:
1. Run Set-ExecutionPolicy -ExecutionPolicy Unrestricted
2. Run Import-Module PSWindowsUpdate
3. Try running Get-WindowsUpdate again.
This worked for me.
13 ways to use “Run as administrator” in Windows 10
In Windows 10, knowing how to run programs as administrator is very important. By default, apps and games in Windows 10 run without administrator permissions, to prevent unauthorized changes to your system. However, there are times when some programs require administrator permissions to work properly or to run specific commands. Windows 10 offers you the ability to run programs as admin without having to disable anything. Here are all the methods to use “Run as administrator” on any desktop app in Windows 10:
First things first: About UAC and Run as administrator
In early versions of Windows, applications had system-wide privileges, which was a security risk. All of Microsoft’s operating systems from Windows Vista onward, including Windows 10, include UAC or User Account Control, a security feature that prevents unauthorized changes to the operating system. Trying to run an application as administrator is one of the changes that require administrative privileges. Before the selected program is launched, a UAC prompt is triggered, asking for permission. If you run the application from an account without administrator permissions, the UAC prompt asks you to enter an administrator password. Without the admin password, the program does not launch.
In Windows 10, you can only run a program with administrator permissions if it is a desktop app. Some of these applications, like security software, cannot run correctly without having administrative permissions. Windows apps that are installed from the Microsoft Store cannot be run with administrative privileges in Windows 10. Furthermore, they have the same level of permissions as a normal user account, so they are not allowed to make changes to advanced system settings or the Windows Registry.
You can learn more about the difference between desktop apps and UWP apps and figure out which ones you can “Run as administrator” by reading What is a Windows app? How is it different from a desktop app or a program?.
1. Run a program as admin from the contextual menu of its Start Menu shortcut or tile
In Windows 10, you can launch a program with administrative permissions by using the contextual menu of its Start Menu shortcut. First, open the Start Menu. Then, find the shortcut of the program you want to launch in the All apps list, and right-click or press-and-hold on it to open a contextual menu. Click, tap, or hover over the More option, and then click or tap on “Run as administrator.“
If you have a tile for your desktop app available in the Start Menu, right-click or press-and-hold on it to open a contextual menu. Access More and then click or tap on “Run as administrator.“
2. Run as administrator using “Ctrl + Shift + Click” on its Start Menu shortcut or tile
Open the Start Menu and locate the shortcut of the program you want to launch as administrator. Hold down both the Ctrl and the Shift keys on your keyboard and then click or tap on that program’s shortcut.
You can also use the “Ctrl + Shift + Click/Tap” shortcut on an app’s Start Menu tile to run it with administrator permissions in Windows 10.
During our tests, this method did not work every time, so if that is the case for you, either try again or consider running the app as administrator another way.
3. Run a program as administrator from its desktop shortcut
Find the desktop shortcut for the program you want to run as admin or create one yourself. Then, right-click or press-and-hold on it to open a contextual menu. Click or tap on the “Run as administrator” option.
4. Run a desktop app as administrator from its taskbar shortcut
In Windows 10, you can also run a desktop app with administrator permissions from its taskbar shortcut. Right-click or press-and-hold on the shortcut, and then right-click or press-and-hold again on the program’s name. Then, from the menu that opens, choose “Run as administrator.”
You can also use the “Ctrl + Shift + Click/Tap” shortcut on an app’s taskbar shortcut to run it with administrator permissions in Windows 10.
5. Run a program as administrator from its right-click menu
Although easier to find, shortcuts are not the only way to run a program as administrator in Windows 10. You can perform the same action from the main executable file’s contextual menu.
Open File Explorer and find the desktop app’s executable. Right-click or press-and-hold on it to open the contextual menu, and then click or tap on “Run as administrator.“
6. Use “Run as administrator” from File Explorer’s ribbon
Find the program’s main executable in File Explorer. Select it, and then click or tap on the Manage tab from the ribbon.
The option you need is displayed in the Run section of Application Tools. Click or tap on the upper half of the “Run as administrator” button to give the selected app admin permissions.
As an alternative, you can also press the lower half of the “Run as administrator” button and then click or tap on the “Run as administrator” option from the drop-down menu.
7. Run a desktop app as admin from the Search window
In the taskbar search field, type in the name of the program that needs to run with administrator permissions. Then, click or tap on the “Run as administrator” option displayed on the right side of the Search window.
Obviously, when you see the UAC prompt asking for permission to run the app as admin, click or tap Yes.
8. Run a program as administrator using “Ctrl + Shift + Enter” on its taskbar search result
Type the name of the program in your taskbar’s search field. If there are multiple results, use the arrow keys on your keyboard to highlight the program you want to run as administrator. Then, simultaneously press the Ctrl + Shift + Enter keys on your keyboard.
9. Run a program as administrator from the Run window
Open the Run window and type in the name of the executable for the program you want to run as administrator. Then hold down the Ctrl and Shift keys on your keyboard and click or tap on OK.
Alternatively, after typing in the name of the program’s main executable, press the Ctrl + Shift + Enter keys on your keyboard at the same time.
10. Run as admin from the Task Manager
Another way to launch a program as administrator in Windows 10 is to start it using the Task Manager. To begin, open the Task Manager. Then, if it opens up in its compact view, click or tap on the More details button.
In the expanded Task Manager, open the File menu and click or tap on “Run new task.“
This opens the “Create new task” window. You can use its Open field to enter the path to the program you want to launch as administrator, or you can click or tap on Browse to navigate to it. Then, make sure to check the “Create this task with administrative privileges.” option and click or tap on OK.
TIP: An advantage of using this method to launch programs as administrator is that you skip the UAC part of the process. That is because the app automatically inherits the permissions of the Task Manager – in our case, administrator permissions – so all you have to do is check the box to enable the option, as seen above. The option is missing if you only have standard user permissions on the device.
11. Run a desktop app as admin using the RunAs command in Command Prompt (CMD) or PowerShell
If the command line is your favorite way of asking your computer to do what you want, you can also access Command Prompt or PowerShell to run a program as administrator. Enter the following command in the CMD or PowerShell window, adjusting it to fit your needs:
runas /user:”your_computer_name\administrator_name” “C:\path\program.exe”
Replace your_computer_name with your computer’s name, administrator_name with the name of a user account that is an administrator on your system, and C:\path\program.exe with the complete path to the program that you want to run as administrator.
As seen in the image below, if you enter the command correctly, you are also asked to enter the administrator’s password. Then, press Enter on your keyboard once again.
TIP: Using this method to launch programs as administrators, you skip the UAC part of the process.
12. Always run a program with administrator permissions
To avoid constantly having to use the methods illustrated above on desktop apps accessed on a regular basis, you can set a program to always run with administrator permissions.
First, open File Explorer and find the main executable of the program you want to run. Right-click or press and hold on it to open the contextual menu. Then, click or tap on Properties.
In the Properties window, go to the Compatibility tab. At the bottom of the window, check the box next to the “Run this program as an administrator” option, and then click or tap on Apply or OK.
This setting is applied, and, from now on, the program always runs with administrator permissions. Follow the same steps if you want to disable the option. You can also edit the Properties of a program’s shortcut to avoid tampering with its main executable. To begin, right-click or press-and-hold on a program’s shortcut to access its contextual menu, and click or tap on Properties.
Then, in the shortcut’s Properties window, select the Shortcut tab. Click or tap on the Advanced button to open Advanced Properties.
In the Advanced Properties window, check the box next to “Run as administrator” and then click or tap OK.
Finally, you are returned to the Properties window, where you have to click or tap on OK or Apply, and you are done.
The settings are applied, and your program works with administrative permissions as long as you open it using the same shortcut. When you use the methods in this section, the UAC prompts you as soon as you try to launch the app.
13. Run a program with administrator permissions and without a UAC prompt
Using the Task Scheduler, you can run a program as administrator without being prompted by the UAC (User Account Control) every time. It is simple, and you don’t have to disable UAC, thus compromising Windows 10’s security. We put together a detailed step by step guide to help you: Use the Windows Task Scheduler to run apps without UAC prompts and admin rights.
Which method(s) do you plan to use?
In Windows 10, there are fewer apps that need to run with administrator permissions than in older versions of Windows. However, a few legitimate programs still require elevated privileges. The main thing to remember is that even if you are logged in with an administrator account, you regularly run apps as a standard user. This means that if you need to run a program that requires administrator permissions, you can just use one of the methods described above and then approve it in the UAC prompt. Which of the method(s) illustrated do you plan to use? Did you already use some of them? Let us know in a comment.