yrich
March 24, 2015, 5:24pm
1
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
yrich
March 24, 2015, 5:31pm
2
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
jmaple
March 24, 2015, 5:42pm
3
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?
yrich
March 24, 2015, 6:46pm
4
Thanks! After editing the actionscript, I now get all the action lines to complete, but it still results in failed action.
jmaple
March 24, 2015, 7:07pm
5
So if you were to use the CMD commands on an actual command prompt Window on an endpoint, where does it go wrong?
yrich
March 24, 2015, 7:16pm
6
It actually works fine when running it on local machine.
the xml file is located on local machine
I run following from cmd:
netsh wlan add profile filename="c:\users\ryoung\desktop\newwifi\newwifiprofile.xml
jmaple
March 24, 2015, 7:28pm
7
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
yrich
March 24, 2015, 7:37pm
8
Good catch! Thanks However, I had commented out that line to test the first command but same result. The lines complete but the entire action fails.
jmaple
March 24, 2015, 7:38pm
9
If the lines complete, does it produce the output you wanted?
yrich
March 24, 2015, 7:44pm
10
I see both files get created in the __Download folder on local windows 7 64bit machine:
newwifiprofile.xml.tmp
newwifiprofile.xml
…but, netsh does not get executed to install the new wifi profile
jmaple
March 24, 2015, 7:49pm
11
Is the contents of the files in the __Download folder what it’s supposed to be?
yrich
March 24, 2015, 7:51pm
12
This is where the files are dropped into.
C:\Program Files (x86)\BigFix Enterprise\BES Client_BESData\CustomSite_mycompany -2d_Windows_Client__Download
yrich
March 24, 2015, 7:58pm
13
type in above path…
here is the correct path:
C:\Program Files (x86)\BigFix Enterprise\BES Client_BESData\CustomSite_mycompany_-2d_Windows_Client__Download
jmaple
March 24, 2015, 8:05pm
14
Could be that you aren’t applying the setting to the new profile you’re creating because of a typo?
name="newwifiprofilel"
yrich
March 24, 2015, 8:26pm
15
i also corrected that… to no avail.
jmaple
March 24, 2015, 8:27pm
16
If the profile is being created, you should be able to see the list and see it’s been created?
yrich
March 25, 2015, 12:20am
17
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!!!