- Fri, Aug 9 2013 at 9:54 am #15031Michael PietroforteKeymasterMember Points: 31,761Rank: 4
In my post about sharing an internet connection in Windows 8 a reader asked how to automatically enable this WIFI sharing after the user logged on. The problem is here that the netsh command for starting the virtual network adapter requires admin rights. Thus coping the corresponding batch script to the Windows startup folder won’t work because of UAC.
One solution to the problem is to elevate the batch script with the elevate command from the PowerToys.
- Download the PowerToys and extract the contents of the EXE file to a folder of your choice, say C:\Pogram Files\
- Create a second batch script, say startup.bat with this command:
"C:\Program Files\Elevation\elevate.cmd" "C:\My batch files\batch.bat"
batch.bat contains the commands that you would like to run with admin rights.
- Copy startup.bat to the startup folder: C:\Users\[your user name]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
I guess there are other solutions. Perhaps a simpler one?
- You must be logged in to reply to this topic.