Код 800а0046 ошибка выполнения microsoft vbscript

The Microsoft VBScript runtime error: Permission denied 800A0046, may faced while trying to install or uninstall a program or driver on your computer. The error 800A0046 is commonly caused because you ‘ll try to install a program on your computer without having administrative privileges or because you have enabled the User Account Control (UAC) on Windows 7 or Vista based computers. 

Permission denied 800A0046

In most cases the VBScript runtime error 800A0046, is occurred whenever you try to install the «Windows Installer Clean Up» utility, in order to remove a program from the system that you cannot uninstall by using the normal way (Programs and features).

This article contains two(2) methods to fix the «Permission denied 800A0046» Windows Script Host Error, on Windows 7 or Vista.

How to bypass the Windows Script Host «Permission Denied – Code 800A0046».

Before applying the methods below to resolve the VBScript Runtime 800A0046 error, first make sure that you have logged on as Administrator on your system,

Method 1: DISABLE User Account Control (UAC).

In order to disable the UAC (User Account Control):

1. Go to Start > Control Panel.
2. Open User Accounts.
3. Click at Change User Account Control settings.

VBScript Runtime error 800A0046

4, Move the slider on the left to Never notify and click OK.
5. Restart your computer.

disable uac - user account control

6. After restart, install (or uninstall) the program that caused the 800A0046 error.

Method 2: RUN the Installer (Setup.exe) as Administrator

In order to install a program as administrator:

1. Right click at the program (installer) that you ‘re trying to install and click Run as Administrator.

run as adminsitrator

That’s all folks! Did it work for you?

Please leave a comment in the comment section below or even better: like and share this blog post in the social networks to help spread the word about this solution.

If this article was useful for you, please consider supporting us by making a donation. Even $1 can a make a huge difference for us.

В этой статье представлена ошибка с номером Ошибка 800A0046, известная как Ошибка программы очистки установщика Windows 800A0046, описанная как Ошибка 800A0046: Возникла ошибка в приложении Windows Installer CleanUp Utility. Приложение будет закрыто. Приносим свои извинения за неудобства.

О программе Runtime Ошибка 800A0046

Время выполнения Ошибка 800A0046 происходит, когда Windows Installer CleanUp Utility дает сбой или падает во время запуска, отсюда и название. Это не обязательно означает, что код был каким-то образом поврежден, просто он не сработал во время выполнения. Такая ошибка появляется на экране в виде раздражающего уведомления, если ее не устранить. Вот симптомы, причины и способы устранения проблемы.

Определения (Бета)

Здесь мы приводим некоторые определения слов, содержащихся в вашей ошибке, в попытке помочь вам понять вашу проблему. Эта работа продолжается, поэтому иногда мы можем неправильно определить слово, так что не стесняйтесь пропустить этот раздел!

  • Установщик — ОБЩАЯ ПОДДЕРЖКА УСТАНОВЩИКА НЕ ВОСПРИНИМАЕТСЯ
  • Утилита . Утилита — это системное программное обеспечение, предназначенное для анализа, настройки и оптимизировать или поддерживать компьютер.
  • Windows — ОБЩАЯ ПОДДЕРЖКА WINDOWS НЕ В ТЕМЕ.
  • Установщик Windows — Установщик Microsoft Windows является услуга установки и настройки, предоставляемая с Windows
Симптомы Ошибка 800A0046 — Ошибка программы очистки установщика Windows 800A0046

Ошибки времени выполнения происходят без предупреждения. Сообщение об ошибке может появиться на экране при любом запуске %программы%. Фактически, сообщение об ошибке или другое диалоговое окно может появляться снова и снова, если не принять меры на ранней стадии.

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

Fix Ошибка программы очистки установщика Windows 800A0046 (Error Ошибка 800A0046)
(Только для примера)

Причины Ошибка программы очистки установщика Windows 800A0046 — Ошибка 800A0046

При разработке программного обеспечения программисты составляют код, предвидя возникновение ошибок. Однако идеальных проектов не бывает, поскольку ошибки можно ожидать даже при самом лучшем дизайне программы. Глюки могут произойти во время выполнения программы, если определенная ошибка не была обнаружена и устранена во время проектирования и тестирования.

Ошибки во время выполнения обычно вызваны несовместимостью программ, запущенных в одно и то же время. Они также могут возникать из-за проблем с памятью, плохого графического драйвера или заражения вирусом. Каким бы ни был случай, проблему необходимо решить немедленно, чтобы избежать дальнейших проблем. Ниже приведены способы устранения ошибки.

Методы исправления

Ошибки времени выполнения могут быть раздражающими и постоянными, но это не совсем безнадежно, существует возможность ремонта. Вот способы сделать это.

Если метод ремонта вам подошел, пожалуйста, нажмите кнопку upvote слева от ответа, это позволит другим пользователям узнать, какой метод ремонта на данный момент работает лучше всего.

Обратите внимание: ни ErrorVault.com, ни его авторы не несут ответственности за результаты действий, предпринятых при использовании любого из методов ремонта, перечисленных на этой странице — вы выполняете эти шаги на свой страх и риск.

Метод 2 — Обновите / переустановите конфликтующие программы

Использование панели управления

  • В Windows 7 нажмите кнопку «Пуск», затем нажмите «Панель управления», затем «Удалить программу».
  • В Windows 8 нажмите кнопку «Пуск», затем прокрутите вниз и нажмите «Дополнительные настройки», затем нажмите «Панель управления»> «Удалить программу».
  • Для Windows 10 просто введите «Панель управления» в поле поиска и щелкните результат, затем нажмите «Удалить программу».
  • В разделе «Программы и компоненты» щелкните проблемную программу и нажмите «Обновить» или «Удалить».
  • Если вы выбрали обновление, вам просто нужно будет следовать подсказке, чтобы завершить процесс, однако, если вы выбрали «Удалить», вы будете следовать подсказке, чтобы удалить, а затем повторно загрузить или использовать установочный диск приложения для переустановки. программа.

Использование других методов

  • В Windows 7 список всех установленных программ можно найти, нажав кнопку «Пуск» и наведя указатель мыши на список, отображаемый на вкладке. Вы можете увидеть в этом списке утилиту для удаления программы. Вы можете продолжить и удалить с помощью утилит, доступных на этой вкладке.
  • В Windows 10 вы можете нажать «Пуск», затем «Настройка», а затем — «Приложения».
  • Прокрутите вниз, чтобы увидеть список приложений и функций, установленных на вашем компьютере.
  • Щелкните программу, которая вызывает ошибку времени выполнения, затем вы можете удалить ее или щелкнуть Дополнительные параметры, чтобы сбросить приложение.

Метод 1 — Закройте конфликтующие программы

Когда вы получаете ошибку во время выполнения, имейте в виду, что это происходит из-за программ, которые конфликтуют друг с другом. Первое, что вы можете сделать, чтобы решить проблему, — это остановить эти конфликтующие программы.

  • Откройте диспетчер задач, одновременно нажав Ctrl-Alt-Del. Это позволит вам увидеть список запущенных в данный момент программ.
  • Перейдите на вкладку «Процессы» и остановите программы одну за другой, выделив каждую программу и нажав кнопку «Завершить процесс».
  • Вам нужно будет следить за тем, будет ли сообщение об ошибке появляться каждый раз при остановке процесса.
  • Как только вы определите, какая программа вызывает ошибку, вы можете перейти к следующему этапу устранения неполадок, переустановив приложение.

Метод 3 — Обновите программу защиты от вирусов или загрузите и установите последнюю версию Центра обновления Windows.

Заражение вирусом, вызывающее ошибку выполнения на вашем компьютере, необходимо немедленно предотвратить, поместить в карантин или удалить. Убедитесь, что вы обновили свою антивирусную программу и выполнили тщательное сканирование компьютера или запустите Центр обновления Windows, чтобы получить последние определения вирусов и исправить их.

Метод 4 — Переустановите библиотеки времени выполнения

Вы можете получить сообщение об ошибке из-за обновления, такого как пакет MS Visual C ++, который может быть установлен неправильно или полностью. Что вы можете сделать, так это удалить текущий пакет и установить новую копию.

  • Удалите пакет, выбрав «Программы и компоненты», найдите и выделите распространяемый пакет Microsoft Visual C ++.
  • Нажмите «Удалить» в верхней части списка и, когда это будет сделано, перезагрузите компьютер.
  • Загрузите последний распространяемый пакет от Microsoft и установите его.

Метод 5 — Запустить очистку диска

Вы также можете столкнуться с ошибкой выполнения из-за очень нехватки свободного места на вашем компьютере.

  • Вам следует подумать о резервном копировании файлов и освобождении места на жестком диске.
  • Вы также можете очистить кеш и перезагрузить компьютер.
  • Вы также можете запустить очистку диска, открыть окно проводника и щелкнуть правой кнопкой мыши по основному каталогу (обычно это C :)
  • Щелкните «Свойства», а затем — «Очистка диска».

Метод 6 — Переустановите графический драйвер

Если ошибка связана с плохим графическим драйвером, вы можете сделать следующее:

  • Откройте диспетчер устройств и найдите драйвер видеокарты.
  • Щелкните правой кнопкой мыши драйвер видеокарты, затем нажмите «Удалить», затем перезагрузите компьютер.

Метод 7 — Ошибка выполнения, связанная с IE

Если полученная ошибка связана с Internet Explorer, вы можете сделать следующее:

  1. Сбросьте настройки браузера.
    • В Windows 7 вы можете нажать «Пуск», перейти в «Панель управления» и нажать «Свойства обозревателя» слева. Затем вы можете перейти на вкладку «Дополнительно» и нажать кнопку «Сброс».
    • Для Windows 8 и 10 вы можете нажать «Поиск» и ввести «Свойства обозревателя», затем перейти на вкладку «Дополнительно» и нажать «Сброс».
  2. Отключить отладку скриптов и уведомления об ошибках.
    • В том же окне «Свойства обозревателя» можно перейти на вкладку «Дополнительно» и найти пункт «Отключить отладку сценария».
    • Установите флажок в переключателе.
    • Одновременно снимите флажок «Отображать уведомление о каждой ошибке сценария», затем нажмите «Применить» и «ОК», затем перезагрузите компьютер.

Если эти быстрые исправления не работают, вы всегда можете сделать резервную копию файлов и запустить восстановление на вашем компьютере. Однако вы можете сделать это позже, когда перечисленные здесь решения не сработают.

Другие языки:

How to fix Error 800A0046 (Windows Installer Cleanup Utility Error 800A0046) — Error 800A0046: Windows Installer CleanUp Utility has encountered a problem and needs to close. We are sorry for the inconvenience.
Wie beheben Fehler 800A0046 (Windows Installer Cleanup Utility Fehler 800A0046) — Fehler 800A0046: Das Windows Installer CleanUp-Dienstprogramm hat ein Problem festgestellt und muss geschlossen werden. Wir entschuldigen uns für die Unannehmlichkeiten.
Come fissare Errore 800A0046 (Errore dell’utilità di pulizia di Windows Installer 800A0046) — Errore 800A0046: l’utilità di pulizia di Windows Installer ha riscontrato un problema e deve essere chiusa. Ci scusiamo per l’inconveniente.
Hoe maak je Fout 800A0046 (Windows Installer Cleanup Utility Fout 800A0046) — Fout 800A0046: Windows Installer CleanUp Utility heeft een probleem ondervonden en moet worden afgesloten. Excuses voor het ongemak.
Comment réparer Erreur 800A0046 (Erreur 800A0046 de l’utilitaire de nettoyage Windows Installer) — Erreur 800A0046 : l’utilitaire Windows Installer CleanUp a rencontré un problème et doit se fermer. Nous sommes désolés du dérangement.
어떻게 고치는 지 오류 800A0046 (Windows Installer 정리 유틸리티 오류 800A0046) — 오류 800A0046: Windows Installer CleanUp 유틸리티에 문제가 발생해 닫아야 합니다. 불편을 드려 죄송합니다.
Como corrigir o Erro 800A0046 (Erro 800A0046 do utilitário de limpeza do Windows Installer) — Erro 800A0046: O Windows Installer CleanUp Utility encontrou um problema e precisa fechar. Lamentamos o inconveniente.
Hur man åtgärdar Fel 800A0046 (Windows Installer Cleanup Utility Error 800A0046) — Fel 800A0046: Windows Installer CleanUp Utility har stött på ett problem och måste avslutas. Vi är ledsna för besväret.
Jak naprawić Błąd 800A0046 (Błąd narzędzia do czyszczenia instalatora Windows 800A0046) — Błąd 800A0046: Narzędzie Windows Installer CleanUp napotkało problem i musi zostać zamknięte. Przepraszamy za niedogodności.
Cómo arreglar Error 800A0046 (Error 800A0046 de la utilidad de limpieza del instalador de Windows) — Error 800A0046: La utilidad de limpieza de Windows Installer ha detectado un problema y debe cerrarse. Lamentamos las molestias.

The Author Об авторе: Фил Харт является участником сообщества Microsoft с 2010 года. С текущим количеством баллов более 100 000 он внес более 3000 ответов на форумах Microsoft Support и создал почти 200 новых справочных статей в Technet Wiki.

Следуйте за нами: Facebook Youtube Twitter

Последнее обновление:

10/11/22 05:47 : Пользователь Windows 10 проголосовал за то, что метод восстановления 2 работает для него.

Рекомендуемый инструмент для ремонта:

Этот инструмент восстановления может устранить такие распространенные проблемы компьютера, как синие экраны, сбои и замораживание, отсутствующие DLL-файлы, а также устранить повреждения от вредоносных программ/вирусов и многое другое путем замены поврежденных и отсутствующих системных файлов.

ШАГ 1:

Нажмите здесь, чтобы скачать и установите средство восстановления Windows.

ШАГ 2:

Нажмите на Start Scan и позвольте ему проанализировать ваше устройство.

ШАГ 3:

Нажмите на Repair All, чтобы устранить все обнаруженные проблемы.

СКАЧАТЬ СЕЙЧАС

Совместимость

Требования

1 Ghz CPU, 512 MB RAM, 40 GB HDD
Эта загрузка предлагает неограниченное бесплатное сканирование ПК с Windows. Полное восстановление системы начинается от $19,95.

ID статьи: ACX012844RU

Применяется к: Windows 10, Windows 8.1, Windows 7, Windows Vista, Windows XP, Windows 2000

Совет по увеличению скорости #63

Как удалить лишние панели инструментов:

Удаление дополнительных панелей инструментов с панели задач Windows и интернет-браузера может повысить скорость вашего компьютера. Эти дополнительные панели инструментов часто устанавливаются вместе при установке плагинов и программного обеспечения. И в большинстве случаев они перекрывают уже имеющуюся у вас функцию.

Нажмите здесь, чтобы узнать о другом способе ускорения работы ПК под управлением Windows

  • Remove From My Forums
  • Question

  • I’m so close to get my script to work with a user, but I need your help.
    I have a Terminal Server 2003 with policy restrictions. My users can’t even see how much megabytes they have in use. So I created the following script. It runs perfectly with an administrator account:


    Dim oFS, oFolder
    Dim total
    Dim message
    set oFS = WScript.CreateObject(«Scripting.FileSystemObject»)
    set oFolder1 = oFS.GetFolder(«servershare$»)
    set oFolder2 = oFS.GetFolder(«servershare1$»)
    set oFolder3 = oFS.GetFolder(«servershare2$»)
    Wscript.Sleep 300
    total = oFolder1.Size + oFolder2.Size + oFolder3.Size
    message=MsgBox («Size: » & vbTab & oFolder1.Size /10241024 & «MB» & vbTab & » Path: » & vbTab & oFolder1.Path & Chr(10) _
    & «Size: » & vbTab & oFolder2.Size /10241024 & «MB» & vbTab & » Path: » & vbTab & oFolder2.Path & Chr(10) _
    & «Size: » & vbTab & oFolder3.Size /10241024 & «MB» & vbTab & » Path: » & vbTab & oFolder3.Path & Chr(10) _
    & «Total: » & vbTab & total /10241024 & «MB»,64,»megabytes in use»)

    The problem I’m facing is that I can’t distribute it to my users because when this script runs as an user I receive this error:
    Windows Script Host
    Script: pathandname.vbs
    Line: 9
    Char: 1
    Error: Permission denied
    Code: 800A0046
    Source: Microsoft VBScript runtime error

    I’ve checked the users permission on the servershare’s and they have Full Control.
    Also on the ACL on the script the user has Full Control.

    What else can I check?
    Is there a setting in some GPO that denies users to run a .vbs?

    Please let me know when you need more information to solve this.

    Cheers,
    Yuri

Answers

  • Are you sure the users have permissions to ALL files and directories on the shares?
    If there is as much as one file or folder to which the user hasn’t got at least «list contents» permission the script will fail with the above message.

    If you check the properties of the root of the share from explorer, first as an administrator and then as a user. Does it show the same amount of files/folders and the same size?
    A difference here would indicate that the user doesn’t have permissions to everything.

    • Marked as answer by

      Tuesday, September 1, 2009 9:14 AM

Skydiver_vrn

0 / 0 / 0

Регистрация: 01.07.2014

Сообщений: 14

1

VBS

Разрешение отклонено

01.07.2014, 09:03. Показов 24153. Ответов 11

Метки нет (Все метки)


Visual Basic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Set FSO = CreateObject("Scripting.FileSystemObject")
path="D:share123"
  if (FSO.FolderExists(path) = true) then 
    Set Folder = FSO.GetFolder(path)
    For Each SubFolder In Folder.SubFolders
     folder1=SubFolder.Name
     if folder1<>"Маркетинг" and folder1<>"111" and folder1<>"222" and folder1<>"333" and folder1<>"444" and folder1<>"555" and folder1<>"666" and folder1<>"777" and folder1<>"888" then
      folder1=path+folder1
       if (FSO.FolderExists(folder1) = true) then 
        Set folder_for_delete = FSO.GetFolder(folder1)
        folder_for_delete.Delete(True)
       else MsgBox "Путь "+folder1+" не найден" 
       end if
     end if 
    Next
  end if

Вот такой скрипт, ругается на строка 11 символ 9 разрешение отклонено

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь

0

2617 / 547 / 109

Регистрация: 21.03.2012

Сообщений: 1,051

01.07.2014, 10:11

2

Цитата
Сообщение от Skydiver_vrn
Посмотреть сообщение

… разрешение отклонено

Причина — отсутствуют необходимые полномочия. Проверяйте список управления доступом для соответствующей папки.

0

0 / 0 / 0

Регистрация: 01.07.2014

Сообщений: 14

01.07.2014, 11:54

 [ТС]

3

Dmitrii, Так запускаю скрипт вручную под доменным админом у которого есть все права на эту папку.

Добавлено через 1 час 40 минут
Dmitrii, Поигрался с правами, теперь пишет «путь не найден» Строка 11 символ 9

0

2617 / 547 / 109

Регистрация: 21.03.2012

Сообщений: 1,051

01.07.2014, 18:29

4

Цитата
Сообщение от Skydiver_vrn
Посмотреть сообщение

… под доменным админом у которого есть все права на эту папку

1. Какая версия ОС?
2. Включен ли UAC?

Цитата
Сообщение от Skydiver_vrn
Посмотреть сообщение

Поигрался с правами, теперь пишет «путь не найден»

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

0

Skydiver_vrn

0 / 0 / 0

Регистрация: 01.07.2014

Сообщений: 14

02.07.2014, 08:17

 [ТС]

5

Dmitrii, С доступом вроде разобрался сам, сегодня скрипт отработал ночью запускал через bat-ник

Bash
1
2
del D:Share123*.* /q /f
C:cmdclear_share.vbs

но удалились только файлы которые были вне папок, папки на месте остались, и новая ошибка «Предполагается наличие Then строка 7 символ 174»

Добавлено через 12 минут
И тут затупил сам тоже, не написал and когда ещё пункт добавил. Сегодня ночью ещё раз попробую.

0

0 / 0 / 0

Регистрация: 01.07.2014

Сообщений: 14

03.07.2014, 14:52

 [ТС]

6

Dmitrii, Снова удалились только файлы, никакой ошибки не выскочило. Помогите пожалуйста, я чайник в написании скриптов.

Добавлено через 5 часов 55 минут
Причём часть папок удалилась, а как только дошёл до первой в списке исключений остальные на месте.

0

Dmitrii

2617 / 547 / 109

Регистрация: 21.03.2012

Сообщений: 1,051

04.07.2014, 20:47

7

Попробуйте такой вариант:

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

Visual Basic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Dim objFS, objFolder, objItem, strPath, strExclude, strLog, strTemp
 
strExclude = "Маркетинг;111;222;333;444;555;666;777;888;"
Set objFS = CreateObject("Scripting.FileSystemObject")
strPath = "D:share123"
If objFS.FolderExists(strPath) Then 
    Set objFolder = objFS.GetFolder(strPath)
    On Error Resume Next
    If objFolder.SubFolders.Count > 0 Then
        For Each objItem In objFolder.SubFolders
            If InStr(1, strExclude, objItem.Name & ";", vbTextCompare) = 0 Then
                strTemp = objItem.Path
                objItem.Delete True
                If Err.Number = 0 Then
                    strLog = strLog & strTemp & " -> успех" & vbNewLine
                Else
                    strLog = strLog & strTemp & " -> ошибка: " & Err.Description & vbNewLine
                    Err.Clear
                End If
            End if 
        Next
    Else
        strLog = "Папка " & strPath & " не содержит ни одной подпапки."
    End If
    Set objFolder = Nothing
Else
    strLog = "Не найден путь " & strPath
End if
strTemp = objFS.BuildPath(objFS.GetParentFolderName(WScript.ScriptFullName), "Results.txt")
Set objItem = objFS.CreateTextFile(strTemp, True)
If Err.Number = 0 Then
    If Len(strLog) > 0 Then
        objItem.Write strLog
    Else
        objItem.Write "Папка " & strPath & " не содержит ни одной подпапки, предназначенной для удаления."
    End If
    objItem.Close
    WScript.Echo "Готово. Журнал здесь:" & vbNewLine & strTemp
Else
    WScript.Echo "Готово. Ошибка при создании журнала:" & vbNewLine & Err.Description
    Err.Clear
End If
Set objItem = Nothing: Set objFS = Nothing
WScript.Quit 0

2

ComSpec

3455 / 1993 / 635

Регистрация: 26.02.2014

Сообщений: 1,457

04.07.2014, 22:27

8

Dmitrii, поправки:

Visual Basic
1
strExclude = ";Маркетинг;111;222;333;444;555;666;777;888;"
Visual Basic
1
If InStr(1, strExclude, ";" & objItem.Name & ";", vbTextCompare) = 0 Then

.
Иначе не удалятся папки с именами «1», «2», «3», «4», «5», «6», «7», «8», «11», «22», «33», «44», «55», «66», «77», «88», «аркетинг», «ркетинг», «кетинг», «етинг», «тинг», «инг», «нг», «г».

3

Эксперт WindowsАвтор FAQ

17951 / 7587 / 889

Регистрация: 25.12.2011

Сообщений: 11,317

Записей в блоге: 17

05.07.2014, 14:21

9

Вот такая папка тоже не удалится «111;222»
Нужно все разделители ; заменить на символ, который нельзя использовать в именовании ФС, например |

3

Dmitrii

2617 / 547 / 109

Регистрация: 21.03.2012

Сообщений: 1,051

06.07.2014, 21:37

10

Лучший ответ Сообщение было отмечено Skydiver_vrn как решение

Решение

С учётом справедливых замечаний от ComSpec и Dragokas имеем следующий вариант:

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

Visual Basic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Dim objFS, objFolder, objItem, strPath, strExclude, strLog, strTemp
 
strExclude = "*Маркетинг*111*222*333*444*555*666*777*888*"
Set objFS = CreateObject("Scripting.FileSystemObject")
strPath = "D:share123"
If objFS.FolderExists(strPath) Then 
    Set objFolder = objFS.GetFolder(strPath)
    On Error Resume Next
    If objFolder.SubFolders.Count > 0 Then
        For Each objItem In objFolder.SubFolders
            If InStr(1, strExclude, "*" & objItem.Name & "*", vbTextCompare) = 0 Then
                strTemp = objItem.Path
                objItem.Delete True
                If Err.Number = 0 Then
                    strLog = strLog & strTemp & " -> успех" & vbNewLine
                Else
                    strLog = strLog & strTemp & " -> ошибка: " & Err.Description & vbNewLine
                    Err.Clear
                End If
            End if 
        Next
    Else
        strLog = "Папка " & strPath & " не содержит ни одной подпапки."
    End If
    Set objFolder = Nothing
Else
    strLog = "Не найден путь " & strPath
End if
strTemp = objFS.BuildPath(objFS.GetParentFolderName(WScript.ScriptFullName), "Results.txt")
Set objItem = objFS.CreateTextFile(strTemp, True)
If Err.Number = 0 Then
    If Len(strLog) > 0 Then
        objItem.Write strLog
    Else
        objItem.Write "Папка " & strPath & " не содержит ни одной подпапки, предназначенной для удаления."
    End If
    objItem.Close
    WScript.Echo "Готово. Журнал здесь:" & vbNewLine & strTemp
Else
    WScript.Echo "Готово. Ошибка при создании журнала:" & vbNewLine & Err.Description
    Err.Clear
End If
Set objItem = Nothing: Set objFS = Nothing
WScript.Quit 0

2

0 / 0 / 0

Регистрация: 01.07.2014

Сообщений: 14

15.07.2014, 11:19

 [ТС]

11

Всем огромное спасибо! Всё работает. А может стоит куда то вынести сей скрипт, он же достаточно универсальный, может ещё какойнибудь такойже как я чайник сможет применить в своей системе…

0

Эксперт WindowsАвтор FAQ

17951 / 7587 / 889

Регистрация: 25.12.2011

Сообщений: 11,317

Записей в блоге: 17

15.07.2014, 13:47

12

Skydiver_vrn, в принципе можно. Добавил.

0

  • Remove From My Forums
  • Question

  • Hi All,

    i tried move a folder YYYYmm format using below VBScript, move to destination same folder directory, YYYYyyyyMM. However, command prompt shown me Permission Denied, Error Code: 800A0046.

    server Date time format: mm/DD/yyyy, i use VBscript to twist to format DD/MM/yyyy to match folder.

    CDATE(currDay+ «/»  + currMonth + «/» + CurrYYYY)

    'How to use:
    ' type "archiver D:root source folder" in command line eg: D:Testarchiverarchiver.vbs "D:Testarchiver"
    
    DIM strLogFile
    Const ForAppending = 8
    'Wscript.StdOut.WriteBlanklines 100
    Set FSO = CreateObject("Scripting.FileSystemObject")
    
    strLogFile=WScript.Arguments(0) &"LogARCHIVER_Log_" & Year(Date) & Month(Date) & Day(Date) & ".txt"
    
    'Log folder not exists then create new folder
    IF NOT FSO.FolderExists(WScript.Arguments(0) &"Log") THEN
    		FSO.CreateFolder WScript.Arguments(0) & "Log"
    END IF
    
    Set objLogFile = FSO.OpenTextFile(strLogFile, ForAppending, True)
    
    objLogfile.WriteLine NOW & ">> ------------ ARCHIVER BEGIN ------------------"
    objLogfile.WriteLine ""
    objLogfile.WriteLine Now & ">> Root Folder: " & WScript.Arguments(0)
    objLogfile.WriteLine ""
    archiver(FSO.GetFolder(WScript.Arguments(0)))
    objLogfile.WriteLine NOW & ">> ------------ ARCHIVER END ------------------"
    objLogfile.WriteLine ""
    objLogFile.Close 
    
    
    Sub archiver(Folder)
    
    	DIM year_
    	DIM month_
    	Dim dt
    	dt=now
    	
    	'output format: yyyymmddHHnn
    	currMonth=Cstr(month(dt)) 	'current Month
    	currDay=Cstr(day(dt)) 		'current day
    	CurrYYYY=Cstr(year(dt)) 	'current Year
    	'wscript.echo currMonth
    	'wscript.echo currDay
    	'wscript.echo CurrYYYY	
    	
    	archiveMonth = -6
    	'Set myLog = objFSO.OpenTextFile(destinationPath, For_Writing, True)
            For Each Subfolder in Folder.SubFolders		
    		IF LEN(subfolder.Name) = 8 AND ISNUMERIC(subfolder.Name) THEN
    			year_ = MID(subfolder.Name,1,4)
    			month_ = MID(subfolder.Name,5,2)
    			
    
    			objLogfile.WriteLine "Process Checking MM-DD-YY Now......"
    			'objLogfile.WriteLine FormatDateTime(CDATE("01/" + month + "/" + year),2)
    			'IF IsDate(CDATE("01/" + month + "/" + year)) AND DateDiff("m", Date, "01/" + month + "/" + year) < archiveMonth  THEN
    			IF IsDate(CDATE("01/" + month_ + "/" + year_)) AND DateDiff("m", CDATE(currDay+ "/"  + currMonth + "/" + CurrYYYY), "01/" + month_ + "/" + year_) <= archiveMonth  THEN
    			
    				objLogfile.WriteLine archiveMonth '-6
    				objLogfile.WriteLine IsDate(CDATE("01/" + month_ + "/" + year_)) 'True
    				
    				objLogfile.WriteLine NOW & ">> Processing >> " + Subfolder.Name
    				destinationPath = year_ 'WScript.Arguments(0) + " " + year
    				'Year folder not exists then create new folder
    				IF NOT FSO.FolderExists(destinationPath) THEN
    					FSO.CreateFolder destinationPath
    					
    				END IF
    		
    				IF FSO.FolderExists(destinationPath) THEN
    					destinationPath = destinationPath + "" + year_ + month_
    					IF FSO.FolderExists(destinationPath) THEN
    						objLogfile.WriteLine NOW & ">> Moving folder " + Subfolder.Name + " to destination: " + destinationPath
    						Subfolder.Move destinationPath + "" + Subfolder.Name
    					ELSE
    						'Year + Month folder not exists then create new folder
    						FSO.CreateFolder destinationPath
    						IF FSO.FolderExists(destinationPath) THEN
    							objLogfile.WriteLine NOW & ">> Moving folder " + Subfolder.Name + " to destination: " + destinationPath
    							Subfolder.Move destinationPath + "" + Subfolder.Name
    						ELSE
    							objLogfile.WriteLine NOW & ">> ** ERROR: Unable to create folder: " + destinationPath	
    						END IF
    					END IF
    				ELSE
    					objLogfile.WriteLine NOW & ">> ** ERROR: Unable to create folder: " + destinationPath
    				END IF
    				'Wscript.StdOut.WriteBlanklines 1
    				'objLogfile.WriteLine ""
    
    			END IF
    		END IF
            Next
    End Sub

    Error Message

    Script: D:….Archivedarchiver.vbs

    Line: 71

    Char: 7

    Error Code: Permission Denied

    Code: 800A0046

    Source Code: Microsoft VBScript runtime error

    • Moved by

      Wednesday, January 2, 2019 3:18 PM
      This is not «fix/debug/rewrite my script for me» forum

  • Remove From My Forums
  • Question

  • Hi All,

    i tried move a folder YYYYmm format using below VBScript, move to destination same folder directory, YYYYyyyyMM. However, command prompt shown me Permission Denied, Error Code: 800A0046.

    server Date time format: mm/DD/yyyy, i use VBscript to twist to format DD/MM/yyyy to match folder.

    CDATE(currDay+ «/»  + currMonth + «/» + CurrYYYY)

    'How to use:
    ' type "archiver D:root source folder" in command line eg: D:Testarchiverarchiver.vbs "D:Testarchiver"
    
    DIM strLogFile
    Const ForAppending = 8
    'Wscript.StdOut.WriteBlanklines 100
    Set FSO = CreateObject("Scripting.FileSystemObject")
    
    strLogFile=WScript.Arguments(0) &"LogARCHIVER_Log_" & Year(Date) & Month(Date) & Day(Date) & ".txt"
    
    'Log folder not exists then create new folder
    IF NOT FSO.FolderExists(WScript.Arguments(0) &"Log") THEN
    		FSO.CreateFolder WScript.Arguments(0) & "Log"
    END IF
    
    Set objLogFile = FSO.OpenTextFile(strLogFile, ForAppending, True)
    
    objLogfile.WriteLine NOW & ">> ------------ ARCHIVER BEGIN ------------------"
    objLogfile.WriteLine ""
    objLogfile.WriteLine Now & ">> Root Folder: " & WScript.Arguments(0)
    objLogfile.WriteLine ""
    archiver(FSO.GetFolder(WScript.Arguments(0)))
    objLogfile.WriteLine NOW & ">> ------------ ARCHIVER END ------------------"
    objLogfile.WriteLine ""
    objLogFile.Close 
    
    
    Sub archiver(Folder)
    
    	DIM year_
    	DIM month_
    	Dim dt
    	dt=now
    	
    	'output format: yyyymmddHHnn
    	currMonth=Cstr(month(dt)) 	'current Month
    	currDay=Cstr(day(dt)) 		'current day
    	CurrYYYY=Cstr(year(dt)) 	'current Year
    	'wscript.echo currMonth
    	'wscript.echo currDay
    	'wscript.echo CurrYYYY	
    	
    	archiveMonth = -6
    	'Set myLog = objFSO.OpenTextFile(destinationPath, For_Writing, True)
            For Each Subfolder in Folder.SubFolders		
    		IF LEN(subfolder.Name) = 8 AND ISNUMERIC(subfolder.Name) THEN
    			year_ = MID(subfolder.Name,1,4)
    			month_ = MID(subfolder.Name,5,2)
    			
    
    			objLogfile.WriteLine "Process Checking MM-DD-YY Now......"
    			'objLogfile.WriteLine FormatDateTime(CDATE("01/" + month + "/" + year),2)
    			'IF IsDate(CDATE("01/" + month + "/" + year)) AND DateDiff("m", Date, "01/" + month + "/" + year) < archiveMonth  THEN
    			IF IsDate(CDATE("01/" + month_ + "/" + year_)) AND DateDiff("m", CDATE(currDay+ "/"  + currMonth + "/" + CurrYYYY), "01/" + month_ + "/" + year_) <= archiveMonth  THEN
    			
    				objLogfile.WriteLine archiveMonth '-6
    				objLogfile.WriteLine IsDate(CDATE("01/" + month_ + "/" + year_)) 'True
    				
    				objLogfile.WriteLine NOW & ">> Processing >> " + Subfolder.Name
    				destinationPath = year_ 'WScript.Arguments(0) + " " + year
    				'Year folder not exists then create new folder
    				IF NOT FSO.FolderExists(destinationPath) THEN
    					FSO.CreateFolder destinationPath
    					
    				END IF
    		
    				IF FSO.FolderExists(destinationPath) THEN
    					destinationPath = destinationPath + "" + year_ + month_
    					IF FSO.FolderExists(destinationPath) THEN
    						objLogfile.WriteLine NOW & ">> Moving folder " + Subfolder.Name + " to destination: " + destinationPath
    						Subfolder.Move destinationPath + "" + Subfolder.Name
    					ELSE
    						'Year + Month folder not exists then create new folder
    						FSO.CreateFolder destinationPath
    						IF FSO.FolderExists(destinationPath) THEN
    							objLogfile.WriteLine NOW & ">> Moving folder " + Subfolder.Name + " to destination: " + destinationPath
    							Subfolder.Move destinationPath + "" + Subfolder.Name
    						ELSE
    							objLogfile.WriteLine NOW & ">> ** ERROR: Unable to create folder: " + destinationPath	
    						END IF
    					END IF
    				ELSE
    					objLogfile.WriteLine NOW & ">> ** ERROR: Unable to create folder: " + destinationPath
    				END IF
    				'Wscript.StdOut.WriteBlanklines 1
    				'objLogfile.WriteLine ""
    
    			END IF
    		END IF
            Next
    End Sub

    Error Message

    Script: D:….Archivedarchiver.vbs

    Line: 71

    Char: 7

    Error Code: Permission Denied

    Code: 800A0046

    Source Code: Microsoft VBScript runtime error

    • Moved by

      Wednesday, January 2, 2019 3:18 PM
      This is not «fix/debug/rewrite my script for me» forum

I have a script that I put together for my users a few years ago for them to log onto to the company drive shares after they had logged into the VPN. The script has worked well over the years with a few tweaks needed here and there due to IE version upgrades. As of today I can no longer get the script to function properly the Error is:

Line:   93
Char:   5
Error:  Permission denied: 'objIE.Document.parentWindow.screen'
Code:   800A0046
Source:     Microsoft VBScript runtime error

I’m not sure what has changed but after doing multiple searches on the error codes and other items I figured I’d post it here and see if any of you can help me with this problem.

dim WshNetwork
Dim arrFileLines()

'On Error Resume Next

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("Drive Shares.txt", 1)
If Not err.number = 0 then
    WScript.Echo "Drive Shares.txt was not found.  Please ensure that it is in the same directory as this script file"
    WScript.Quit
End If

NumElements = 0
Do Until objFile.AtEndOfStream
Redim Preserve arrFileLines(NumElements)
arrFileLines(NumElements) = objFile.ReadLine
NumElements = NumElements + 1
Loop
objFile.Close

strPw = GetPassword()

If strPw = "" Then
     wScript.Quit
End If

SplitPasswd = Split(StrPW,"*",2)

username = "DEFAULT" & SplitPasswd(0)
password = SplitPasswd(1)

Set WshNetwork = Wscript.CreateObject("WScript.Network")

For Count = 0 to (NumElements - 1)

SplitDriveInfo =  Split(arrFileLines(Count)," ",2)
DriveLetter = SplitDriveInfo(0)
Share = SplitDriveInfo(1)

ExitCode = WshNetwork.MapNetworkDrive(DriveLetter, Share, false, username, password)
ErrorHandler(err.number)

Next

Sub ErrorHandler(ErrorNumber)
    Select Case ErrorNumber

    Case 0 
        'OK
        Exit Sub

    Case -2147024811 
        'Already Mapped Continue
        Exit Sub

    Case -2147024843
        'No Connection
        WScript.Echo "No connection found.  Confirm you have an internet connection and that you have the VPN connected."
        WScript.Quit

    Case -2147024829
        'Share not available
        WScript.Echo "The drive share you are trying to connect to does not exist on this server."
        WScript.Quit

    Case -2147023570
        'Invalid username or password
        WScript.Echo "Invalid username or password.  Please try again."
        WScript.quit

    Case Else
        WScript.Echo "Unknown error: " & CStr(ErrorNumber)
        WScript.Quit

    End Select


End Sub



Function GetPassword()

    Dim objIE
    Set objIE = CreateObject( "InternetExplorer.Application" )
    objIE.Navigate "about:blank"
    objIE.Document.Title = "Login Credentials"
    objIE.ToolBar        = False
    objIE.Resizable      = False
    objIE.StatusBar      = False
    objIE.Width          = 320
    objIE.Height         = 320
    With objIE.document.parentWindow.screen
        objIE.Left = (.availwidth  - objIE.Width )  2
        objIE.Top  = (.availheight - objIE.Height)  2
    End With

    objIE.Document.Body.InnerHTML = "<DIV align=""center""><P>Please enter your credentials</P>" & vbCrLf _
                                  & "<DIV align=""center""><P>Username</P>" & vbCrLf _                            
                                  & "<P><INPUT TYPE=""Username"" SIZE=""20"" " _
                                  & "ID=""UserName""></P>" & vbCrLf _
                                  & "<DIV align=""center""><P>Password</P>" & vbCrLf _
                                  & "<P><INPUT TYPE=""password"" SIZE=""20"" " _
                                  & "ID=""Password""></P>" & vbCrLf _
                                  & "<P><INPUT TYPE=""hidden"" ID=""OK"" " _
                                  & "NAME=""OK"" VALUE=""0"">" _
                                  & "<INPUT TYPE=""submit"" VALUE="" OK "" " _
                                  & "OnClick=""VBScript:OK.Value=1""></P></DIV>"
    objIE.Visible = True

    Do While objIE.Document.All.OK.Value = 0
        WScript.Sleep 200
    Loop

    GetPassword = objIE.Document.All.UserName.Value & "*" & objIE.Document.All.Password.Value
    objIE.Quit
    Set objIE = Nothing


End Function

Any help with this would be greatly appreciated.

I have a script that I put together for my users a few years ago for them to log onto to the company drive shares after they had logged into the VPN. The script has worked well over the years with a few tweaks needed here and there due to IE version upgrades. As of today I can no longer get the script to function properly the Error is:

Line:   93
Char:   5
Error:  Permission denied: 'objIE.Document.parentWindow.screen'
Code:   800A0046
Source:     Microsoft VBScript runtime error

I’m not sure what has changed but after doing multiple searches on the error codes and other items I figured I’d post it here and see if any of you can help me with this problem.

dim WshNetwork
Dim arrFileLines()

'On Error Resume Next

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("Drive Shares.txt", 1)
If Not err.number = 0 then
    WScript.Echo "Drive Shares.txt was not found.  Please ensure that it is in the same directory as this script file"
    WScript.Quit
End If

NumElements = 0
Do Until objFile.AtEndOfStream
Redim Preserve arrFileLines(NumElements)
arrFileLines(NumElements) = objFile.ReadLine
NumElements = NumElements + 1
Loop
objFile.Close

strPw = GetPassword()

If strPw = "" Then
     wScript.Quit
End If

SplitPasswd = Split(StrPW,"*",2)

username = "DEFAULT" & SplitPasswd(0)
password = SplitPasswd(1)

Set WshNetwork = Wscript.CreateObject("WScript.Network")

For Count = 0 to (NumElements - 1)

SplitDriveInfo =  Split(arrFileLines(Count)," ",2)
DriveLetter = SplitDriveInfo(0)
Share = SplitDriveInfo(1)

ExitCode = WshNetwork.MapNetworkDrive(DriveLetter, Share, false, username, password)
ErrorHandler(err.number)

Next

Sub ErrorHandler(ErrorNumber)
    Select Case ErrorNumber

    Case 0 
        'OK
        Exit Sub

    Case -2147024811 
        'Already Mapped Continue
        Exit Sub

    Case -2147024843
        'No Connection
        WScript.Echo "No connection found.  Confirm you have an internet connection and that you have the VPN connected."
        WScript.Quit

    Case -2147024829
        'Share not available
        WScript.Echo "The drive share you are trying to connect to does not exist on this server."
        WScript.Quit

    Case -2147023570
        'Invalid username or password
        WScript.Echo "Invalid username or password.  Please try again."
        WScript.quit

    Case Else
        WScript.Echo "Unknown error: " & CStr(ErrorNumber)
        WScript.Quit

    End Select


End Sub



Function GetPassword()

    Dim objIE
    Set objIE = CreateObject( "InternetExplorer.Application" )
    objIE.Navigate "about:blank"
    objIE.Document.Title = "Login Credentials"
    objIE.ToolBar        = False
    objIE.Resizable      = False
    objIE.StatusBar      = False
    objIE.Width          = 320
    objIE.Height         = 320
    With objIE.document.parentWindow.screen
        objIE.Left = (.availwidth  - objIE.Width )  2
        objIE.Top  = (.availheight - objIE.Height)  2
    End With

    objIE.Document.Body.InnerHTML = "<DIV align=""center""><P>Please enter your credentials</P>" & vbCrLf _
                                  & "<DIV align=""center""><P>Username</P>" & vbCrLf _                            
                                  & "<P><INPUT TYPE=""Username"" SIZE=""20"" " _
                                  & "ID=""UserName""></P>" & vbCrLf _
                                  & "<DIV align=""center""><P>Password</P>" & vbCrLf _
                                  & "<P><INPUT TYPE=""password"" SIZE=""20"" " _
                                  & "ID=""Password""></P>" & vbCrLf _
                                  & "<P><INPUT TYPE=""hidden"" ID=""OK"" " _
                                  & "NAME=""OK"" VALUE=""0"">" _
                                  & "<INPUT TYPE=""submit"" VALUE="" OK "" " _
                                  & "OnClick=""VBScript:OK.Value=1""></P></DIV>"
    objIE.Visible = True

    Do While objIE.Document.All.OK.Value = 0
        WScript.Sleep 200
    Loop

    GetPassword = objIE.Document.All.UserName.Value & "*" & objIE.Document.All.Password.Value
    objIE.Quit
    Set objIE = Nothing


End Function

Any help with this would be greatly appreciated.

I get the following error:

Microsoft VBScript runtime error ‘800a0046’ Permission denied

When running a classic asp application.

The error is here: (in the CreateTextFile line)

Dim myFSO
set myFSO = Server.CreateObject("Scripting.FileSystemObject")
myFSO.CreateTextFile(fName)

I know I can get around this problem by giving «Full control» to the «Everyone» user. This is a publicly accessible folder on our server, so I worry that this is a security risk?

I would prefer to be able to give full permission to someone like «IIS_IUSRS», but this doesn’t work. It’s as if it’s a different user being used for this.

Is this a security risk? Anyone know what I should be doing?

  • Remove From My Forums
  • Question

  • I’m so close to get my script to work with a user, but I need your help.
    I have a Terminal Server 2003 with policy restrictions. My users can’t even see how much megabytes they have in use. So I created the following script. It runs perfectly with an administrator account:


    Dim oFS, oFolder
    Dim total
    Dim message
    set oFS = WScript.CreateObject(«Scripting.FileSystemObject»)
    set oFolder1 = oFS.GetFolder(«\servershare$»)
    set oFolder2 = oFS.GetFolder(«\servershare1$»)
    set oFolder3 = oFS.GetFolder(«\servershare2$»)
    Wscript.Sleep 300
    total = oFolder1.Size + oFolder2.Size + oFolder3.Size
    message=MsgBox («Size: » & vbTab & oFolder1.Size /10241024 & «MB» & vbTab & » Path: » & vbTab & oFolder1.Path & Chr(10) _
    & «Size: » & vbTab & oFolder2.Size /10241024 & «MB» & vbTab & » Path: » & vbTab & oFolder2.Path & Chr(10) _
    & «Size: » & vbTab & oFolder3.Size /10241024 & «MB» & vbTab & » Path: » & vbTab & oFolder3.Path & Chr(10) _
    & «Total: » & vbTab & total /10241024 & «MB»,64,»megabytes in use»)

    The problem I’m facing is that I can’t distribute it to my users because when this script runs as an user I receive this error:
    Windows Script Host
    Script: pathandname.vbs
    Line: 9
    Char: 1
    Error: Permission denied
    Code: 800A0046
    Source: Microsoft VBScript runtime error

    I’ve checked the users permission on the servershare’s and they have Full Control.
    Also on the ACL on the script the user has Full Control.

    What else can I check?
    Is there a setting in some GPO that denies users to run a .vbs?

    Please let me know when you need more information to solve this.

    Cheers,
    Yuri

Answers

  • Are you sure the users have permissions to ALL files and directories on the shares?
    If there is as much as one file or folder to which the user hasn’t got at least «list contents» permission the script will fail with the above message.

    If you check the properties of the root of the share from explorer, first as an administrator and then as a user. Does it show the same amount of files/folders and the same size?
    A difference here would indicate that the user doesn’t have permissions to everything.

    • Marked as answer by

      Tuesday, September 1, 2009 9:14 AM

The Microsoft VBScript runtime error: Permission denied 800A0046, may faced while trying to install or uninstall a program or driver on your computer. The error 800A0046 is commonly caused because you ‘ll try to install a program on your computer without having administrative privileges or because you have enabled the User Account Control (UAC) on Windows 7 or Vista based computers. 

Permission denied 800A0046

In most cases the VBScript runtime error 800A0046, is occurred whenever you try to install the «Windows Installer Clean Up» utility, in order to remove a program from the system that you cannot uninstall by using the normal way (Programs and features).

This article contains two(2) methods to fix the «Permission denied 800A0046» Windows Script Host Error, on Windows 7 or Vista.

How to bypass the Windows Script Host «Permission Denied – Code 800A0046».

Before applying the methods below to resolve the VBScript Runtime 800A0046 error, first make sure that you have logged on as Administrator on your system,

Method 1: DISABLE User Account Control (UAC).

In order to disable the UAC (User Account Control):

1. Go to Start > Control Panel.
2. Open User Accounts.
3. Click at Change User Account Control settings.

VBScript Runtime error 800A0046

4, Move the slider on the left to Never notify and click OK.
5. Restart your computer.

disable uac - user account control

6. After restart, install (or uninstall) the program that caused the 800A0046 error.

Method 2: RUN the Installer (Setup.exe) as Administrator

In order to install a program as administrator:

1. Right click at the program (installer) that you ‘re trying to install and click Run as Administrator.

run as adminsitrator

That’s all folks! Did it work for you?

Please leave a comment in the comment section below or even better: like and share this blog post in the social networks to help spread the word about this solution.

If this article was useful for you, please consider supporting us by making a donation. Even $1 can a make a huge difference for us.

The Microsoft VBScript runtime error: Permission denied 800A0046, may faced while trying to install or uninstall a program or driver on your computer. The error 800A0046 is commonly caused because you ‘ll try to install a program on your computer without having administrative privileges or because you have enabled the User Account Control (UAC) on Windows 7 or Vista based computers. 

Permission denied 800A0046

In most cases the VBScript runtime error 800A0046, is occurred whenever you try to install the “Windows Installer Clean Up” utility, in order to remove a program from the system that you cannot uninstall by using the normal way (Programs and features).

This article contains two(2) methods to fix the “Permission denied 800A0046” Windows Script Host Error, on Windows 7 or Vista.

How to bypass the Windows Script Host “Permission Denied – Code 800A0046”.

Before applying the methods below to resolve the VBScript Runtime 800A0046 error, first make sure that you have logged on as Administrator on your system,

Method 1: DISABLE User Account Control (UAC).

In order to disable the UAC (User Account Control):

1. Go to Start > Control Panel.
2. Open User Accounts.
3. Click at Change User Account Control settings.

VBScript Runtime error 800A0046

4, Move the slider on the left to Never notify and click OK.
5. Restart your computer.

disable uac - user account control

6. After restart, install (or uninstall) the program that caused the 800A0046 error.

Method 2: RUN the Installer (Setup.exe) as Administrator

In order to install a program as administrator:

1. Right click at the program (installer) that you ‘re trying to install and click Run as Administrator.

run as adminsitrator

That’s all folks! Did it work for you?

Please leave a comment in the comment section below or even better: like and share this blog post in the social networks to help spread the word about this solution.

If this article was useful for you, please consider supporting us by making a donation. Even $1 can a make a huge difference for us.

Hình ảnh thuộc sở hữu của trang web qnet88.com

Bài liên quan

  • How to Upgrade to Windows 11 with Installation Assistant.
  • FIX: We couldn’t check for updates. We couldn’t connect to the update service. (Solved)
  • Eight Different Ways to Take Screenshots in Windows 11/10.
  • FIX: ‘Choose where to get apps’ option is missing in Windows 11. (Solved)
  • How to Enable TPM and Secure Boot in VirtualBox.
  • How to Stop Windows to Download and Install Driver Updates automatically.

Понравилась статья? Поделить с друзьями:
  • Код ошибки 0 800700в
  • Код ошибки 0 8007007в
  • Код ошибки 0 800700422
  • Код ошибки 0 80070013
  • Код ошибки 0 8004def7