

InterviewSolution
Saved Bookmarks
1. |
Solve : store xml markup as a var...? |
Answer» <html><body><p>Hey,<br/><br/>I am not very experience with Batch scripting.<br/><br/>What I <a href="https://interviewquestions.tuteehub.com/tag/want-1448756" style="font-weight:bold;" target="_blank" title="Click to know more about WANT">WANT</a> to do is store a xml file, (which is a result of a export from netsh) and store it as a variable.<br/><br/>I want to create the xml file on another computers %temp% folder and run netsh import, then delete the file.<br/><br/>This hasn't been working for me. I've <a href="https://interviewquestions.tuteehub.com/tag/highlighted-2110490" style="font-weight:bold;" target="_blank" title="Click to know more about HIGHLIGHTED">HIGHLIGHTED</a> the xml.<br/><br/> Quote</p><blockquote>echo off<br/>var xmlcontect= <strong><em><?xml version="1.0"?><br/><WLANProfile xmlns="<a href="https://www.microsoft.com/networking/WLAN/profile/v1">http://www.microsoft.com/networking/WLAN/profile/v1</a>"><br/> <name><a href="https://interviewquestions.tuteehub.com/tag/netgear" style="font-weight:bold;" target="_blank" title="Click to know more about NETGEAR">NETGEAR</a></name><br/> <SSIDConfig><br/> <SSID><br/> <hex>4E455447454152</hex><br/> <name>NETGEAR</name><br/> </SSID><br/> <nonBroadcast>false</nonBroadcast><br/> </SSIDConfig><br/> <connectionType><a href="https://interviewquestions.tuteehub.com/tag/ess-446734" style="font-weight:bold;" target="_blank" title="Click to know more about ESS">ESS</a></connectionType><br/> <connectionMode>auto</connectionMode><br/> <autoSwitch><a href="https://interviewquestions.tuteehub.com/tag/true-249005" style="font-weight:bold;" target="_blank" title="Click to know more about TRUE">TRUE</a></autoSwitch><br/> <MSM><br/> <security><br/> <authEncryption><br/> <authentication>shared</authentication><br/> <encryption>WEP</encryption><br/> <useOneX>false</useOneX><br/> </authEncryption><br/> <sharedKey><br/> <keyType>networkKey</keyType><br/> <protected>true</protected><br/> <keyMaterial>01000000D08C9DDF0115D1118C7A00C04FC297E B01000000A9CCD0C3AF3D9B408C3844D92C63BD 278000000002088000000003660000A80000001 0000000EB34D699AFE53210DA74B177A8F16C77 0000000004800000A0000000100000001281B80 A3F56BE1B8FF0104FB320C7908000000F4120C6 EE4A560461400000876D1BA154CFF7117A5587D 43EC154AC3DAA81B7B</keyMaterial><br/> </sharedKey><br/> </security><br/> </MSM><br/></WLANProfile> </em></strong>>> %TEMP%\Wireless Network Connection-NETGEAR.xml<br/><br/><br/>netsh wlan add profile filename=”%TEMP%\Wireless Network Connection-NETGEAR.xml”<br/><br/>del /f %TEMP%\Wireless Network Connection-NETGEAR.xml<br/><br/></blockquote> Code: <a>[Select]</a>echo off<br/>more /e +6 "%~f0">"%TEMP%\Wireless Network Connection-NETGEAR.xml"<br/>netsh wlan add profile filename=”%TEMP%\Wireless Network Connection-NETGEAR.xml”<br/>del /f "%TEMP%\Wireless Network Connection-NETGEAR.xml"<br/>goto :eof<br/><br/><?xml version="1.0"?><br/><WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1"><br/> <name>NETGEAR</name><br/> <SSIDConfig><br/> <SSID><br/> <hex>4E455447454152</hex><br/> <name>NETGEAR</name><br/> </SSID><br/> <nonBroadcast>false</nonBroadcast><br/> </SSIDConfig><br/> <connectionType>ESS</connectionType><br/> <connectionMode>auto</connectionMode><br/> <autoSwitch>true</autoSwitch><br/> <MSM><br/> <security><br/> <authEncryption><br/> <authentication>shared</authentication><br/> <encryption>WEP</encryption><br/> <useOneX>false</useOneX><br/> </authEncryption><br/> <sharedKey><br/> <keyType>networkKey</keyType><br/> <protected>true</protected><br/> <keyMaterial>01000000D08C9DDF0115D1118C7A00C04FC297E B01000000A9CCD0C3AF3D9B408C3844D92C63BD 278000000002088000000003660000A80000001 0000000EB34D699AFE53210DA74B177A8F16C77 0000000004800000A0000000100000001281B80 A3F56BE1B8FF0104FB320C7908000000F4120C6 EE4A560461400000876D1BA154CFF7117A5587D 43EC154AC3DAA81B7B</keyMaterial><br/> </sharedKey><br/> </security><br/> </MSM><br/></WLANProfile></body></html> | |