# Run VBS script with privileges on computer startup / log in

I have script.vbs that I want to run on computer startup, after login to Windows.

Tried to place it in startup directory -> doesn't work.

Tried to select this in Windows's task scheduler -> doesn't work.

What does doesn't work mean? I means that instead of running it, it opens in text editor.

I have read that Windows 10 doesn't allow to run scripts like that (vbs, ps1) directly, especially on startup

I made workaround by startuping cmd that starts vbs or ps1. But I don't like that. Cuz it always opens for a second a window...

So

How to run directly vbs on windows startup?

Having

Windows 10 Pro

• Run it using wscript.exe. Nov 4, 2018 at 13:27

Instead of putting the script itself in the startup folder, put a batch file (.bat) containing the cscript command like this:
cscript //nologo \path\to\script.vbs > nul

• //nologo is to hide the startup logo
• > nul is for not generating output.