Deploy New WIFI profile

Hi All, I am kinda new to relevance and would appreciate some guidance. I am creating a task to install a new profile on our Win7 64bit systems using following. Here is a portion of the scripts within the task:

//Add WIFI Profile
waithidden cmd.exe /C netsh wlan add profile filename="__Download\newwifiprofile.xml"

//Set New profile WIFI on top of priority list
waithidden netsh cmd.exe /C wlan set profileorder name=“newwifiprofile” interface=“Wireless Network Connection” priority=1

The action fails…
Command failed (Thread execution failed (193)) wait __Download\newwifiprofile.xml (action:15751)

Would someone please kindly take a look and let me know what I am missing?

Thank you,
Rich

Here is the entirety of the Action script.

prefetch newwifiprofile.xml.tmp sha1:bf24943651ac543b672934cd70e19c4f39637b13 size:820 http://bigfix-files.bigixserver.com/Uploads/bf24943651ac543b672934cd70e19c4f39637b13/newwifiprofile.xml.tmp
extract newprofile.xml.tmp
wait __Download\newwifiprofile.xml

//Add WIFI Profile
waithidden cmd.exe /C netsh wlan add profile filename="__Download\newwifiprofile.xml"

//Set Newwifiprofile WIFI on top of priority list
waithidden netsh cmd.exe /C wlan set profileorder name=“newwifiprofilel” interface=“Wireless Network Connection” priority=1

Since you’re passing the XML into a CMD command, you’ll need use client folder relevance and have the pathname output. Try this:

waithidden cmd.exe /C netsh wlan add profile filename="{pathname of client folder of current site as string & "\__Download\newwifiprofile.xml"}"

Also, I notice you have the ActionScript execute the newwifiprofile.xml file.

wait __Download\newwifiprofile.xml

I’m not sure that’s necessary to complete this particular action? What is that command accomplishing?

Thanks! After editing the actionscript, I now get all the action lines to complete, but it still results in failed action.

So if you were to use the CMD commands on an actual command prompt Window on an endpoint, where does it go wrong?

It actually works fine when running it on local machine.

  1. the xml file is located on local machine
  2. I run following from cmd:
    netsh wlan add profile filename="c:\users\ryoung\desktop\newwifi\newwifiprofile.xml

Your second command is a bit backward.

waithidden netsh cmd.exe /C wlan set profileorder name="newwifiprofilel" interface="Wireless Network Connection" priority=1

It should be this:

waithidden cmd.exe /C netsh wlan set profileorder name="newwifiprofilel" interface="Wireless Network Connection" priority=1

Good catch! Thanks :smile: However, I had commented out that line to test the first command but same result. The lines complete but the entire action fails.

If the lines complete, does it produce the output you wanted?

I see both files get created in the __Download folder on local windows 7 64bit machine:

  1. newwifiprofile.xml.tmp
  2. newwifiprofile.xml

…but, netsh does not get executed to install the new wifi profile

Is the contents of the files in the __Download folder what it’s supposed to be?

This is where the files are dropped into.

C:\Program Files (x86)\BigFix Enterprise\BES Client_BESData\CustomSite_mycompany-2d_Windows_Client__Download

type in above path…

here is the correct path:
C:\Program Files (x86)\BigFix Enterprise\BES Client_BESData\CustomSite_mycompany_-2d_Windows_Client__Download

Could be that you aren’t applying the setting to the new profile you’re creating because of a typo?

name="newwifiprofilel"

i also corrected that… to no avail.

If the profile is being created, you should be able to see the list and see it’s been created?

So, finally I got it working by adding the following command in Action script.

action uses wow64 redirection {not x64 of operating system}

Thanks to this reference:
https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014757141

Now to work on my relevance…

Thanks for your help!!!