Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1126 lines
32 KiB

  1. <html>
  2. <head>
  3. <object id="pchealth" classid="CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7"></object>
  4. <meta http-equiv="Content-Type" content="text/html; CHARSET=windows-1252" />
  5. <meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l comment "RSACi North America Server" by "[email protected]" r (n 0 s 0 v 0 l 0))' />
  6. <meta http-equiv="MSThemeCompatible" content="Yes" />
  7. <title id="eDFSTitle">Get Help with Your Hardware Device</title>
  8. <style type="text/css">
  9. body
  10. {
  11. font:messagebox;
  12. padding:10px 10px 5px 10px;
  13. }
  14. h3
  15. {
  16. font-family:tahoma;
  17. font-size:130%;
  18. color:black;
  19. }
  20. .clsContent, .clsSubmit
  21. {
  22. padding-bottom: 5px;
  23. }
  24. .clsContent a
  25. {
  26. color:#114488;
  27. text-decoration:underline;
  28. }
  29. ul
  30. {
  31. margin-top:10px;
  32. list-style:circle outside;
  33. }
  34. a
  35. {
  36. color:blue;
  37. text-decoration:underline;
  38. }
  39. div#eConfirm
  40. {
  41. font-size:100%;
  42. }
  43. button
  44. {
  45. font-size:8pt;
  46. padding-left:10px;
  47. padding-right:10px;
  48. }
  49. .clsHidden
  50. {
  51. display:none;
  52. }
  53. div#eShowPriv
  54. {
  55. width:450px;
  56. border:2px outset;
  57. background:window;
  58. }
  59. .clsNavTable
  60. {
  61. position:absolute;
  62. bottom:5px;
  63. right:30px;
  64. }
  65. div#eResContainer
  66. {
  67. overflow-y:auto;
  68. display:none;
  69. }
  70. </style>
  71. <script type="text/jscript" defer>
  72. /*** Global vars ***/
  73. var g_bDebugMode = false;
  74. if( false == g_bDebugMode )
  75. {
  76. window.onerror = new Function( "return true" );
  77. }
  78. var g_sThisHREF = location.href;
  79. var g_bSend = false;
  80. var g_bConnect = false;
  81. var g_bFromConnectUI = false;
  82. var g_bDelayUpload = false;
  83. var g_bFromSavedFav = false;
  84. var g_sDrvIDs = "";
  85. var g_bUploadSuccess = false;
  86. var g_bFav_UploadSuccess = false;
  87. var g_bSaveFavorite = false;
  88. var g_bValidXMLFile = ValidateXMLFile();
  89. var g_oWShell = new ActiveXObject( "WScript.Shell" );
  90. var g_oXMLDlg, g_oPrivDlg, g_oDrag = null;
  91. var g_sTestURL = "http://feedback.windows.com/TestDFS.asp";
  92. var g_bNonRASConnectoid = false;
  93. var g_bRanRasPhone = false;
  94. var g_bUploadOnce = false;
  95. //For localization
  96. var L_DataFileError_Message = "The upload data file does not exist or is malformed.";
  97. var L_FavoriteAdded_Message = "This page will be added to your Help and Support Favorites list.";
  98. var L_FavoriteDupe_Message = "You already have a Favorite link to this topic.";
  99. var L_DialogHeading_Text = "Missing Device Driver XML Profile";
  100. var L_DialogClose_Text = "Close";
  101. var L_Connecting_Text = "Connecting...";
  102. var L_LaunchNCW_Message = "Windows cannot find an existing Internet connection on your computer. To create an Internet connection now, click Yes.\n\nIf you have an existing connection that Windows might not be detecting, click No, and then manually start the connection. Important: Do not close Help and Support Center. After establishing the Internet connection, come back to the connection page, and then click Next again.\n\nIf you know you have an existing connection that is already open, click No, and then click Next again.";
  103. /*** End Global vars ***/
  104. /*** Error Handling Code ***/
  105. function ASSERT( sObj )
  106. {
  107. try
  108. {
  109. eval( sObj );
  110. }
  111. catch( e )
  112. {
  113. if( true == g_bDebugMode )
  114. {
  115. alert( "Error running: " + sObj + " -> " + e.description + "\nNumber -> " + e.number );
  116. }
  117. }
  118. }
  119. /*** End Error Handling Code ***/
  120. /*** Connection Code ***/
  121. function oConnCheck_onCheckDone( cn, lStatus, hr, url, vCtx )
  122. {
  123. if( 4 == lStatus )
  124. {
  125. eConnectingH3.innerText = L_Connecting_Text;
  126. ASSERT( "GetDriverName( false )" );
  127. }
  128. else
  129. {
  130. if( true == g_bFromConnectUI )
  131. {
  132. ASSERT( "Cancel( true )" );
  133. }
  134. else
  135. {
  136. eConnectingH3.style.display = "none";
  137. h3Default.style.display = "block";
  138. ASSERT( "ShowConnectionUI()" );
  139. }
  140. }
  141. }
  142. function RASInternetConnect()
  143. {
  144. var bHasConnectoid = pchealth.Connectivity.HasConnectoid;
  145. var bAutoDialEnabled = pchealth.Connectivity.AutoDialEnabled;
  146. if( true == bHasConnectoid )
  147. {
  148. if( true == bAutoDialEnabled || true == g_bRanRasPhone )
  149. {
  150. try
  151. {
  152. pchealth.Connectivity.AutoDial( false );
  153. setTimeout( "TestConn( g_sTestURL )", 50 );
  154. }
  155. catch( e )
  156. {
  157. eNoConnect.style.display = "block";
  158. eConnecting.style.display = "none";
  159. h3Default.style.display = "block";
  160. eConnectionUI.style.display = "block";
  161. eBtnNav2.style.display = "block";
  162. }
  163. }
  164. else
  165. {
  166. h3Default.style.display = "block";
  167. eConnectionUI.style.display = "block";
  168. eBtnNav2.style.display = "block";
  169. eConnecting.style.display = "none";
  170. OpenConnManager();
  171. }
  172. }
  173. else
  174. {
  175. eConnecting.style.display = "none";
  176. h3Default.style.display = "block";
  177. eConnectionUI.style.display = "block";
  178. eBtnNav2.style.display = "block";
  179. ShowMessage( L_LaunchNCW_Message );
  180. }
  181. }
  182. function InitConn( bContinue )
  183. {
  184. var bLAN = pchealth.Connectivity.IsALan;
  185. var sIPs = GetIPAdresses();
  186. if( true == bContinue )
  187. {
  188. h3Default.style.display = "none";
  189. eMain.style.display = "none";
  190. eConnectionUI.style.display = "none";
  191. eBtnNav1.style.display = "none";
  192. eBtnNav2.style.display = "none";
  193. tblResources.style.display = "none";
  194. eNoConnect.style.display = "none";
  195. eConnecting.style.display = "block";
  196. if( ( true == bLAN || true == g_bNonRASConnectoid ) && ( "" != sIPs && "0.0.0.0" != sIPs ) )
  197. {
  198. setTimeout( "TestConn( g_sTestURL )", 50 );
  199. }
  200. else
  201. {
  202. if( "" != sIPs && "0.0.0.0" != sIPs )
  203. {
  204. setTimeout( "TestConn( g_sTestURL )", 50 );
  205. }
  206. else
  207. {
  208. if( true == g_bFromConnectUI )
  209. {
  210. ASSERT( "RASInternetConnect()" );
  211. }
  212. else
  213. {
  214. eConnecting.style.display = "none";
  215. ASSERT( "ShowConnectionUI()" );
  216. }
  217. }
  218. }
  219. }
  220. else
  221. {
  222. eConnecting.style.display = "none";
  223. tdThanks.style.display = "block";
  224. ShowResults();
  225. }
  226. }
  227. function TestConn( sConnTestURL )
  228. {
  229. var oPCH_ConnCheck = pchealth.Connectivity.CreateObject_ConnectionCheck();
  230. oPCH_ConnCheck.onCheckDone = oConnCheck_onCheckDone;
  231. oPCH_ConnCheck.StartUrlCheck( sConnTestURL, 0 );
  232. }
  233. /*** End Connection Code ***/
  234. /*** Upload Process ***/
  235. function ValidateXMLFile()
  236. {
  237. var sFile = GetFilePathFromURL( g_sThisHREF );
  238. if( !bCorrectPathAndFileName(sFile) ) return false;
  239. try
  240. {
  241. var oXML = new ActiveXObject( "Msxml2.DOMDocument" );
  242. oXML.async = false;
  243. oXML.validateOnParse = false;
  244. oXML.resolveExternals = false;
  245. oXML.load( sFile );
  246. if( "" == oXML.xml )
  247. {
  248. return false;
  249. }
  250. else
  251. {
  252. return true;
  253. }
  254. }
  255. catch( e )
  256. {
  257. return false;
  258. }
  259. }
  260. function GetFilePathFromURL( sURL )
  261. {
  262. var sFilePath = unescape( g_sThisHREF.substring( g_sThisHREF.indexOf( "?" ) + 1 ) );
  263. sFilePath = sFilePath.replace( "file://", "" ).replace( /\&.*/, "" );
  264. sFilePath = sFilePath.substring(0, sFilePath.indexOf(".xml") + 4);
  265. return sFilePath;
  266. }
  267. function bCorrectPathAndFileName( sFilePath )
  268. {
  269. try
  270. {
  271. var oShell = new ActiveXObject("WScript.Shell");
  272. var sProgFiles = oShell.ExpandEnvironmentStrings("%ProgramFiles%");
  273. var sTest = sProgFiles.replace("\\","\\\\") + "(\\\\windowsupdate\\\\v4hardware_.*[0-9].xml|\\\\windowsupdate\\\\v4\\\\hardware_.*[0-9].xml)";
  274. var re = new RegExp( sTest, "i" );
  275. if( re.test(sFilePath) )
  276. {
  277. return true;
  278. }
  279. else
  280. {
  281. return false;
  282. }
  283. }
  284. catch( e )
  285. {
  286. return false;
  287. }
  288. }
  289. function SetUploadState( bStatus )
  290. {
  291. eNext.disabled = false;
  292. if( true == bStatus )
  293. {
  294. g_bSend = true;
  295. g_bConnect = true;
  296. }
  297. else
  298. {
  299. g_bSend = false;
  300. g_bConnect = false;
  301. }
  302. }
  303. function SetConnState( bConnStatus )
  304. {
  305. eConnNext.disabled = false;
  306. g_bFromConnectUI = true;
  307. if( true == bConnStatus )
  308. {
  309. g_bConnect = true;
  310. g_bDelayUpload = false;
  311. }
  312. else
  313. {
  314. g_bConnect = false;
  315. g_bDelayUpload = true;
  316. }
  317. }
  318. function ShowConnectionUI()
  319. {
  320. if( true == g_bSend )
  321. {
  322. eAccess.scrollTop = 0;
  323. eMain.style.display = "none";
  324. h3Default.style.display = "block";
  325. eConnectionUI.style.display = "block";
  326. eBtnNav1.style.display = "none";
  327. eBtnNav2.style.display = "block";
  328. if( true == g_bFromSavedFav )
  329. {
  330. eChkSaveQuery.style.display = "none";
  331. eLblSaveQuery.style.display = "none";
  332. eConnBack.style.display = "none";
  333. }
  334. ASSERT( "MatchSize()" );
  335. }
  336. else
  337. {
  338. ASSERT( 'Cancel()' );
  339. }
  340. }
  341. function Send()
  342. {
  343. if( true == g_bSend )
  344. {
  345. if( false == g_bFromSavedFav && false == g_bUploadOnce )
  346. {
  347. if( true == g_bValidXMLFile )
  348. {
  349. window.setTimeout( 'ASSERT( "UploadData()" )', 50 );
  350. }
  351. else
  352. {
  353. ASSERT( "ShowDataFileError()" );
  354. return;
  355. }
  356. }
  357. InitConn( g_bConnect );
  358. }
  359. else
  360. {
  361. Cancel();
  362. }
  363. if( true == g_bDelayUpload )
  364. {
  365. h3Default.style.display = "block";
  366. tblCancel.style.display = "block";
  367. tdThanks.style.display = "none";
  368. tdDelayUpload.style.display = "block";
  369. eTDContactMan.style.display = "block";
  370. eNoConnect.style.display = "none";
  371. tdNoRecord.style.display = "none";
  372. }
  373. }
  374. function Cancel( bConnFailed )
  375. {
  376. eMain.style.display = "none";
  377. eConnectionUI.style.display = "none";
  378. eBtnNav1.style.display = "none";
  379. eBtnNav2.style.display = "none";
  380. eBtnNav3.style.display = "block";
  381. tblResources.style.display = "block";
  382. eAccess.scrollTop = 0;
  383. if( false == g_bValidXMLFile )
  384. {
  385. Content_LI3.style.display = "none";
  386. }
  387. if( !bConnFailed )
  388. {
  389. Content_LI3.style.display = "none";
  390. tblCancel.style.display = "block";
  391. tdThanks.style.display = "none"
  392. tdDelayUpload.style.display = "none";
  393. eTDContactMan.style.display = "block";
  394. tdNoRecord.style.display = "block";
  395. }
  396. else
  397. {
  398. eConnecting.style.display = "none";
  399. tblCancel.style.display = "block";
  400. tdThanks.style.display = "none"
  401. tdDelayUpload.style.display = "none";
  402. eTDContactMan.style.display = "block";
  403. eNoConnect.style.display = "block";
  404. }
  405. if( true == g_bFromSavedFav )
  406. {
  407. eFinish.style.display = "none";
  408. }
  409. ResizeButtons( [eBack,eNext_D,eFinish] );
  410. }
  411. function Back()
  412. {
  413. eAccess.scrollTop = 0;
  414. eResContainer.style.display = "none";
  415. h3Searching.style.display = "none";
  416. h3Default.style.display = "block";
  417. tblCancel.style.display = "none";
  418. tblResources.style.display = "none";
  419. eNoConnect.style.display = "none";
  420. if( true == g_bFromConnectUI )
  421. {
  422. eConnectionUI.style.display = "block";
  423. eBtnNav1.style.display = "none";
  424. eBtnNav3.style.display = "none";
  425. eBtnNav2.style.display = "block";
  426. eConnecting.style.display = "none";
  427. ResizeButtons( [eConnBack,eConnNext,eConnCancel] );
  428. }
  429. else
  430. {
  431. eMain.style.display = "block";
  432. tdNoRecord.style.display = "none";
  433. eConnectionUI.style.display = "none";
  434. eBtnNav3.style.display = "none";
  435. eBtnNav2.style.display = "none";
  436. eBtnNav1.style.display = "block";
  437. ResizeButtons( [eBack,eNext,eCancel] );
  438. }
  439. }
  440. function UploadData()
  441. {
  442. var sXMLFile = GetFilePathFromURL( g_sThisHREF );
  443. var vtExpDate = SetExpirationDate( 20 );
  444. var oMPC_UL = new ActiveXObject( "UploadManager.MPCUpload" );
  445. var oJob = oMPC_UL.CreateJob();
  446. oJob.Sig = "";
  447. oJob.Server = "http://feedback.windows.com/scripts/uploadserver.dll";
  448. oJob.ProviderID = "NonEsc";
  449. oJob.Mode = 1;
  450. oJob.PersistToDisk = true;
  451. oJob.History = 0;
  452. oJob.ExpirationTime = vtExpDate;
  453. oJob.GetDataFromFile( sXMLFile );
  454. oJob.ActivateAsync();
  455. g_bUploadOnce = true;
  456. }
  457. function Resize()
  458. {
  459. document.all.eResWindow.style.width = document.body.clientWidth - 50;
  460. }
  461. function CheckDriver( sDriver )
  462. {
  463. var iLCID = pchealth.UserSettings.CurrentSKU.Language;
  464. var sURL = "http://go.microsoft.com/fwlink/?linkid=433&eDrvID=" + escape( sDriver ) + "&lcid=" + iLCID;
  465. document.frames["eResWindow"].location.replace( sURL );
  466. h3Searching.style.display = "block";
  467. ASSERT( "ShowResults()" );
  468. }
  469. function ShowResults()
  470. {
  471. if( true == g_bConnect )
  472. {
  473. eResContainer.style.display = "block";
  474. document.all.eResWindow.style.width = document.body.clientWidth - 55;
  475. }
  476. eAccess.scrollTop = 0;
  477. eConnecting.style.display = "none";
  478. tblResources.style.display = "block";
  479. tdThanks.style.display = "none";
  480. Content_LI3.style.display = "block";
  481. eConnectionUI.style.display = "none";
  482. eBtnNav2.style.display = "none";
  483. if( false == g_bFromSavedFav && false == g_bFromConnectUI )
  484. {
  485. eBtnNav3.style.display = "block";
  486. }
  487. ResizeButtons( [eBack,eNext_D,eFinish] );
  488. if( true == g_bFromSavedFav )
  489. {
  490. tdNoRecord.style.display = "none";
  491. Content_LI3.style.display = "none";
  492. eFinish.style.display = "none";
  493. }
  494. setTimeout( "ASSERT( 'Resize_ResultsContainer()' );", 100 );
  495. }
  496. function Resize_ResultsContainer()
  497. {
  498. if( eResContainer.offsetHeight > 250 )
  499. {
  500. eResContainer.style.height = '250px';
  501. }
  502. }
  503. function GetDriverName( bShow, bForSavedFav )
  504. {
  505. var docElem, aDriverID, iDriverIDLen;
  506. var sXMLFile = GetFilePathFromURL( g_sThisHREF );
  507. if( true == g_bValidXMLFile )
  508. {
  509. var streamXML = pchealth.OpenFileAsStream( sXMLFile );
  510. var oXML = new ActiveXObject( "Msxml2.DOMDocument" );
  511. oXML.async = false;
  512. oXML.validateOnParse = false;
  513. oXML.resolveExternals = false;
  514. oXML.load( streamXML );
  515. docElem = oXML.documentElement;
  516. aDriverID = docElem.selectNodes( "//hwid" );
  517. iDriverIDLen = aDriverID.length
  518. if( !bShow )
  519. {
  520. g_sDrvIDs = escape( aDriverID.item(0).text ) + "|";
  521. for( var i=1; i<iDriverIDLen; i++ )
  522. {
  523. g_sDrvIDs += escape( aDriverID.item(i).text ) + "|";
  524. }
  525. if( !bForSavedFav )
  526. {
  527. eMain.style.display = "none";
  528. h3Default.style.display = "none";
  529. CheckDriver( g_sDrvIDs );
  530. }
  531. }
  532. }
  533. else
  534. {
  535. if( true == g_bFav_UploadSuccess )
  536. {
  537. var sDrvIDs = g_sThisHREF.substring( g_sThisHREF.indexOf( "&eDrvIDs=" ) ).replace( "&eDrvIDs=", "" );
  538. ASSERT( "CheckDriver('" + sDrvIDs + "')" );
  539. }
  540. else
  541. {
  542. eConnecting.style.display = "none";
  543. ASSERT( "ShowDataFileError()" );
  544. }
  545. }
  546. }
  547. function ShowPopUp( sType )
  548. {
  549. if( "xml" == sType )
  550. {
  551. ASSERT( "ShowUploadXML()" );
  552. }
  553. else
  554. {
  555. ASSERT( "OpenPrivWindow()" );
  556. }
  557. }
  558. function OpenPrivWindow()
  559. {
  560. if( null == g_oPrivDlg )
  561. {
  562. g_oPrivDlg = window.showModelessDialog( "hcp://system/dfs/Privacy.htm", window, "status:no;help:no;resizable:no;dialogWidth:500px;dialogHeight:450px" );
  563. }
  564. }
  565. function DisplayXML()
  566. {
  567. var sXmlFile = GetFilePathFromURL( g_sThisHREF );
  568. var oXML = new ActiveXObject( "Msxml2.DOMDocument" );
  569. oXML.async = false;
  570. oXML.validateOnParse = false;
  571. oXML.resolveExternals = false;
  572. oXML.load( sXmlFile );
  573. var oStyle = new ActiveXObject( "Msxml2.DOMDocument" );
  574. oStyle.async = false;
  575. oStyle.load( "xmldisplay.xsl" );
  576. var sHTML = oXML.transformNode( oStyle );
  577. sHTML = sHTML.replace( "</h5>", L_DialogHeading_Text + "</h5>" );
  578. sHTML = sHTML.replace( "</button>", L_DialogClose_Text + "</button>" );
  579. g_oXMLDlg.document.write( sHTML );
  580. }
  581. function ShowUploadXML()
  582. {
  583. if( null == g_oXMLDlg )
  584. {
  585. if( true == g_bValidXMLFile )
  586. {
  587. var sURL = "hcp://system/dfs/XMLDialog.htm";
  588. g_oXMLDlg = window.showModelessDialog( sURL, window, "status:no;help:no;dialogWidth:600px;dialogHeight:450px");
  589. }
  590. else
  591. {
  592. ASSERT( "ShowDataFileError()" );
  593. }
  594. }
  595. }
  596. /*** End Upload Process ***/
  597. /*** Dialog Code ***/
  598. function ShowMessage( sMessage )
  599. {
  600. var sButtonType = "YESNOCANCEL";
  601. var sRetVal = pchealth.MessageBox( sMessage, sButtonType );
  602. if( "YES" == sRetVal )
  603. {
  604. eNoConnect.style.display = "none";
  605. OpenConnWizard();
  606. }
  607. else if( "NO" == sRetVal )
  608. {
  609. g_bNonRASConnectoid = true;
  610. }
  611. }
  612. /*** End Dialog Code ***/
  613. /*** Add To HSS Favorites ***/
  614. function AddFavorite( bFromResourceLink )
  615. {
  616. var oFav = pchealth.UserSettings.Favorites;
  617. var sThisURL = g_sThisHREF;
  618. if( true == g_bSaveFavorite || true == oFav.IsDuplicate( sThisURL ) )
  619. {
  620. pchealth.MessageBox( L_FavoriteDupe_Message, "OK" );
  621. return;
  622. }
  623. else
  624. {
  625. g_bSaveFavorite = true;
  626. }
  627. ASSERT( "GetDriverName( false, true )" );
  628. if( true == bFromResourceLink )
  629. {
  630. pchealth.MessageBox( L_FavoriteAdded_Message, "OK" );
  631. }
  632. }
  633. /*** End Favs ***/
  634. /*** Misc ***/
  635. function OpenConnWizard()
  636. {
  637. try
  638. {
  639. var oShell = new ActiveXObject( "WScript.Shell" );
  640. var sShellCmd_NCW = "rundll32 netshell.dll,StartNCW 0";
  641. oShell.Run( sShellCmd_NCW );
  642. }
  643. catch( e )
  644. {
  645. }
  646. }
  647. function OpenConnManager()
  648. {
  649. try
  650. {
  651. g_bRanRasPhone = true;
  652. g_oWShell.Run( "rasphone.exe" );
  653. }
  654. catch( e )
  655. {
  656. g_bRanRasPhone = false;
  657. }
  658. }
  659. function LaunchCPL_HW()
  660. {
  661. g_oWShell.Run( "control hdwwiz.cpl" );
  662. if( false == g_bFromSavedFav )
  663. {
  664. setTimeout( "pchealth.close();", 500 );
  665. }
  666. }
  667. function HSS_NavigateToTS()
  668. {
  669. var oFSO = new ActiveXObject( "Scripting.FileSystemObject" );
  670. var sWinDir = oFSO.GetSpecialFolder(0);
  671. var sHelpTopicURL = "";
  672. if( true == pchealth.UserSettings.IsDesktopVersion )
  673. {
  674. sHelpTopicURL = "hcp://services/subsite?node=TopLevelBucket_4/Fixing_a_problem&select=TopLevelBucket_4/Fixing_a_problem/Home_Networking_and_network_problems";
  675. if( false == g_bFromSavedFav )
  676. {
  677. g_oWShell.Run( sHelpTopicURL );
  678. }
  679. else
  680. {
  681. location.href = sHelpTopicURL;
  682. }
  683. }
  684. else
  685. {
  686. sHelpTopicURL = "hcp://services/subsite?node=Connections/Network_Connections&topic=ms-its:" + sWinDir + "\\Help\\netcfg.chm::/trouble_all.htm&select=Connections/Network_Connections/Troubleshooting/Troubleshooting_network_and_dial-up_connections";
  687. if( false == g_bFromSavedFav )
  688. {
  689. g_oWShell.Run( sHelpTopicURL );
  690. }
  691. else
  692. {
  693. location.href = sHelpTopicURL;
  694. }
  695. }
  696. }
  697. function ResizeButtons( arr_oButtons )
  698. {
  699. var aBtnsLen = arr_oButtons.length;
  700. var aWidths = new Array();
  701. var iMax = 0;
  702. for( var i=0; i<aBtnsLen; i++ )
  703. {
  704. aWidths[i] = arr_oButtons[i].offsetWidth;
  705. }
  706. for( var i=0; i<aBtnsLen; i++ )
  707. {
  708. if( aWidths[i] > iMax )
  709. {
  710. iMax = aWidths[i];
  711. }
  712. }
  713. var iMaxBtnWidth = iMax;
  714. for( var i=0; i<aBtnsLen; i++ )
  715. {
  716. arr_oButtons[i].style.width = iMaxBtnWidth;
  717. }
  718. }
  719. function MatchSize()
  720. {
  721. if( "block" == eMain.currentStyle.display )
  722. {
  723. if( eNo.checked == false && eYes.checked == false )
  724. {
  725. eNext.disabled = true;
  726. }
  727. ResizeButtons( [eBack_D,eNext,eCancel] );
  728. }
  729. else if( "block" == eConnectionUI.currentStyle.display )
  730. {
  731. if( eNoConn.checked == false && eYesConn.checked == false )
  732. {
  733. eConnNext.disabled = true;
  734. }
  735. ResizeButtons( [eConnBack,eConnNext,eConnCancel] );
  736. }
  737. }
  738. function NavigateTo_FullView( sURL )
  739. {
  740. ASSERT( 'g_oWShell.Run( "' + sURL + '" )' );
  741. }
  742. function ShowDataFileError()
  743. {
  744. eMain.style.display = "none";
  745. eConnectionUI.style.display = "none";
  746. eBtnNav1.style.display = "none";
  747. eBtnNav2.style.display = "none";
  748. eBtnNav3.style.display = "block";
  749. eBack.disabled = true;
  750. h3Default.style.display = "block";
  751. eDataFileError.style.display = "block";
  752. }
  753. function SetExpirationDate( iDaysFromNow )
  754. {
  755. var oDate = new Date();
  756. var vtDate = oDate.getVarDate();
  757. var iMin_Msec = 1000 * 60;
  758. var iHr_Msec = iMin_Msec * 60;
  759. var iDy_Msec = iHr_Msec * 24;
  760. var iCurrent_Msec = Date.parse( vtDate );
  761. var iExp_Msec = iCurrent_Msec + ( iDaysFromNow * iDy_Msec );
  762. var oExpDate = new Date( iExp_Msec );
  763. var vtExpDate = oExpDate.getVarDate();
  764. return vtExpDate;
  765. }
  766. function GetIPAdresses()
  767. {
  768. var sIPs = "";
  769. try
  770. {
  771. sIPs = pchealth.Connectivity.IPAddresses;
  772. }
  773. catch( e )
  774. {
  775. try
  776. {
  777. var oSetting = new ActiveXObject( "rcbdyctl.Setting" );
  778. sIPs = oSetting.GetIPAddress;
  779. }
  780. catch( e )
  781. {
  782. }
  783. }
  784. finally
  785. {
  786. return sIPs;
  787. }
  788. }
  789. function DetectReadyState()
  790. {
  791. try
  792. {
  793. var eResWinDoc = document.frames["eResWindow"].document;
  794. if( "complete" == eResWinDoc.readyState )
  795. {
  796. h3Searching.style.display = "none";
  797. }
  798. }
  799. catch( e )
  800. {
  801. h3Searching.style.display = "none";
  802. }
  803. }
  804. /*** End Misc ***/
  805. /*** Event Handlers ***/
  806. function window::onresize()
  807. {
  808. if( "block" == eResContainer.currentStyle.display )
  809. {
  810. ASSERT( "Resize()" );
  811. }
  812. }
  813. function window::onload()
  814. {
  815. if( -1 != g_sThisHREF.indexOf( "saved=true" ) )
  816. {
  817. g_bSend = true;
  818. g_bConnect = true;
  819. g_bFromSavedFav = true;
  820. if( -1 != g_sThisHREF.indexOf( "eDrvIDs=" ) )
  821. {
  822. g_bFav_UploadSuccess = true;
  823. }
  824. ASSERT( "g_bFromConnectUI=false;Send()" );
  825. }
  826. else
  827. {
  828. eNo.checked = false;
  829. eYes.checked = false;
  830. eBtnNav1.style.display = "block";
  831. ASSERT( "MatchSize()" );
  832. }
  833. if( false == g_bValidXMLFile )
  834. {
  835. eDataLnk.disabled = true;
  836. eDataLnk.style.cursor = "default";
  837. eDataLnk.onclick = new Function( "return false" );
  838. }
  839. }
  840. function window::onunload()
  841. {
  842. var oFav = pchealth.UserSettings.Favorites;
  843. var sThisURL = g_sThisHREF;
  844. var oDate = new Date();
  845. var sDate = oDate.toLocaleDateString();
  846. var sFavTitle = document.title + " -- " + sDate;
  847. var sThisURL_New = sThisURL + "&saved=true";
  848. var sThisURL_Exists = sThisURL.replace( /file:\/\/.*/i,"saved=true" );
  849. sThisURL_Exists = sThisURL_Exists + "&eDrvIDs=" + g_sDrvIDs;
  850. var sFile = GetFilePathFromURL( g_sThisHREF );
  851. var oFSO = new ActiveXObject( "Scripting.FileSystemObject" );
  852. try
  853. {
  854. if( true == g_bValidXMLFile )
  855. {
  856. oFSO.DeleteFile( sFile );
  857. }
  858. }
  859. catch( e ){ }
  860. if( true == g_bSend )
  861. {
  862. if( true == g_bSaveFavorite )
  863. {
  864. for(var oEnumFavs = new Enumerator( oFav ); !oEnumFavs.atEnd(); oEnumFavs.moveNext() )
  865. {
  866. var oThisFav = oEnumFavs.item();
  867. if( sThisURL == oThisFav.URL || sThisURL_New == oThisFav.URL || sThisURL_Exists == oThisFav.URL )
  868. {
  869. oFav.Delete( oThisFav );
  870. break;
  871. }
  872. }
  873. oFav.Add( sThisURL_Exists, sFavTitle );
  874. }
  875. }
  876. }
  877. /*** End Event Handlers ***/
  878. </script>
  879. </head>
  880. <body scroll="no" bgcolor="#ffffff" text="#000000" topmargin="0" leftmargin="10" oncontextmenu="return false;">
  881. <div id="eAccess" style="height:90%;overflow:auto;">
  882. <h3 id="h3Default">Get Help with Your Hardware Device</h3>
  883. <h3 id="h3Searching" class="clsHidden">Searching for device information...<br /><img id="eConnImg" src="hcp://system/images/progbar.gif" border="no" /></h3>
  884. <div id="eConnecting" class="clsHidden" style="position:absolute;top:expression((document.body.offsetHeight - eConnectingH3.offsetHeight)/2);left:expression((document.body.offsetWidth - eConnectingH3.offsetWidth)/2);">
  885. <h3 id="eConnectingH3">Checking your Internet connection...<br /><img id="eConnImg" src="hcp://system/images/progbar.gif" border="no" /></h3>
  886. </div>
  887. <div id="eResContainer">
  888. <iframe id="eResWindow" src="" frameborder="0" width="1" height="1" application="yes" onreadystatechange="ASSERT( 'DetectReadyState()' );"></iframe>
  889. </div>
  890. <div id="eNoConnect" class="clsHidden">
  891. <br />
  892. <b style="color:red;">Internet connection could not be established</b>
  893. <br />
  894. <br />
  895. There was a problem in connecting to the Internet. Click the <b>Back</b> button, and try to connect again.
  896. <br />
  897. <br />
  898. <a href="javascript:ASSERT( 'HSS_NavigateToTS()' );" id="eNoConnectLnk">Get troubleshooting tips on connecting</a>
  899. <br />
  900. <br />
  901. </div>
  902. <div id="eDataFileError" class="clsHidden">
  903. <b style="color:red;">Unable to continue the hardware information upload process</b>
  904. <br />
  905. <br />
  906. A problem has occurred with your hardware information file and we are unable to process it.
  907. This process cannot continue without this information. If you wish to complete this process,
  908. you will need to try installing the device again by accessing the Add New Hardware wizard.
  909. <br />
  910. <br />
  911. <a href="javascript:ASSERT( 'LaunchCPL_HW()' );">Start the Add New Hardware wizard.</a>
  912. </br>
  913. </div>
  914. <div id="tblCancel" class="clsHidden">
  915. <div id="tdNoRecord" class="clsHidden">
  916. You chose not to allow Microsoft to record your hardware information.
  917. <br />
  918. <br />
  919. </div>
  920. <div id="tdDelayUpload" class="clsContent">
  921. Your hardware information will be sent automatically the next time you connect to the Internet.
  922. <br />
  923. <br />
  924. </div>
  925. <div id="eTDContactMan" class="clsContent">
  926. You may want to contact the manufacturer and ask them to provide a driver for this hardware device.
  927. <br />
  928. <br />
  929. </div>
  930. </div>
  931. <div id="tblResources" class="clsHidden">
  932. <div id="tdThanks" class="clsContent">
  933. Thank you for submitting your missing driver information to Microsoft.
  934. </div>
  935. <div id="tdResources" class="clsContent">
  936. You may find the following resources helpful:
  937. </div>
  938. <div class="clsContent">
  939. <ul id="eUL1">
  940. <li id="Content_LI1" style="padding-bottom:10px;">
  941. <a href="javascript:NavigateTo_FullView( 'hcp://system/compatctr/CompatOffline.htm' );">Compatibility Center</a> - Find out
  942. which hardware and software are compatible with the Windows Server 2003 family and related Windows products.
  943. </li>
  944. <li id="Content_LI2" style="padding-bottom:10px;">
  945. <a href="javascript:NavigateTo_FullView( 'hcp://system/sysinfo/sysinfomain.htm' );">My Computer Information</a> - Read
  946. information about hardware and software that your computer currently has installed.
  947. </li>
  948. <li id="Content_LI3">
  949. <a href="javascript:void(0);" onclick="ASSERT( 'AddFavorite( true )' );" id="lnkAddFav">Save this page to your Help Center Favorites list</a> -
  950. You can submit your hardware information again and get manufacturer feedback.
  951. </li>
  952. </ul>
  953. <br />
  954. </div>
  955. </div>
  956. <div id="eMain">
  957. <div id="eMainContent">
  958. <div id="eTDMainContent" class="clsContent">
  959. The wizard was unable to find the necessary software for your new hardware.
  960. <br />
  961. <br />
  962. Help and Support Center can now record your hardware profile to assist with future support.
  963. This is done automatically by reading the identification number that the manufacturer
  964. has encoded in your hardware. If you want, you can see the contents of <a id="eDataLnk" href="javascript:ASSERT( 'ShowPopUp( \'xml\' )' );">the file that contains this information</a>.
  965. This information will remain confidential--see Microsoft's <a id="ePrivLnk" href="javascript:ASSERT( 'ShowPopUp()' );">privacy policy</a>. Using this
  966. information, Microsoft can query for any available details on the hardware manufacturer's Web site.
  967. <br />
  968. <br />
  969. <div id="eConfirm" cellpadding="0" cellspacing="0" style="margin:10px 20px 10px 20px;vertical-align:abstop;">
  970. <input type="radio" name="eRad" id="eYes" onclick="ASSERT( 'SetUploadState( true )' );"><label id="eLblYes" for="eYes">Yes, record my hardware profile.</label>
  971. <br />
  972. <input type="radio" name="eRad" id="eNo" onclick="ASSERT( 'SetUploadState( false )' );"><label id="eLblNo" for="eNo">No, I prefer not to participate.</label>
  973. </div>
  974. </div>
  975. <div id="eMainList" class="clsContent">
  976. This information will help us provide:
  977. <ul id="eUL2">
  978. <li id="Content_LI4">
  979. Improved manufacturer support for new hardware installations in
  980. future versions of Windows.
  981. </li>
  982. <li id="Content_LI5">
  983. More supporting software for you to download from Microsoft Web
  984. sites.
  985. </li>
  986. <li id="Content_LI6">
  987. Links to other Internet sites that carry software or support information
  988. for your new hardware.
  989. </li>
  990. </ul>
  991. </div>
  992. <div id="eCancelDesc" class="clsContent">
  993. Click <b>Cancel</b> to end the wizard. You may want to contact the manufacturer
  994. and ask them to provide a driver(software) for this hardware device.
  995. </div>
  996. </div>
  997. </div>
  998. <div id="eConnectionUI" class="clsHidden">
  999. <div id="eConnConntent" class="clsContent">
  1000. To submit your hardware information now and receive the latest manufacturer information back, please connect to the Internet. Or, if you want,
  1001. your hardware information can be submitted automatically the next time you connect to the Internet, but you won't receive the latest information in return.
  1002. <br />
  1003. <br />
  1004. If you choose to save this page to your Help and Support Center Favorites list, then you can access this page again to submit your hardware information
  1005. and get manufacturer feedback.
  1006. <br />
  1007. <br />
  1008. <div id="eConfirmConn" cellpadding="0" cellspacing="0" style="margin:0px 20px 0px 20px;">
  1009. <input type="radio" name="eRadConn" id="eYesConn" onclick="ASSERT( 'SetConnState( true )' );"><label id="eLblYesConn" for="eYesConn">Attempt to connect to the Internet now</label>
  1010. <br />
  1011. <input type="radio" name="eRadConn" id="eNoConn" onclick="ASSERT( 'SetConnState( false )' );"><label id="eLblNoConn" for="eNoConn">Send my hardware information the next time I connect</label>
  1012. </div>
  1013. <br />
  1014. <input type="checkbox" id="eChkSaveQuery" onclick="if(this.checked) ASSERT( 'AddFavorite( false )' );"><label id="eLblSaveQuery" for="eChkSaveQuery">Save this page to my Help and Support Center Favorites list</label>
  1015. </div>
  1016. </div>
  1017. </div>
  1018. <div id="eBtnNav1" class="clsNavTable clsHidden" cellpadding="0" cellspacing="0" align="right" style="margin:0px">
  1019. <button id="eBack_D" disabled>&lt;&nbsp;Back</button>
  1020. <button id="eNext" onclick="ASSERT( 'g_bFromConnectUI=false;Send()' );">Next&nbsp;&gt;</button>
  1021. <button id="eCancel" onclick="ASSERT( 'g_bFromConnectUI=false;Cancel()' );">Cancel</button>
  1022. </div>
  1023. <div id="eBtnNav2" class="clsNavTable clsHidden" cellpadding="0" cellspacing="0" align="right" style="margin:0px">
  1024. <button id="eConnBack" onclick="g_bFromConnectUI=false;ASSERT( 'Back()' );">&lt;&nbsp;Back</button>
  1025. <button id="eConnNext" onclick="ASSERT( 'g_bFromConnectUI=true;Send()' );">Next&nbsp;&gt;</button>
  1026. <button id="eConnCancel" onclick="ASSERT( 'Cancel()' );">Cancel</button>
  1027. </div>
  1028. <div id="eBtnNav3" class="clsNavTable clsHidden" align="right" style="margin:5px 0px 0px 0px;">
  1029. <button id="eBack" onclick="ASSERT( 'Back()' );">&lt;&nbsp;Back</button>
  1030. <button id="eNext_D" disabled>Next&nbsp;&gt;</button>
  1031. <button id="eFinish" onclick="ASSERT( 'pchealth.close()' );">Finish</button>
  1032. </div>
  1033. </body>
  1034. </html>