An appropriate resource file could not be found for file error 2

Здравствуйте,
  • Remove From My Forums
  • Вопрос

  • Здравствуйте,

    Имеется контроллер домена на 2012R2 (русская версия)

    Хочу перевести сервера на английскую версию.

    Установил еще один контроллер домена на английской версии Windows Server 2016 Version 1607 (OS Build 14393.693)

    Но там при использовании «Group Policy Management» выдаются ошибки типа:

    An appropriate resource file could not be found for file
    \mydomain.ruSysVolmydomain.ruPoliciesPolicyDefinitionsActiveXInstallService.admx (error=2): The system cannot find the file specified.

    Нашел статью

    https://support.microsoft.com/en-us/help/2688272/wrong-error-message-for-missing-.adml-files

    согласно которой нехватает русских .adml файлов.

    Как решить эту проблему? У меня нет и не будет русского 2016-го сервера.

    Как заставить 2016 сервер отказаться от использования русских adml?

Skip to content

images 3 4

The Central Store is a file location that is checked by the Group Policy tools and it is a folder structure created in the “Sysvol” directory on the domain controllers in each domain in your organization. You will need to create the central store only once on a single domain controller for each domain in your organization. The File Replication service then replicates the central store to all domain controllers. It is recommended that you create the central store on the primary domain controller because the Group Policy Management Console and Group Policy Object Editor connect to the primary domain controller by default. The central store consists of a root-level folder containing all language-neutral ADMX files and subfolders containing the language-specific ADMX resource files. For more information about the difference between an ADM and ADMX file, see What are the differences between an ADM and ADMX file, and creating the central store for Group Policy Administrative Templates,

The ADMX file defines the Group Policy settings. The ADML file contains the language to be used with the file. This means the ADMX file can easily be used with any language assuming an ADML file for the language exists
Screenshot-2021-03-20-at-17.49.24

The reason for this error is that the appropriate ADML files were not copied as well to the following location below.

C:WindowsSYSVOLsysvolTechdirectarchive.localPoliciesPolicyDefinitions
  • Screenshot-2021-03-19-at-23.07.54
  • Screenshot-2021-03-20-at-17.29.52

Solution: Ensure to copy the appropriate ADML files for the ADMX files you wish also to the sysvol folder. We already have the ADMX files, we will have to update the ADML files in the following location as well.

C:WindowsSYSVOLsysvolTechdirectarchive.localPoliciesPolicyDefinitions

All settings for MBAM client deployments are configured through Group Policy. The first thing you will need to do is to update your policy central store with the MBAM ADMX group policy files which can be downloaded from Microsoft 

Screenshot-2021-03-20-at-18.11.46

Now, you should be able to create your policies without errors as shown below

Screenshot-2021-03-20-at-18.15.37

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

I have two domain controllers. The primary is Server 2016 (DC1) and the secondary is Server 2012 R2 (DC2). I’m getting the following error on the Server 2012 R2 DC:

An error has occurred while collecting data for Administrative Templates.

The following errors were encountered:

An appropriate resource file could not be found for file C:WindowsPolicyDefinitionsFileServerVSSAgent.admx (error = 2): The system cannot find the file specified.

An appropriate resource file could not be found for file C:WindowsPolicyDefinitionsSearchOCR.admx (error = 2): The system cannot find the file specified.

An appropriate resource file could not be found for file C:WindowsPolicyDefinitionsTerminalServer-WinIP.admx (error = 2): The system cannot find the file specified.

Namespace ‘Microsoft.Policies.WindowsStore’ is already defined as the target namespace for another file in the store. File C:WindowsPolicyDefinitionswinstoreui.admx, line 4, column 80

I have tried an SFC Scan and DISM Repair and both come back error free. I’m also unable to replace the above files from DC1 to DC2. I’m not sure what to do now.

enter image description here

I had uninstalled some updates, and after that whenever I open gpedit.msc I will be greeted by this error message twice, the second time its font is black & bold.

I misundertood this first, thought it is because the file is not present, but it still has leftover registry entries(or some config files), and gpedit.msc is configured to open it when running, thus generating this error.

Turns out there is WindowsMediaDRM.admx but .en-USWindowsMediaDRM.adml is missing, what «An appropriate resource file» actually refers to, its vagueness caused my confusion.

I know it can be solved by copying the file from another computer, I don’t want to do it, as all other computers I can access will cost my money…

My system is Windows 10 version 20H2, edition Windows Pro N for Workstations, 64 bit, OS Build 19042.631, Microsoft Docs:ADMX_WindowsMediaDRM says Pro isn’t supported, I assume this means there should not be this WindowsMediaDRM.admx in %WINDIR%PolicyDefinitions, but it actually should be present;

C:WINDOWSsystem32>dism /online /cleanup-image /restorehealth /source:E:Sourcesinstall.wim

Deployment Image Servicing and Management tool
Version: 10.0.19041.572

Image Version: 10.0.19042.631

[===========================84.9%=================         ]
[==========================100.0%==========================] The restore operation completed successfully.
The operation completed successfully.

C:WINDOWSsystem32>sfc /scannow

Beginning system scan.  This process will take some time.

Beginning verification phase of system scan.
Verification 100% complete.

Windows Resource Protection did not find any integrity violations.

The error persists… Because the Component Store(%windir%WinSxs) contains only WindowsMediaDRM.admx and since it is present so nothing to be repaired, the missing file is C:WindowsPolicyDefinitionsen-USWindowsMediaDRM.adml and the file isn’t contained in winsxs so it wasn’t restored.

Simply installing «Administrative Templates (.admx) for Windows 10 October 2020 Update.msi» did not solve the problem, the error still persists, I tried to copy WindowsMediaDRM.admx from «C:Program Files (x86)Microsoft Group PolicyWindows 10 October 2020 Update (20H2)PolicyDefinitions» to C:WindowsPolicyDefinitions, and found the file to be present:

enter image description here

I had run dir commands to list files of the PolicyDefinitions folders:

%ProgramFiles(x86)%

C:WINDOWSsystem32>dir "C:Program Files (x86)Microsoft Group PolicyWindows 10 October 2020 Update (20H2)PolicyDefinitions" /s /b | find /i "windowsmedia"
C:Program Files (x86)Microsoft Group PolicyWindows 10 October 2020 Update (20H2)PolicyDefinitionsWindowsMediaDRM.admx
C:Program Files (x86)Microsoft Group PolicyWindows 10 October 2020 Update (20H2)PolicyDefinitionswindowsmediaplayer.admx
......
C:Program Files (x86)Microsoft Group PolicyWindows 10 October 2020 Update (20H2)PolicyDefinitionsen-USWindowsMediaDRM.adml
C:Program Files (x86)Microsoft Group PolicyWindows 10 October 2020 Update (20H2)PolicyDefinitionsen-USwindowsmediaplayer.adml
......

%windir%

C:WINDOWSsystem32>dir "C:WindowsPolicyDefinitions" /s /b | find /i "windowsmedia"
C:WindowsPolicyDefinitionsWindowsMediaDRM.admx

With the help of @Rambound I understood the cause of this and recognized my assumption as erroneous, I had solved it by simply copying the file at this path:

C:Program Files (x86)Microsoft Group PolicyWindows 10 October 2020 Update (20H2)PolicyDefinitionsen-USWindowsMediaDRM.adml

To this path:

C:WindowsPolicyDefinitionsen-USWindowsMediaDRM.adml

I still don’t understand why Windows always gives vague error messages, had the error message not be so vague but clear, I wouldn’t be confused about its meaning and solve it right away…

Содержание

  1. Обновление прошивки Allied Telesis
  2. Содержание
  3. Обновление через командную строку (CLI)
  4. Подключаемся к коммутатору
  5. Сбор информации
  6. Загрузка нового ПО (прошивки)
  7. Создание резервной копии
  8. Обновление прошивки
  9. Удаление устаревших файлов
  10. Обновление через Xmodem
  11. Decompile and recompile issue #2514
  12. Comments
  13. admx/adml files correctly placed, resource files not found, why??
  14. Ensure AV Gear Plays Nice on the Corporate Network
  15. 12 Replies

Обновление прошивки Allied Telesis

Содержание

Обновление через командную строку (CLI)

Рассмотрим обновление прошивки (firmware) коммутаторов/маршрутизаторов Allied Telesis на примере AT-9812 (Layer 3).

Подробная инструкция на английском языке находится на сопроводительном диске в файле upgrade.pdf.

Подключаемся к коммутатору

Подключиться можно через COM порт, или по telnet на 23-й порт, указав адрес коммутатора.

В Windows для этих целей можно использовать PUTTY.

В Linux встроенный терминал довольно удобен.

Все команды запоминать не надо, достаточно помнить что символ «?» выдаст список команд, а если указать его после команды, то подскажет её параметры.

Сбор информации

Прежде всего узнаем чем мы располагаем. Для этого используем комманды:

  • show file — показать все файлы
  • show release — показать тип используемой лицензии, не ограничена ли она. «full» означает не ограничена, иначе апгрейд может не пройти.
  • show install — показать какие файлы сейчас используются системой (по сути они и образуют систему)
  • show gui — показать используемый файл для интерфейса и его параметры
  • show system — общая информация. Здесь можно узнать сколько памяти в коммутаторе
  • show ffile check — показать файлы и инфо по дисковому пространству

Загрузка нового ПО (прошивки)

  1. Скачиваем прошивку с http://www.alliedtelesis.com/support/software/restricted
  2. Распаковываем в каталог на который настроен TFTP сервер. Если это TFTPD от Allied Telesis, то его настраиваем на этот каталог через меню File — Options.
  • rez — firmware release = версия прошивки,
  • rsc — GUI = HTTP сервер
  • hlp — help system = помощь и подсказки

Загрузить файлы на коммутатор можно несколькими способами:

  • Trivial File Transfer Protocol (TFTP)
  • ZMODEM, direct input from an asynchronous port — прямое соединение через COM порт (консоль). Передаёт файлы значительно дольше, но единственный выход, если нельзя использовать IP протокол.
  • HyperText Transfer Protocol (HTTP)
  • Lightweight Directory Access Protocol (LDAP)
  • Secure Copy (SCP)

И загружаем файлы:

В случае загрузки через Zmodem нужно после команды load в терминальной программе нужно выбрать соответсвующий файл для передачи.

В minicom (linux) это Ctrl+A, S

Если не хватает места для всех файлов, но стоит удалить все лишние, если и этого мало, то удалить временно веб-интерфейс (.rsc) и помощь (.hlp),т.к. они для обновления прошивки (.rez) через терминал не нужны, затем, обновив прошивку и проверив, что она встала корректно (перегрузить коммутатор), удалить старую прошивку и загрузить файлы GUI и помощи.

Удаляем ненужные файлы; очищаем мусор (garbage) — аналог корзины в настольных ОС; проверяем свободное место:

Мусор очищается долго, т.ч. нужно подождать несколько минут.

Создание резервной копии

На всякий случай делаем резервную копию конфигурационных файлов

К сожалению никакие другие файлы, кроме конфигурационных, забрать с коммутатора не удаётся даже тех.поддержка Allied Telesis здесь не помогла.

Для контроля можно следить за журналом TFTP сервера — там отражаются и комментируются все действия.

Обновление прошивки

— Если у вас текущая прошивка выше 2.9.1, то можно устанавливать новую одной командой. Я опишу безопасный путь последоватьльного обновления.

— Устанавливаем новую версию файла (прошивки) как предпочитаемую (preferred) и отключаем GUI предыдущей версии:

— Проверяем, что действует новая прошивка командой show install. Можно убедиться, что GUI отключен, ткнувшись на веб интерфейс и получив в ответ: «Resource File Error No resource file specified»

— Устанавливаем новое GUI как предпочитаемое:

— Устанавливаем новый файл помощи:

— Проверяем в браузере всё ли удачно обновилось.

Удаление устаревших файлов

— После того как мы убедились, что новая прошивка работает корректно (лучше для это дать несколько дней), старые файлы можно удалить

— На этом обновление закончено.

Обновление через Xmodem

В случае сбоя или затирания flash памяти, обновить прошивку можно через Xmodem подключившись к коммутатору напрямую через COM порт.

Обновим прошивку на примере коммутатора AT-8516F (Layer 2+)

Официальная инструкция находится в документе s62-mi_ug_b_v140.pdf, который можно взять с оф сайта http://alliedtelesis.ru/support/software_pid_1917.aspx

Чтобы попасть в меню загрузчика, подключаемся через COM порт и перегружаем коммутатор (выключаем питание). При загрузке, в консоли появится предложение:

Жмём Ctrl+B, далее загружаем образ:

  • В Windows подключаемся с помощью Hyper Terminal и передаём файл из меню Transfer — Send File. Выберем протокол 1K Xmodem (для быстрой передачи)
  • В Linux подключаемся с помощью minicom и передаём файл Ctrl+A (меню), S (послать файл)

После получения прошивки коммутатор перезагрузиться и будет готов к работе. Проверить обновилась ли прошивка можно командой:

Источник

Decompile and recompile issue #2514

Apktool Latest
OS is linux

Believe it or not , if i decompile an apk and try to recompile it again without any changes in code it fails .

You can decompile it , but you are unable to recompile it again even if no changes were made in the code .
Update , forgot to write the logs , here they are :

The text was updated successfully, but these errors were encountered:

Yeah got the same thing :

Best way to check if any changes can be made in an apk is , decompile and try to recompile , if recompile fails without any changes in the code of apk then apktool will never be able to recompile that apk no matter what you do .
I used in twitter.apk the 2.4.1 version but 2.5.0 was also giving the same issues , so the log is from 2.4.1 .

Believe it or not , if i decompile an apk and try to recompile it again without any changes in code it fails .

I would believe it, you are disassembling an application and trying to remake it. That isn’t easy but any stretch of the imagination.

@archos-sa — Your error is not related.

If we take the bugged resource.

It looks bad. That isn’t a valid reference.

So lets check aapt.

Hmm, its a reference to a resourceId. Lets look for it.

We could not decode that resource which explains all of this.

Okay, this is a bug with our handling of multiple package apks. We always assumed manifest resources were on 7F, but these are on 7E. However, we don’t properly load enough data into the attribute parser for manifest at that point in the code to have a mapping of pkgId to name, so this will take some changes.

Yeah no way I see easily to resolve this without major research. Multiple packages in one resources.arsc. If we store them differently, they have the same resources. So we’d need to overhaul extraction code to isolate to one package.

I can fix the decoding error and properly resolve the reference, but then we get:

aapt2 can’t build it since its a non-standard framework.

tldr — need to research dynamic refs more and how these function.

  1. Should we auto split them into different packages / thus resources.arsc during framework install?
  2. Automatically move resources to 7F?
  3. Handle automatic loading of non-framework id packages during recompilation

This works perfectly for Twitter, given the following patch above.

  1. Use this patch.
  2. Install the application itself as a package (rename to 126 — 0x7e )
  3. Decode application
  4. Rebuild application

The way this works is that Apktool extracts needed frameworks (1, 126) as requirements but skips 127 ( 0x7F ) as that is private. So when you try and build you get a framework missing exception. That is why installing the application itself, but lying around the pgkId works. So when aapt2 is looking for resources the -I include parameter includes the old application which has the 0x7e resources to find mapping.

This of course is highly dependent on having the old application which true app builders do not. I’ve been messing around with Instant apps like the discussion here — #2524 and trying to figure out how to make Android Studio be very verbose with all its commands to gradle/aapt2 so I can figure out the steps that it does to produce a binary from source.

With that knowledge, I could tweak Apktool to meet that behavior.

Источник

admx/adml files correctly placed, resource files not found, why??

We have two Win2k12R2 domain controllers.

Today I discovered they are throwing this error:
An appropriate resource file could not be found for file \domainname.comsysvoldomainname.comPoliciesPolicyDefinitionsanyfile.admx (error = 2): The system cannot find the file specified.
The .admx Files reported as missing are present in the specified folder.

We DO have correct admx and adml files present in the PolicyDefinitions folder.

How do I fix this so I can edit and maintain group policy??

This started after I imported some GPOs, then discovered the *.adml files had somehow disappeared, I could not find them within any backups.

How do I make group policy become editable again?? I’ve tried several times rebooting the domain controllers.

Ensure AV Gear Plays Nice on the Corporate Network

I must figure out how to get them matched up because all the original adml files disappeared!! 🙁

I don’t know how this happened.

Any suggestions on how to properly match up admx/adml files would be appreciated.

Odd to have files just randomly disappearing. Do you have multiple DCs or just one? It’s possible that replication is causing you issues. Employ tools like dcdiag and see what you get there.

No guarantees whether it’s the best idea or not, but I might:

  • Safely backup whatever is in your shared repository first.
  • Close Group Policy management console.
  • Download current ADMX/ADML files from Microsoft for Windows (https://www.microsoft.com/en-us/download/details.aspx?id=102157 Opens a new window if you’re targeting Windows 10 with your policies; other Administrative Templates are available). And unpack them.
  • If possible, disconnect your problem DC (where files keep disappearing) from the network.
  • Rename «PolicyDefinitions» in your WindowsSYSVOLsysvolDOMAINPolicies folder to «PolicyDefinitions-Old»
  • Create a new «PolicyDefinitions» folder in the same location
  • Copy all the new ADMX/ADML files into their proper places on that DC.
  • Open Group Policy management again and see if things are back to normal.
  • If so, reconnecting to the network should re-enable replication of the good configuration to any other DCs as well. In theory anyway.

I know how to create and work with the central store for policy definitions, this is not a request for how to create the central store, which is already created. 🙂

  • check 423 Best Answers
  • thumb_up 776 Helpful Votes

so, the adml files are in the appropriate language subdirectory, then?

That’s the weird thing, the adml files are in the en-us subfolder of PolicyDefinitions. and of course admx files are in PolicyDefinitions.

Well actually the newly placed adml files. I should probably redo the admx/adml installation into PolicyDefinitions to see if that matches things up??

I also see errors about lines this and that.

Well actually the newly placed adml files. I should probably redo the admx/adml installation into PolicyDefinitions to see if that matches things up??

I also see errors about lines this and that.

Yes, if things are in the right folders I’d definitely make sure your ADMX/ADML versions are the same in both places.

I must figure out how to get them matched up because all the original adml files disappeared!! 🙁

I don’t know how this happened.

Any suggestions on how to properly match up admx/adml files would be appreciated.

I must figure out how to get them matched up because all the original adml files disappeared!! 🙁

I don’t know how this happened.

Any suggestions on how to properly match up admx/adml files would be appreciated.

Odd to have files just randomly disappearing. Do you have multiple DCs or just one? It’s possible that replication is causing you issues. Employ tools like dcdiag and see what you get there.

No guarantees whether it’s the best idea or not, but I might:

  • Safely backup whatever is in your shared repository first.
  • Close Group Policy management console.
  • Download current ADMX/ADML files from Microsoft for Windows (https://www.microsoft.com/en-us/download/details.aspx?id=102157 Opens a new window if you’re targeting Windows 10 with your policies; other Administrative Templates are available). And unpack them.
  • If possible, disconnect your problem DC (where files keep disappearing) from the network.
  • Rename «PolicyDefinitions» in your WindowsSYSVOLsysvolDOMAINPolicies folder to «PolicyDefinitions-Old»
  • Create a new «PolicyDefinitions» folder in the same location
  • Copy all the new ADMX/ADML files into their proper places on that DC.
  • Open Group Policy management again and see if things are back to normal.
  • If so, reconnecting to the network should re-enable replication of the good configuration to any other DCs as well. In theory anyway.

dcdiag says everything is okay.

Upon looking at a randomly chosen GPO, I get things like this

Next step would be to rename the existing PolicyDefinitions folder and repopulate it??

and hope for the best.

An appropriate resource file could not be found for file \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsCamera.admx (error = 2): The system cannot find the file specified.
An appropriate resource file could not be found for file \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionschrome.admx (error = 2): The system cannot find the file specified.
Resource ‘$(string.SSLCurveOrder)’ referenced in attribute displayName could not be found. File \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsCipherSuiteOrder.admx, line 26, column 249
An appropriate resource file could not be found for file \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsCloudContent.admx (error = 2): The system cannot find the file specified.
Resource ‘$(string.SettingsPageVisibility)’ referenced in attribute displayName could not be found. File \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsControlPanel.admx, line 38, column 274
Policy presentation element ‘LockScreenOverlaysDisabled’ in referenced presentation ‘ForceDefaultLockScreen’ does not exist. File \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsControlPanelDisplay.admx, line 262, column 90
Resource ‘$(string.DefaultCredentialProvider)’ referenced in attribute displayName could not be found. File \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsCredentialProviders.admx, line 60, column 272
Resource ‘$(presentation.RestrictedRemoteAdministration)’ referenced in attribute presentation could not be found. File \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsCredSsp.admx, line 210, column 74
An appropriate resource file could not be found for file \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsDataCollection.admx (error = 2): The system cannot find the file specified.
An appropriate resource file could not be found for file \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsDeliveryOptimization.admx (error = 2): The system cannot find the file specified.
An appropriate resource file could not be found for file \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsDeviceCredential.admx (error = 2): The system cannot find the file specified.
An appropriate resource file could not be found for file \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsDeviceGuard.admx (error = 2): The system cannot find the file specified.
An appropriate resource file could not be found for file \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsDisplay.admx (error = 2): The system cannot find the file specified.
An appropriate resource file could not be found for file \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsDmaGuard.admx (error = 2): The system cannot find the file specified.
Resource ‘$(string.L_TurnOnCloudCandidateCHS)’ referenced in attribute displayName could not be found. File \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsEAIME.admx, line 102, column 259
Resource ‘$(string.AllowEdgeSwipe)’ referenced in attribute displayName could not be found. File \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsEdgeUI.admx, line 75, column 206
Policy presentation element ‘WerCerUploadOnFreeNetworksOnly’ in referenced presentation ‘WerCER’ does not exist. File \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsErrorReporting.admx, line 349, column 104
Resource ‘$(string.Channel_Log_FileLogAccess_Legacy)’ referenced in attribute displayName could not be found. File \DC1.domain22.localSysVoldomain22.localPoliciesPolicyDefinitionsEventLog.admx, line 44, column 313

Personally yes, if GPMC is complaining about missing resources I would. Keep in mind that many of the missing «resource files» (aka ADMX) will come as part of the Administrative Templates package I linked to earlier. Others you’ll have to track down separately; things like Google Chrome or Mozilla Firefox or whatever non-Microsoft templates you may have added to your repository over the years.

Disclaimer: obviously, the above is simply advice and one guy’s «what I would try» suggestion. No guarantees that it will work but I recently had a similar issue and getting all my ADML and ADMX files back in sync fixed it. Both, ADML and ADMX versions have to be the same. Trying to match up an ADML in «PolicyDefinitions» that isn’t the same version as its corresponding ADMX in the «en-US» folder will almost certainly result in the no appropriate resource error.

Источник

Like this post? Please share to your friends:
  • Amxx run time error 10 native error native arraygetstring
  • Amxx plugin file open error plugin admin
  • Amt error aborting
  • Amqp server timeout error
  • Amq9641 remote cipherspec error for channel