We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
How do you run a .vbs or .bat as adminstrator in Windows 8?

LucianH
Posts: 445 Forumite


I really am trying to get the hang of Windows 8 Pro but it's begining to get on my ti..
I have some batch files and vbscript files that were running under Vista but seem to refuse to run under windows 8 which I assume are due to security restrictions.
I've got a simple example of a batch file to disable hibernation (containing a single line of "powercfg -h off") but double clicking on the .bat file doesn't work. I've tried creating a shortcut but can't set the "run as administrator" option since it's greyed out.
I'm working on a laptop with a single account set as administrator (and no password).
Any ideas?
I have some batch files and vbscript files that were running under Vista but seem to refuse to run under windows 8 which I assume are due to security restrictions.
I've got a simple example of a batch file to disable hibernation (containing a single line of "powercfg -h off") but double clicking on the .bat file doesn't work. I've tried creating a shortcut but can't set the "run as administrator" option since it's greyed out.
I'm working on a laptop with a single account set as administrator (and no password).
Any ideas?
Never let it get you down... unless it really is as bad as it seems.
0
Comments
-
I really am trying to get the hang of Windows 8 Pro but it's begining to get on my ti..
I have some batch files and vbscript files that were running under Vista but seem to refuse to run under windows 8 which I assume are due to security restrictions.
I've got a simple example of a batch file to disable hibernation (containing a single line of "powercfg -h off") but double clicking on the .bat file doesn't work. I've tried creating a shortcut but can't set the "run as administrator" option since it's greyed out.
I'm working on a laptop with a single account set as administrator (and no password).
Any ideas?4.8kWp 12x400W Longhi 9.6 kWh battery Giv-hy 5.0 Inverter, WSW facing Essex . Aint no sunshine ☀️ Octopus gas fixed dec 24 @ 5.74 tracker again+ Octopus Intelligent Flux leccy0 -
Also if you want to run a .bat file from "Start" then go to the search bit (top/bottom) right of screen, then type in File Explorer, find the file (works the same if you use Windows Explorer apparently) then right click pin to Start ....(I believe you can also set it to run as Admin too from properties but I am not sure since OH is using my W8 at the mo ...but that I believe that brings up the Allow to Make Changes pop up)4.8kWp 12x400W Longhi 9.6 kWh battery Giv-hy 5.0 Inverter, WSW facing Essex . Aint no sunshine ☀️ Octopus gas fixed dec 24 @ 5.74 tracker again+ Octopus Intelligent Flux leccy0
-
I've been cheeky and changed the title of the thread (to reflect my real problem which is running scripts in administrator mode). (For info, the thread title was "How do you run batch files in Windows 8")
Since posting, I've noticed that when you create a shortcut to a batch file you can go to the advanced tab on properties and change select "run as administrator". However, when I create a shortcut to a vbscript file, the "run as administrator" option is greyed out.
Will keep playing but if anybody's got any suggestions it would help.
Thanks.Never let it get you down... unless it really is as bad as it seems.0 -
On my Win 8 machine you can right click the bat files and select run as admin.
.vbs is a different problem, you can add some code the script which basically just re-runs the same script as admin or I think you can make a batch file that calls wscript / cscript with your script, then run the batch as admin.0
This discussion has been closed.
Confirm your email address to Create Threads and Reply

Categories
- All Categories
- 351.7K Banking & Borrowing
- 253.4K Reduce Debt & Boost Income
- 454K Spending & Discounts
- 244.7K Work, Benefits & Business
- 600.2K Mortgages, Homes & Bills
- 177.3K Life & Family
- 258.4K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.2K Discuss & Feedback
- 37.6K Read-Only Boards