locked
Can't get a Wifi profile added. Getting an error "Incorrect function. (Error: 00000001; Source: Windows)" RRS feed

  • Question

  • <![LOG[Executing command line: netsh wlan add profile filename="WiFi-burkewpa.xml"]LOG]!><time="08:56:06.678+420" date="06-08-2016" component="TSManager" context="" type="1" thread="4808" file="commandline.cpp:828">
    <![LOG[Process completed with exit code 1]LOG]!><time="08:56:07.860+420" date="06-08-2016" component="TSManager" context="" type="1" thread="4808" file="commandline.cpp:1124">
    <![LOG[!--------------------------------------------------------------------------------------------!]LOG]!><time="08:56:07.860+420" date="06-08-2016" component="TSManager" context="" type="1" thread="4808" file="instruction.cxx:805">
    <![LOG[Failed to run the action: Add burkewpa. Incorrect function. (Error: 00000001; Source: Windows)]LOG]!><time="08:56:07.860+420" date="06-08-2016" component="TSManager" context="" type="3" thread="4808" file="instruction.cxx:911">
    
    First time playing around with MDT and I'm starting to beat my head against the wall. Using MDT 2013 SP2 to try and deploy Windows 10 to some Surface 3 tablets. Right now I'm battling with getting the wifi profile to add. I found this article http://www.deploymentshare.com/post/how-to-deploy-a-wireless-profile-using-mdt and double and triple checked it. In state restore under Custom Tasks I created a Run Command Line task that runs netsh wlan add profile filename="WiFi-burkewpa.xml" that starts in %deployroot%\Scripts\. In the Scripts folder it has the WiFi-burkewpa.xml file. If the command is run in Windows it works perfectly, but if it runs as part of the task sequence it gives the error listed above in the code block. Any ideas?
    Wednesday, June 8, 2016 5:38 PM

Answers

  • netsh wlan add profile filename="%ScriptRoot%\WiFi-burkewpa.xml"

    FYI ScriptRoot is DeployRoot\Scripts


    Many questions such as where do I find logs and what logs are interesting are found in: MDT TechNet Forum - FAQ & Getting Started Guide Please take the time to read it. Also if you don't post logs your problem won't be easily solved.

    • Proposed as answer by Ty Glander Tuesday, June 14, 2016 8:54 PM
    • Marked as answer by Ty Glander Monday, June 20, 2016 5:38 PM
    Tuesday, June 14, 2016 8:54 PM

All replies

  • Try using a fully qualified path to the XML in your command line.

    Many questions such as where do I find logs and what logs are interesting are found in: MDT TechNet Forum - FAQ & Getting Started Guide Please take the time to read it. Also if you don't post logs your problem won't be easily solved.

    Thursday, June 9, 2016 3:43 AM
  • What would the fully qualified path be, E:\MDTProduction\Scripts? Is that valid on the client?
    Thursday, June 9, 2016 2:25 PM
  • netsh wlan add profile filename="%ScriptRoot%\WiFi-burkewpa.xml"

    FYI ScriptRoot is DeployRoot\Scripts


    Many questions such as where do I find logs and what logs are interesting are found in: MDT TechNet Forum - FAQ & Getting Started Guide Please take the time to read it. Also if you don't post logs your problem won't be easily solved.

    • Proposed as answer by Ty Glander Tuesday, June 14, 2016 8:54 PM
    • Marked as answer by Ty Glander Monday, June 20, 2016 5:38 PM
    Tuesday, June 14, 2016 8:54 PM
  • Thank you. That fixed it.
    Monday, June 20, 2016 5:09 PM