Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

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.

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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