Require administrator privileges ошибка

Обновлено 12.05.2021

Необходимо запустить инсталлятор от имени администратораДобрый день! Уважаемые читатели и гости одного и популярных IT порталов для системных администраторов Pyatilistnik.org. В прошлый раз мы с вами разбирали утилиты и методы подключения к удаленному рабочему столу Windows. В сегодняшней публикации я хочу вам показать. как выходить из ситуации, когда вы администратор на компьютере, но не можете установить дистрибутив и получаете ошибку «Необходимо запустить инсталлятор от имени администратора«.

Описание проблемы

Я работаю в очень крупной организации, и поэтому у нас легко привлекают для каких-то работ подрядчиков. Появилась задача модернизировать сервис Directum, это такой документооборот. Нашли подрядчика, создали для него виртуальную машину и выдали полные административные права. Через какое-то время подрядчик обратился с проблемой, что у него нет прав на установку программ и он получал ошибку:

Для установки клиентской части системы DIRECTUM необходимо запустить инсталлятор от имени администратора

Необходимо запустить инсталлятор от имени администратора

В английском варианте это выглядит вот так:

You must be logged in as an administrator when installing this program

You must be logged in as an administrator when installing this programm

В качестве операционной системы выступает Windows 10 1909.

Просмотр свойств системы Windows 10

Наверняка многие скажут, так щелкните просто правым кликом по файлу и выберите пункт «Запуск от имени администратора«. Сказано, сделано. Как видите у MSI файла просто этот пункт будет отсутствовать.

Свойства MSI файла

Попробуем зажать клавишу Shift и выбрать из меню пункт «Запуск от имени другого пользователя«.

Запуск MSI от имени другого пользователя

Даже обладая так же административными правами на данной системе вы получите ошибку:

Windows не удалось получить доступ к указанному устройству, пути или файлу. Возможно, у вас нет нужных разрешений для доступа к данному объекту

Windows не удалось получить доступ к указанному устройству, пути или файлу. Возможно, у вас нет нужных разрешений для доступа к данному объекту

Как обойти ошибку «Необходимо запустить инсталлятор от имени администратора»

Самый простой и действенный метод, который я использую в своей практике, это запуск командной строки или оболочки PowerShell в режиме администратора. Благодаря этому методу вы обойдете ограничение на запуск MSI пакетов в режиме администратора. Далее, когда вы запустили, например командную строку, вам необходимо перейти в каталог, где лежит ваш MSI пакет. В моем примере, это папка C:Share. Выполним команду:

Командой dir мы выведем содержимое каталога.

Как обойти ошибку "Необходимо запустить инсталлятор от имени администратора"

Запускаем ваш MSI пакет.

В PowerShell это просто .имя.MSI в cmd это просто имя.MSI

Как видите, теперь ошибка «You must be logged in as an administrator when installing this program» не появилась и наш дистрибутив готов к дальнейшей установке.

Запуск MSI пакета в PowerShell

Установка MSI через msiexec

Есть такая утилита командной строки msiexec, если вы ее запустите со специальным ключом, то она сразу установит MSI пакет, вам даже не нужно запускать командную строку в режиме администратора, для этого есть ключ /a. Выполните команду в cmd, PowerShell или вообще окне выполнить.

msiexec /a C:ShareClient.msi (Где C:ShareClient.msi путь до вашего MSI)

Установка MSI через msiexec

Добавление пункта Install as Administrator

Еще у вас есть возможность внести изменение в реестр Windows и добавить в принудительном порядке пункт «Install as Administrator» для MSI пакетов. Для этого вы можете скачать у меня готовый reg файл или создать собственный вот с таким содержимым:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOTMsi.Packageshellrunas]
@=»Install &As Administrator…»

[HKEY_CLASSES_ROOTMsi.Packageshellrunascommand]
@=»msiexec /i «%1″»

Далее запускаем его и соглашаемся с внесением изменений.

Добавление через реестр пункта Install as Administrator для MSI

Теперь у вас при правом клике по MSI пакету, будет высвечиваться пункт «Install as Administrator»

Добавление пункта Install as Administrator

На этом у меня все, мы с вами научились обходить ошибку «Необходимо запустить инсталлятор от имени администратора» при установке MSI. С вами был Иван Семин, автор и создатель IT портала Pyatilistnik.org.

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account

Open

yjfvictor opened this issue

Aug 24, 2014

· 4 comments

Comments

@yjfvictor

When you type install or patch command, the UAC dialog pops up to request for the administrator privilege, because Windows 7 thinks that any executable file including «install», «patch», «update» within its filename is a installer and therefore the administrator privilege is required. Please fix this bug.

@yjfvictor

Solution

The solution is to write a manifest file listed below for the executables, in order to persuade UAC that it does not require administrative privilege.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <!-- Make sure that UAC believes
        that it does not require administrative privilege -->
        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>

The filenames of the manifest files should be install.exe.manifest and patch.exe.manifest, and then put them in the same folder as install.exe and patch.exe.

If the UAC prompt still pops up, change the timestamp of install.exe and patch.exe to persuade Windows to pick up the new manifest file.

@yjfvictor
yjfvictor

changed the title
install.exe and patch.exe requires the administrator privilege on Windows 7

install.exe and patch.exe require the administrator privilege on Windows 7

Aug 24, 2014

@iongion

created the manifest but an error appears afterwards:
The requested operation requires elevation

@iongion

@yjfvictor

Creating a manifest file is enough. The mt.exe command is not required. You can release two files. The mt.exe is just for someone who really wants to release only one single file.

What you need to do for prevent The requested operation requires elevation is to let the last modified time of the executable later than the manifest file. You can type touch patch.exe to update the last modified time of the executable.

Embedding the manifest file in the executable file via mt.exe is an alternative way, which can reduce the problem of the last modified time.

2 participants

@iongion

@yjfvictor

I am having the EXACT same problem that is described above, only with AutoCAD. I am a net. tech for a school district, and our little hackers, I mean children have very restrictive accounts.

Ironically it is only AutoCAD that doesn’t work. Inventor launches its setup and launches just fine. Autodesk architectural works just fine.

But when the student launches AutoCAD it throws the «you need admin » message.

Can you explain what can be done to get around this in greater detail?

By the way, strangely, if the user first launches AutoCAD, it gives that error, but if they first launch inventor, close it, they can then launch AutoCAD…..

How to Fix Windows Activation Error: 0xC004F025 Access Denied

How to Fix Windows Activation Error: 0xC004F025 Access Denied

Table of Contents

Neck and Shoulder Relaxer

What is error code 0xC004F025 ?

Windows error code 0xC004F025 points to an issue related to Windows Activation. The most common reason for the 0xC004F025 Windows 10 activation error is because of the account type of the logged-in user. In Order to activate or rearm Windows, the logged-in user must be an Administrator. There are other reasons for this error, please continue reading.

Common Errors

0xC004F025 The Software Licensing Service reported that the action requires administrator privilege. 
Error: 0xC004F025 Access Denied: The requested action requires elevated privileges 
We can't activate Windows on this device right now. You can try activating again later or go to the Store to buy genuine Windows. Windows Activation Error 0xC004F025

Determine the type of product/license key in your system. Is it a Retail, OEM, or Volume license?

There are 3 types of licenses OEM, Retail & Volume.

  1. OEM (Original Equipment Manufacturer) – Licenses that are used by device manufacturers to install on the devices they manufacture (Laptop/Desktop etc).
  2. Retail Windows License – License key you bought from a local store or from an authorized online seller.
  3. MAK Volume License – This type of license are used by corporates/large business, Government, Educational institutions, etc.

Determine your license type using this command through the command prompt or through PowerShell.

Open the command (cmd.exe) prompt, copy and paste this command given below, and press enter.

 slmgr /dli
CMD.EXE - Find Windows 10 Product Key/License Type
CMD.EXE – Find Windows 10 Product Key/License Type

PoweShell Command – slmgr /dli

CMD.EXE - Find Windows 10 Product Key/License Type
PowerShell – Find Windows 10 Product Key/License Type
  • You cannot re-activate Windows if your device was installed with an OEM license and you have changed the hardware of the device, for eg: motherboard or Hard drive) – However, you may contact Microsoft Support for activation help https://partner.support.services.microsoft.com/en-us/contactus/windows/tech-services/
  • You are using a Windows 10 MAK license. MAK licenses is used by corporates/businesses, you might not be able to activate such license if you are an individual/personal user – Contact Microsoft Support
  • You bought a license from a third-party online seller – That license might be reused/fake.
  • You upgraded to the wrong version of Windows (for eg: Upgraded from Windows 7 Pro to Windows 10 Enterprise). in this case you need to reinstall windows to the correct the version of Windows.

1 .How to fix “Error: 0xC004F025 Access Denied: The requested action requires elevated privileges” while executing slmgr.vbs -rearm command ?

What is error code 0xC004F025 ?

Resetting the license status of the OS using “slmgr.vbs -rearmrequires administrative privilege. Follow this method to execute the program with administrator privilege

  • Run “Command prompt” as administrator

How to fix 0xC004F025 ?

  • Enter your command, for eg: “slmgr -rearm” and then press enter key.

Please read this article to know how to run any program as administrator.

Rectify Error: 0xC004F025

2. How to solve Windows Activation Error – “We can’t activate Windows on this device right now. You can try activating again later or go to the Store to buy genuine Windows. Error code: 0xC004F025” ?

Use inbuilt Windows 10 Activation troubleshooting tool to fix activation error 0xC004F025.

  1. Login to Windows as Administrator (How to change local user account to an administrator account?)
  2. Click Start menu-> Open Windows Settings, then click Activation from left pane.
  3. Click “Change product key” link and re-enter the Windows 10 product Key you have.
  4. Then click activate.

Windows Change Product Key

Windows Change Product Key
Windows Activation - Re arm What is error code 0xC004F025 ?
Windows Product Key

If the activation failed, then it is better to contact Microsoft Support Team and they will help you to fix the error, contact URL given below.

  1. Microsoft Online Support (Chat /Call etc.): https://partner.support.services.microsoft.com/en-us/contactus/windows/tech-services/
  2. Find a local Microsoft customer service phone number in your country: https://support.microsoft.com/en-us/help/4051701/global-customer-service-phone-numbers

Please note: You cannot downgrade Windows 10 Pro or Windows 10 Enterprise Edition to Windows 10 Home Edition. You have to do a clean installation for activating Windows 10 Home Edition.

Where do I get my Windows 10 product key?

Get genuine Windows 10 Product key/Licenses from amazon.com, if you don’t have valid/genuine Windows product key/license.

  • Download Microsoft Windows 10 Pro
  • Download Microsoft Windows 10 Home
  • Buy Microsoft Windows 10 Home – USB Flash Drive
  • Buy Microsoft Windows 10 Pro – USB Flash Drive

  • Remove From My Forums
  • Вопрос

  • I installed msi package for single user in C:Usersuser_nameAppDataLocalApps. Installation didn’t require elevated privileges, but when I want update this package using command:

    MSIExec /fvamus xxx.msi REINSTALL=ALL /l*xv runmsi.log

    the UAC prompt appears.

    Update log contains information that elevation is not required:

    MSI (s) (C4:F0) [07:44:31:503]: Determined that existing product (either   this product or the product being upgraded with a patch) is a dual mode package installed in per-user mode.
    […]
    MSI (s) (C4:F0) [07:44:31:504]: MSI_LUA: Package is a dual mode package and is being installed in Per-User mode. No elevation is required.
    […]
    MSI (s) (C4:F0) [07:44:32:072]: MSI_LUA: Entering Credential Request. hwnd = 1376978, MsiAction = 3, productname = X, version = 5.1.0.0201, language = 1045, manufacturer = X
    MSI (s) (C4:F0) [07:44:32:072]: MSI_LUA:  (continued)… packagepath = C:WINDOWSInstaller1ac6cc.msi, packagesource = C:UsersxxxTempxxx_updatexxx.msi, dwUpdates = 0
    MSI (s) (C4:F0) [07:44:33:242]: MSI_LUA: Credential Request return = 0x800704C7

    Installed package and updated package are signed with same, correct certificate. I tested this scenario on Windows 10 with Anniversary Update.

Понравилась статья? Поделить с друзьями:
  • Request timed out ошибка icmp 11010
  • Request mespilock failed ошибка
  • Request failed with status code 500 росреестр ошибка
  • Request exception ошибка
  • Reptilicus ошибка при разборе ответа