Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, December 11, 2017 11:52 AM
Hi Everyone,
I need to add an http reservation to windows using a startup script in windows 10. I've tried setting the bat file to run on startup using Group Policy and it does run it just doesn't work. I've checked the syntax and the command does work it just seems you need admin privileges. I was under the impression that startup scripts was run using the builtin system account and they run as local admin?
Any help would be much appreciated!
Bat file Command:
" netsh http add urlacl url=http://+:8090/ user=Everyone"
All replies (1)
Tuesday, December 12, 2017 4:29 AM âś…Answered
Hi Matthew,
Startup scripts are run under the Local System account, and they have the full rights that are associated with being able to run under the Local System account.
Please post the exact your batch file here to see.
I have done this test on my Windows 10 1703 and Windows 10 1709 lab machines, both of them work fine.
Here is my batch file:
@echo on
netsh http add urlacl url=http://+:8090/ user=Everyone
And please note: it doesn't work during the restart. Only the completely startup from shutdown will trigger it.
Here is my steps:
1. Launch Group Policy Editor.
2. In the left pane of the Group Policy Management Editor window, expand Computer Configuration, Policies and click Scripts.
3. In the right pane, double-click Startup.
4. On the Scripts tab of the Startup Properties dialog, click Show Files. Copy the file(s) you want to run to this location.
5. Once the script you want to run has been added to the GPO, click Add on the Scripts tab.
6. Click Browse in the Add a Script dialog and select the file using the file browser. Additionally in the Add a Script dialog, you can optionally specify parameters to configure how the script runs. Click OK to continue.
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].