Solved Why do I get this blocked VBS file error?


atinfo

Well-known member
Power User
VIP
Local time
6:33 PM
Posts
1,171
OS
Win 11 Enterprise
Why do I get this error? :think:
I didn't have this problem before and didn't change any group policy option regarding vbs.

g1.gif
 

My Computer

System One

  • OS
    Win 11 Enterprise
    Computer type
    Laptop
    CPU
    i7
    Hard Drives
    SSD
If you like, you could use the BAT below to rebuild the icon cache instead.

 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
If you like, you could use the BAT below to rebuild the icon cache instead.

I have this (your) BAT. It doesn't work for some icons (like pinned icons in Start Menu). The VBS is better, I don't know the technical difference.

s1.png

Something must have changed. Have you checked the policy setting using gpedit.msc?

Computer Configuration > Administrative Templates > Windows Components > Windows Script Host

Setting: Turn off Windows Script Host
s2.png
s3.png
:think:

Also, what AV software are you running? Was there any change recently?
Microsoft Windows Security.
 

My Computer

System One

  • OS
    Win 11 Enterprise
    Computer type
    Laptop
    CPU
    i7
    Hard Drives
    SSD
Try running the script as Administrator. If that doesn't work, open Group Policy Editor and go to Computer Configuration > Windows Settings > Security Settings > Application Control Policies > App Locker > Script Rules. Check if you have the rules below:

tQUIwmh.png


When I first updated to 22H2 via in-place upgrade, I was having trouble running scripts as well.
As it turns out, any unrecognized script (not signed by MS) will not be allowed to run if there are no rules in place.
To create the rules, click Action menu > Create Default Rules.
 

My Computer

System One

  • OS
    Windows 11
What the hell is going on there!!! Why the language is Russian!!! I have nothing to do with Russia in my system! Why has Putin invaded my Script Security territory??!!
g1.gif
s1.png

Translated version (!):

s2.png

My languages (!):

s3.png

When I first updated to 22H2 via in-place upgrade, I was having trouble running scripts as well.
As it turns out, any unrecognized script (not signed by MS) will not be allowed to run if there are no rules in place.
To create the rules, click Action menu > Create Default Rules.
I didn't have this problem on 22H1. I think MS has changed some security policies for VBS in 22H2. I realized if I copy the script on my Desktop, it runs without any problem! :think:
 

My Computer

System One

  • OS
    Win 11 Enterprise
    Computer type
    Laptop
    CPU
    i7
    Hard Drives
    SSD
It was all about "Run as Admin" (even run from Drive D)!

g2.gif
 

My Computer

System One

  • OS
    Win 11 Enterprise
    Computer type
    Laptop
    CPU
    i7
    Hard Drives
    SSD
I finally replicated your issue and figured out what needs to be changed. And sorry about that incorrect GPEdit path. I didn't have a Windows Pro system set up at the time to verify it. That just goes to show you can't be sure about any instructions found on the Internet until verified.

The GPEdit path @Bizarre provided is the correct one. The entries shown in that post are the ones you get if you right-click and select "Create default rules". When those rules are applied, you see the behavior you described. That is, a script launched normally will be blocked with the policy error message you posted, but scripts can still be run elevated (i.e. "Run as administrator").

Your rule set looks different (and in Russian too). I can't explain that, but the fix is the same regardless.

If you want to be able to run scripts, without having to select "Run as administrator", then simply select all of the rules under "Script Rules", right-click, and select Delete.

 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
A translated version of my GPEdit (OCR translation) ⬇️

Can you understand anything? Is this normal?! I didn't change anything.

But more than the Script problem, I am very concerned about Russian! The only app I have installed from Russia is Telegram (Pavel Valeryevich Durov, Putin's right hand :woozy:) downloaded from Microsoft Store.
 

My Computer

System One

  • OS
    Win 11 Enterprise
    Computer type
    Laptop
    CPU
    i7
    Hard Drives
    SSD
Found out (why it runs without Admin right on C drive/Desktop). The rules say if the script is in the OS drive has permission to Run!

s1.png
 

My Computer

System One

  • OS
    Win 11 Enterprise
    Computer type
    Laptop
    CPU
    i7
    Hard Drives
    SSD
A translated version of my GPEdit (OCR translation) ⬇️


Can you understand anything? Is this normal?! I didn't change anything.

But more than the Script problem, I am very concerned about Russian! The only app I have installed from Russia is Telegram (Pavel Valeryevich Durov, Putin's right hand :woozy:) downloaded from Microsoft Store.

The text in those fields can be edited, so you could have just copied the text and pasted into Google Translate, like I did to translate in the other direction:

All scripts located in the Program Files folder Все скрипты находятся в папке Program Files

The Russian text on your machine is the same, but with the additional "(default rule)" bit. I'm leaning towards harmless, but I can't explain why those entries were created (I don't have them on my Windows 11 Pro VM), let alone why they're in Russian. One theory is that you trialed Kaspersky security software at one point and it created those entries and entered it's own descriptions. But, I tested Kaspersky Free and no entries were created. And Telegram doesn't seem a likely source. I installed it and, again, it didn't add any policies.

I would just delete the entries and then check back once in a while to see if they ever get recreated.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
When I first updated to 22H2 via in-place upgrade, I was having trouble running scripts as well.
As it turns out, any unrecognized script (not signed by MS) will not be allowed to run if there are no rules in place.
To create the rules, click Action menu > Create Default Rules.
That's very strange. Normally, no rules are in place there and all scripts run just fine from pretty much anywhere.

Since you've probably had a few updates in the meantime, I suggest removing those rules and see if normal behavior has returned.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
The text in those fields can be edited, so you could have just copied the text and pasted into Google Translate, like I did to translate in the other direction:
I am a bit lazy! Just press Win+Shift+S and drag the SS into the OCR translator box!

The Russian text on your machine is the same, but with the additional "(default rule)" bit. I'm leaning towards harmless, but I can't explain why those entries were created (I don't have them on my Windows 11 Pro VM), let alone why they're in Russian. One theory is that you trialed Kaspersky security software at one point and it created those entries and entered it's own descriptions. But, I tested Kaspersky Free and no entries were created. And Telegram doesn't seem a likely source. I installed it and, again, it didn't add any policies.
Thanks :thumbsup:. I don't have any Russian apps installed on my system (I hate KS!). The only antivirus and browsers I am using are Windows Security and Edge. I rarely install 3rd party apps. My installed apps list:
7z
NP++
Office 2021
Adobe Family!


The only thing I am suspicious of is a Realtek audio driver was installed on my system, and I realized it was a miner from Russia!

Putin... :woozy: I gave you a drone you sent me a spy :nope: ... !!
Just call me and tell me that you have a low budget. I would send you a tanker! Why mining?!

I would just delete the entries and then check back once in a while to see if they ever get recreated.
Is it safe to delete those entries (security talking)?
 

My Computer

System One

  • OS
    Win 11 Enterprise
    Computer type
    Laptop
    CPU
    i7
    Hard Drives
    SSD
I am a bit lazy! Just press Win+Shift+S and drag the SS into the OCR translator box!

For me, Win+Shift+S brings up the Snipping Tool, but I don't see an OCR option. Add-on perhaps? PowerToys? I'd still go with copy and paste to Translate, rather than depend on translating from a bitmap, but it's cool that you can do OCR that easily.

Is it safe to delete those entries (security talking)?

Those entries aren't there by default when you build a new Windows 11 Pro machine, so I would certainly remove them.

I think their "benefit" is for naïve users who might download and double-click a VBS or JS script attached to an email. But if the user is that naïve, and the email told them to right-click and select "Run as administrator", they probably would do that anyhow.

Also, with those entries present, at some point, it could make you tear your hair out if you're getting errors with a PowerShell script due to it running in Constrained Language Mode.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
For me, Win+Shift+S brings up the Snipping Tool, but I don't see an OCR option. Add-on perhaps? PowerToys? I'd still go with copy and paste to Translate, rather than depend on translating from a bitmap, but it's cool that you can do OCR that easily.
Just to clarify how I do it!
1- Set "Automatically save screenshots" to on (in ST=Snipping tool).

s1.png

2- Select "Window Mode" (in ST).

s2.png

3- Press Win+Shift+S and hover your mouse on the GPEdit window and press the left mouse button (it automatically takes a SS and saves it on the Desktop)
4- Drag it (SS) from the Desktop into the OCR box!

g1.gif

I don't need to do #1 and #2 because I always set it on (#1), I almost always use #2 mode, and ST remembers my last settings. I have only #3 and #4!
 

My Computer

System One

  • OS
    Win 11 Enterprise
    Computer type
    Laptop
    CPU
    i7
    Hard Drives
    SSD
I thought you knew it :woozy:. The best OCR translator that can translate Russian to English is Yandex... :yawn:
 

My Computer

System One

  • OS
    Win 11 Enterprise
    Computer type
    Laptop
    CPU
    i7
    Hard Drives
    SSD
s1.png
Does this mean that I am unable to use the script (RebuildIconCache.vbs) any longer? :think:

 

My Computer

System One

  • OS
    Win 11 Enterprise
    Computer type
    Laptop
    CPU
    i7
    Hard Drives
    SSD
View attachment 73832
Does this mean that I am unable to use the script (RebuildIconCache.vbs) any longer? :think:


You can after installing the VBScript feature if needed.

 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
Does this mean that I am unable to use the script (RebuildIconCache.vbs) any longer?

No. It just means that VBScript is a technology on the way out. It will remain installed in Windows for a long time yet. The first change you will see is that there will be an option to remove VBScript in Settings (we've already seen this in the Canary build). Just don't remove it and you won't have any issue.

In the future (exact year unknown), VBScript will not be installed by default, but you will still be able to add it back with a simple click in that same Settings screen.

Further in the future (number of years again unknown) VBScript may be removed altogether with no option to add it back. That's too far away to be worried about it.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
Back
Top Bottom