Sorry it’s taken so long to get back with you on this. I’ve been working on several other tasks that forced this one to take a back seat.
I was wondering about how to download the file to the end client with Bigfix. I’m just curious if it will have better results than writing the file with Bigfix to the end client.
Hi — please look at my previous comment and see if you can find the file in the directory.
This is an important troubleshooting step and we should make sure we know where the files are being created before we consider switching from writing out the file to downloading it.
Okay, so that would be in a Bigfix log?
Yes – or when you push out the action you should be able to sort the contents of the __BESData folder by date modified and you’ll see which of the folders it’ll likely be in because the date modified will change
Okay, so the following is what it said in the log after I just ran the script:
Relevant - Windows PSK Push Script (fixlet:1191)
At 15:36:31 -0500 -
ActionLogMessage: (action:1191) Action signature verified for Execution
ActionLogMessage: (action:1191) starting action
At 15:36:31 -0500 - actionsite (http://mybigfixserver:52311/cgi-bin/bfgather.exe/actionsite)
Command succeeded delete No 'C:\Program Files (x86)\BigFix Enterprise\BES Client\__BESData\actionsite\wifi.xml' exists to delete, no failure reported (action:1191)
Command succeeded delete No 'C:\Program Files (x86)\BigFix Enterprise\BES Client\__BESData\actionsite\__createfile' exists to delete, no failure reported (action:1191)
Command succeeded createfile until _end_ (action:1191)
Command succeeded move __createfile wifi.xml (action:1191)
Command started - waithidden netsh add profile filename="wifi.xml" (action:1191)
At 15:36:37 -0500 -
Report posted successfully
At 15:36:37 -0500 - actionsite (http://mybigfixserver:52311/cgi-bin/bfgather.exe/actionsite)
Command succeeded (Exit Code=1) waithidden netsh add profile filename="wifi.xml" (action:1191)
At 15:36:37 -0500 -
ActionLogMessage: (action:1191) ending action
At 15:36:37 -0500 - mailboxsite (http://mybigfixserver:52311/cgi-bin/bfgather.exe/mailboxsite5052836)
Not Relevant - Windows PSK Push Script (fixlet:1191)
At 15:38:22 -0500 -
Report posted successfully
Is the contents of:
C:\Program Files (x86)\BigFix Enterprise\BES Client_BESData\actionsite\wifi.xml
The XML you were hoping for?
I don’t see:
action uses wow64 redirection {not x64 of operating system}
Did you add that to your fixlet?
Yes, that’s the xml I was wanting.
I actually took that line out for this test. Should I have kept that?
Yes please try again with that line still there
Sorry, I was sick yesterday.
I ran the script again today with that line in the script. Still not working. The following is what I found in the log:
At 12:28:19 -0500 - mailboxsite (http://bigfix.wccards.k12.mo.us:52311/cgi-bin/bfgather.exe/mailboxsite5052836)
Relevant - Windows PSK Push Script (fixlet:1192)
At 12:28:19 -0500 -
ActionLogMessage: (action:1192) Action signature verified for Execution
ActionLogMessage: (action:1192) starting action
At 12:28:19 -0500 - actionsite (http://bigfix.wccards.k12.mo.us:52311/cgi-bin/bfgather.exe/actionsite)
Wow64 redirection disabled. action uses wow64 redirection {not x64 of operating system} (action:1192)
Command succeeded delete No 'C:\Program Files (x86)\BigFix Enterprise\BES Client\__BESData\actionsite\wifi.xml' exists to delete, no failure reported (action:1192)
Command succeeded delete No 'C:\Program Files (x86)\BigFix Enterprise\BES Client\__BESData\actionsite\__createfile' exists to delete, no failure reported (action:1192)
Command succeeded createfile until _end_ (action:1192)
Command succeeded move __createfile wifi.xml (action:1192)
Command started - waithidden netsh add profile filename="wifi.xml" (action:1192)
At 12:28:24 -0500 -
Report posted successfully
At 12:28:25 -0500 - actionsite (http://bigfix.wccards.k12.mo.us:52311/cgi-bin/bfgather.exe/actionsite)
Command succeeded (Exit Code=1) waithidden netsh add profile filename="wifi.xml" (action:1192)
At 12:28:25 -0500 -
ActionLogMessage: (action:1192) ending action
At 12:28:25 -0500 - mailboxsite (http://bigfix.wccards.k12.mo.us:52311/cgi-bin/bfgather.exe/mailboxsite5052836)
Not Relevant - Windows PSK Push Script (fixlet:1192)
At 12:30:03 -0500 -
Report posted successfully
It is creating the xml file, however it’s not actually pushing the wifi profile to the computer. Could this be an issue with the netsh command line?
Hey, just wanted to check in on this issue since it’s been a while since the last update.
Change your actionscript to this:
action uses wow64 redirection {not x64 of operating system}
delete config.xml
delete __createfile
createfile until _end_
CONTENTS OF YOUR XML
_end_
move __createfile config.xml
delete __createfile
delete run.bat
createfile until _end_
netsh add profile filename="config.xml"
_end_
move __createfile run.bat
waithidden run.bat
This will create a wifi XML called, “config.xml”
This will also create a batch file called, “run.bat” which runs the command.
You can open a command prompt, CD “\location\of\the\besdata\site” and type, “run.bat”. This will run the netsh command and push the output to the command window so you can see what’s happening.
I tried this and it still didn’t add the profile.
So the point of the last step is it creates a batch file and an xml file in the site within the __BESData folder. From there you can run the batch script to see if you receive an error message.
You can open a command prompt, CD “\location\of\the\besdata\site” and type, “run.bat”. This will run the netsh command and push the output to the command window so you can see what’s happening.
Okay, so when I ran the .bat file from the cmd prompt I got the following:
C:\ Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite>run.bat
C:\ Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite>netsh add profile filename="wifi.xml"
The following command was not found: add profile filename=wifi.xml.
I was seeing this before which is why I recommended using “netsh wlan add…”
Can you try changing it to netsh wlan and seeing what the error message is?
Bill
The following is what I got after using "netsh wlan add…"
C:\ Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite>run.bat
C:\ Program Files (x86)\BigFix Enterprise\BES Client__BESData\actionsite>netsh wlan add profile filename="wifi.xml"
An attempt was made to load a program with an incorrect format.
Can you share with me the contents of your wifi.XML minus any sensitive information?
Is there a line: <?xml version="1.0" encoding="US-ASCII"?> in the XML? Can you try removing it?
I removed the <?xml version="1.0"?>
After doing so it did add the profile, however it didn’t let me automatically connect to that wifi connection. It still asked for a password…