Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've just installed a Windows Server 2012 RTM version (MSDN) and I wanted to create an access point with my integrated Wireless Card.

So I use the command netsh to create the wireless access point and it works well. But when I try to use it at boot (through gpedit.msc by adding the command to start-up) some services can't work anymore. Like SENS, or theme services...

If I start the access point after the boot manually it works well.

Is there any way to make this work properly and automatically?

share|improve this question
    
Have you tried adding a wait to the script? Sounds to me like it could be not starting up properly because it needs something else to start up first. –  HopelessN00b Oct 9 '12 at 11:02
    
I've tried a sleep 15/30 and 45 inside a powershell script, and it didn't worked too. I'm creating a service in C# which execute the netsh command and I'll put it in auto-start deleyed mode. If it works, I'll post it here with the (very simple) source code. –  Bahaïka Oct 9 '12 at 11:42
add comment

1 Answer 1

up vote 2 down vote accepted

So,

I finally found a way to make it works properly at startup. First, I created a service in C# (See below for sources) which execute the command : netsh wlan start hostednetwork.

(See how create the network : SoftAP creation under Windows (MSDN Documentation))

This service wait for this services to be launched (They are marked as server dependecy) :

  • iphlpsvc
  • Schedule
  • RemoteAccess
  • BITS
  • ShellHWDetection
  • Wlansvc
  • ProfSvc
  • Themes
  • LanmanServer
  • SENS

I've chosed them because they were crashing because of the creation of the SoftAP. (According to this screenshot) : enter image description here

Once the are started, it waits for 35 secondes (it's supposed to be useless, you can remove it from source code if you want it to start faster) to finally start the command.

If it can help, here is a link to the service executable : Wireless Access point Service executable

If you want to see/edit the (poor) source code behind it : Wireless Access Point Service Source Code

To install the binary, just execute : C:\Windows\Microsoft.NET\Framework\[FrameworkVersion]\InstallUtil.exe with the path of the executable as an argument and reboot.

I'm using it under Windows Server 2012, I don't know for previous version.

After spending 3 days to figure out how to do this, I hope it will help those who are facing the same issue.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.