none
Importing a Wireless profile .xml file using netsh in a VBS Script RRS feed

  • Question

  • Hello

    I'm trying to adapt a VBS script that I have written to import a wireless profile from an XML file.

    I have the command working in a bat file and I can call the bat file in the vbs script to import it as follows

    oWshShell.Run DQ & strAppPath5 & "\Mobile Users.bat" & DQ,1,True

    The issue is that I need a pause on the end of that bat file because we use it manually as well as calling it from the script so the script just stops.

    I was working with the following code but I keep getting either a Syntax error or an invalid path when it does run the script

    oWshShell.Run "cmd /k netsh wlan add profilename=" DQ & strAppPath5 & "\BATCH FILES AND SCRIPTS\Mobile Users\MobileUsers.xml" & "user=all" & DQ,1,True

    I have also tried it with a deffinative

    oWshShell.Run "%comspec% /k netsh wlan add profile filename="\\Network Path\BATCH FILES AND SCRIPTS\Mobile Users\MobileUsers.xml" user=all",1,True

    Any help is much appreciated

    Friday, October 23, 2015 9:17 AM

Answers

All replies