Windows – WiFi tethering in windows7 without Admin previleges

administratortetheringwindows 7wireless-networking

I need to share my internet connection using WiFi. And unfortunately I dont have administrator rights.
I know how to enable hostednetwork but this requires admin rights everytime the system starts.
Is there any way that I can do this?

As a last resort, I can have administrator previleges for installing software initially but not everytime the system starts. So you can suugest any software that will not require admin previleges later for turning this feature on and off.

Best Answer

Based on the answer to the question I asked, then what you basically need to do is to run a task with elevated privileges, but without specifying those privileges each time from a standard user account.

Well this can be done, but it's a bit of a hack :-)

Step 1

Create a batch file that will run the setup command for your wifi (In this case the netsh command in the comments above)

Place that batch file some where you can find it, preferably in your path, somewhere like c:\windows

Make sure you create the batch file as admin, using an admin account.

Step 2

Still using an admin account, find and open the windows task scheduler, usually you can type "task" into search, or find it in the control panel somewhere.

When the scheduler opens, use the options available to create a new task.

In the general tab of the task, add a name for the task, optionally a description then under security options change the user account to use, to one which has the required authentication to run the batch file you created in step 1

Also make sure to select, "Run Only when user is logged on" and check "Run with highest pivliges"

In the "Actions" tab, add a new action and set the action type as "Run a program", followed by putting in the settings the name of your batch file and any other settings needed such as parameters and run folder.

OK everything, and let the task be created. (Don't add any schedule to it)

In the task list, right click on the new task you just created, and choose run (This is to test to make sure everything runs as anticipated)

Once your happy with that, move on to ....

Step 3

Back under your normal user account, create a shortcut where ever you want to run your task from, for example on your desktop.

Do this by using the usual, right click and create new shortcut procedure.

when you get to the place to specify the path of the command to run, enter

schtasks /run /tn "<name of your task>"

So if in step 2 you called your task "wifiswitcher", then you would enter

schtasks /run /tn "wifiswitcher"

Complete the wizard, and save the shortcut.

Step 4 (Optional)

If you want to tidy things up a bit, right click on your new shortcut and under the shortcut properties, set the tun type to minimized and possibly give it a nicer Icon.

The alternative Way

If you have any experience of C# programming, then it's quite easy to create a simple command line program and in the code have it request admin privileges via the UAC system

That's the thing that pops up the "Would you like to allow X to make changes to your computer Yes/No" box.

If you choose to do it that way, then it's a simple as just using the Process class in .NET to run the required netsh command, and answer a simple yes or no button each time you click on the app.

Related Question