Using netsh, I used the following command to add a wireless profile

add profile filename="c:\profiles\DLINK-Profile.xml" interface="D-Link DWA-125 N150"

All parameters are valid. But I get the error "An attempt was made to load a program with an incorrect format."

I know this error is related to OS architecture 64bit or 32 bit. But i'm not sure which program is not compatible.

I'm using Win7 64bit

link|improve this question
feedback

2 Answers

It should be something like this:-

netsh wlan add profile filename="PATH_AND_FILENAME.xml" Interface="Wireless Network Connection" user=current

Refer Importing and Exporting Windows Network Settings for more info

link|improve this answer
feedback

In the XML file, check the value in <keyMaterial></keyMaterial> for the following characters and replace accordingly:

"   -> &quot;
&   -> &amp;
'   -> &apos;
<   -> &lt; 
>   -> &gt;

For example, if your WiFi passphrase is listed as P@ssw0rd&123, replace it with P@ssw0rd&amp;123

XML sees the above predefined entities as markup and breaks the ability of the netsh command to parse the XML file properly.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.