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.

501 lines
19 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. <link id="no_loc_css" rel="stylesheet" type="text/css" href="hcp://system/css/shared.css" />
  8. <script type="text/jscript" src="hcp://system/scripts/Common.js"></script>
  9. <script type="text/jscript" defer>
  10. /*** Global Vars ***/
  11. var g_bDebugMode = false;
  12. if( false == g_bDebugMode )
  13. {
  14. window.onerror = new Function( "return true" );
  15. }
  16. var g_oLearnDlg = null;
  17. var g_bOnload = true;
  18. var g_sTargetURL = "";
  19. var g_sTopicTitle = "";
  20. var g_sTopicIntroBlurb = "";
  21. var g_sCustomOfflineURL = "";
  22. var g_bTOC = false;
  23. var g_sSearch = location.search.replace( "?", "" );
  24. var g_aParams = g_sSearch.split( "&" );
  25. var g_oWShell = new ActiveXObject( "WScript.Shell" );
  26. var g_bNonRASConnectoid = false;
  27. var g_bRanRasPhone = false;
  28. var g_sConnTestURL = "http://go.microsoft.com/fwlink/1ptrans.gif";
  29. var g_iUrlIndex = 0;
  30. /*** Localization Vars ***/
  31. //Detection-specific: Do not modify.
  32. 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 Connect again.\n\nIf you know you have an existing connection that is already open, click No, and then click Connect again.";
  33. var L_TryAgain_Text = "Try Again";
  34. var L_ConnFailDesc_Text = "There was a problem in connecting to the Internet. To attempt to connect again, click Try Again.";
  35. var L_GetTSTipsLnk_Text = "Show me networking troubleshooters";
  36. var L_ConnectionDesc_Text = "To view this page, you must be connected to the Internet. To connect to the Internet now, click <b>Connect</b>.";
  37. var L_ConnectBtn_Text = "Connect";
  38. var L_Connecting_Text = "Connecting...";
  39. var L_CheckingConn_Text = "Checking your Internet connection...";
  40. var L_ConnectionRequired_Text = "Internet Connection is Required";
  41. var L_LearnMoreLnk_Text = "Tell me more about connecting to the Internet";
  42. var L_ConnFailed_Text = "Internet Connection Could Not Be Established";
  43. var L_AdminErrorHeader_Text = "Administrative Permissions Required";
  44. var L_AboutWU_Text = "Tell me more about Windows Update";
  45. var L_AboutCompat_Text = "Tell me more about Compatible Hardware and Software";
  46. var L_AdminErrorDesc_Text = "To install items from Windows Update, you must be logged on as an administrator or a member of the Administrators group. If your computer is connected to a network, network policy settings must allow you to complete this procedure.";
  47. var L_AdminErrorInstr_Text = "To gain access to Windows Update:";
  48. var L_AdminErrorLI1_Text = "Close Help and Support Center.";
  49. var L_AdminErrorLI2_Text = "Log off of from your computer.";
  50. var L_AdminErrorLI3_Text = "Log on to your computer as an administrator or member of the Administrators group.";
  51. var L_AdminErrorLI4_Text = "Open Help and Support Center.";
  52. var L_AdminErrorLI5_Text = "Open Windows Update.";
  53. var L_OfflineResource_Text = "Offline support options and information";
  54. var L_FeedbackDesc_Text = "Let us know how we can improve Microsoft products. Send your thoughts, comments, and suggestions using our online feedback form.";
  55. /*** Error Handling Code ***/
  56. function ASSERT( sObj )
  57. {
  58. try
  59. {
  60. eval( sObj );
  61. }
  62. catch( e )
  63. {
  64. if( true == g_bDebugMode )
  65. {
  66. alert( "Error running: " + sObj + " -> " + e.description );
  67. }
  68. }
  69. }
  70. /*** Wizard Launchers/HSS Help ***/
  71. function OpenConnWizard()
  72. {
  73. try
  74. {
  75. var sShellCmd_NCW = "rundll32 netshell.dll,StartNCW 0";
  76. g_oWShell.Run( sShellCmd_NCW );
  77. }
  78. catch( e ){}
  79. }
  80. function OpenConnManager()
  81. {
  82. try
  83. {
  84. g_bRanRasPhone = true;
  85. g_oWShell.Run( "rasphone.exe" );
  86. }
  87. catch( e )
  88. {
  89. g_bRanRasPhone = false;
  90. setTimeout( "ASSERT( 'ShowConnFailed()' );", 100 )
  91. }
  92. }
  93. function HSS_NavigateToTS()
  94. {
  95. var oFSO = new ActiveXObject( "Scripting.FileSystemObject" );
  96. var sWinDir = oFSO.GetSpecialFolder(0);
  97. if( true == pchealth.UserSettings.IsDesktopVersion )
  98. {
  99. location.href = "hcp://services/subsite?node=TopLevelBucket_4/Fixing_a_problem&select=TopLevelBucket_4/Fixing_a_problem/Home_Networking_and_network_problems";
  100. }
  101. else
  102. {
  103. location.href = "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";
  104. }
  105. }
  106. function ShowLearnMore( sURL )
  107. {
  108. if( null == g_oLearnDlg )
  109. {
  110. g_oLearnDlg = window.showModelessDialog( sURL, window, "help:no;status:no;resizable:no;dialogWidth:385px;dialogHeight:440px" );
  111. }
  112. }
  113. /*** Core Connection Detection ***/
  114. function oConnCheck_onCheckDone( cn, lStatus, hr, url, vCtx )
  115. {
  116. if( 4 == lStatus )
  117. {
  118. eCheckConn.style.display = "none";
  119. eConnecting.style.display = "block";
  120. if( 2 == g_iUrlIndex || -1 != g_sTargetURL.indexOf( "hcp://" ) )
  121. {
  122. ASSERT( "OpenURL( true )" );
  123. }
  124. else
  125. {
  126. ASSERT( "OpenURL( false )" );
  127. g_iUrlIndex++;
  128. }
  129. }
  130. else
  131. {
  132. if( 0 == g_iUrlIndex )
  133. {
  134. eConnecting.style.display = "none";
  135. setTimeout( "ASSERT( 'ShowConnFailed()' );", 100 );
  136. }
  137. else
  138. {
  139. eConnecting.style.display = "none";
  140. ASSERT( 'CreateNavErrorUI( tblContent.cells[0], "hcp://system/errors/unreachable.htm" )' );
  141. }
  142. }
  143. }
  144. function InitConn()
  145. {
  146. var bHasConnectoid = pchealth.Connectivity.HasConnectoid;
  147. var bAutoDialEnabled = pchealth.Connectivity.AutoDialEnabled;
  148. BuildConnectionUI();
  149. ChangeView( true );
  150. if( true == bHasConnectoid )
  151. {
  152. if( true == bAutoDialEnabled || true == g_bRanRasPhone )
  153. {
  154. try
  155. {
  156. pchealth.Connectivity.AutoDial( false );
  157. ASSERT( "OpenURL( false )" );
  158. }
  159. catch( e )
  160. {
  161. setTimeout( "ShowConnFailed();", 200 );
  162. }
  163. }
  164. else
  165. {
  166. ChangeView( false );
  167. OpenConnManager();
  168. }
  169. }
  170. else
  171. {
  172. ChangeView( false );
  173. ShowMessage( L_LaunchNCW_Message );
  174. }
  175. }
  176. function CreateConnCheck( sConnTestURL )
  177. {
  178. sConnTestURL = unescape( sConnTestURL );
  179. if( sConnTestURL == ValidateURL(sConnTestURL) )
  180. {
  181. var oPCH_ConnCheck = pchealth.Connectivity.CreateObject_ConnectionCheck();
  182. oPCH_ConnCheck.onCheckDone = oConnCheck_onCheckDone;
  183. oPCH_ConnCheck.StartUrlCheck( sConnTestURL, 0 );
  184. }
  185. else
  186. {
  187. location.href = "hcp://system/errors/badurl.htm";
  188. }
  189. }
  190. function OpenURL( bServerStatusOK )
  191. {
  192. tblBody.style.display = "block";
  193. eContainer.style.display = "none";
  194. eHeaderText.style.display = "none";
  195. eHiddenMain.style.display = "block";
  196. if( false == bServerStatusOK )
  197. {
  198. if( 0 == g_iUrlIndex )
  199. {
  200. ASSERT( "setTimeout( 'CreateConnCheck( \"" + g_sConnTestURL + "\" )', 100 )" );
  201. }
  202. else
  203. {
  204. ASSERT( "setTimeout( 'CreateConnCheck( \"" + escape(g_sTargetURL) + "\" )', 100 )" );
  205. }
  206. }
  207. else if( true == bServerStatusOK )
  208. {
  209. pchealth.HelpSession.EraseNavigation();
  210. location.href = ValidateURL(g_sTargetURL);
  211. }
  212. else
  213. {
  214. eConnecting.style.display = "none";
  215. setTimeout( "ShowConnFailed();", 200 );
  216. }
  217. }
  218. function InternetConnect()
  219. {
  220. var bLAN = pchealth.Connectivity.IsALan;
  221. var sIPs = GetIPAdresses();
  222. BuildConnectionUI();
  223. if( ( true == bLAN || true == g_bNonRASConnectoid ) && ( "" != sIPs && "0.0.0.0" != sIPs ) )
  224. {
  225. ASSERT( "ChangeView( true );OpenURL( false )" );
  226. }
  227. else
  228. {
  229. if( "" != sIPs && "0.0.0.0" != sIPs )
  230. {
  231. if( pchealth.Connectivity.DestinationReachable( g_sConnTestURL ) )
  232. {
  233. ASSERT( "ChangeView( true );OpenURL( false )" );
  234. }
  235. else
  236. {
  237. if( true != g_bOnload )
  238. {
  239. ASSERT( "InitConn()" );
  240. }
  241. }
  242. return;
  243. }
  244. if( true == g_bOnload )
  245. {
  246. tblBody.style.display = "block";
  247. }
  248. else
  249. {
  250. ASSERT( "InitConn()" );
  251. }
  252. }
  253. }
  254. function GetIPAdresses()
  255. {
  256. var sIPs = "";
  257. try
  258. {
  259. sIPs = pchealth.Connectivity.IPAddresses;
  260. }
  261. catch( e )
  262. {
  263. try
  264. {
  265. var oSetting = new ActiveXObject( "rcbdyctl.Setting" );
  266. sIPs = oSetting.GetIPAddress;
  267. }
  268. catch( e )
  269. {
  270. }
  271. }
  272. finally
  273. {
  274. return sIPs;
  275. }
  276. }
  277. function CreateNavErrorUI( oElem, sErrorUrl )
  278. {
  279. var sErrorIframe = "<iframe id='eErrorIframe' frameborder='0' style='width:85%;'></iframe>";
  280. oElem.innerHTML = sErrorIframe;
  281. if( "object" == typeof(eErrorIframe) )
  282. {
  283. pchealth.HelpSession.EraseNavigation();
  284. eErrorIframe.location.href = sErrorUrl;
  285. setTimeout( "UpdateContents( eErrorIframe.document.body )", 50 );
  286. }
  287. }
  288. function UpdateContents( oElem )
  289. {
  290. oElem.insertAdjacentHTML( 'beforeEnd', '<br /><table><tr><td width="100%"></td><td><button id="btnConnect" class="sys-font-body" onclick="parent.g_bOnload=false;parent.InternetConnect();">' + L_TryAgain_Text + '</button></td></tr></table>' );
  291. }
  292. /*** UI ***/
  293. function ShowConnFailed()
  294. {
  295. document.body.scroll = "yes";
  296. if( false == g_bOnload )
  297. {
  298. if( "" != g_sCustomOfflineURL )
  299. {
  300. //Navigate to custom offline page.
  301. pchealth.HelpSession.EraseNavigation();
  302. location.href = ValidateURL(g_sCustomOfflineURL);
  303. return;
  304. }
  305. //else show try again UI...
  306. BuildConnectionUI();
  307. tblBody.style.display = "block";
  308. if( -1 == eContentInfo.innerHTML.indexOf( eNoConnect.innerHTML ) )
  309. {
  310. eContentInfo.innerHTML = eNoConnect.innerHTML;
  311. }
  312. btnConnect.innerText = L_TryAgain_Text;
  313. }
  314. eContainer.style.display = "block";
  315. eHeaderText.style.display = "block";
  316. eHiddenMain.style.display = "none";
  317. eCheckConn.style.display = "none";
  318. }
  319. function ChangeView( bInitConnPass )
  320. {
  321. if( true == bInitConnPass )
  322. {
  323. document.body.scroll = "no";
  324. eCheckConn.style.display = "block";
  325. tblBody.style.display = "block";
  326. eContainer.style.display = "none";
  327. eHeaderText.style.display = "none";
  328. eHiddenMain.style.display = "block";
  329. }
  330. else
  331. {
  332. document.body.scroll = "yes";
  333. eCheckConn.style.display = "none";
  334. tblBody.style.display = "block";
  335. eContainer.style.display = "block";
  336. eHeaderText.style.display = "block";
  337. eHiddenMain.style.display = "none";
  338. }
  339. }
  340. function BuildConnectionUI()
  341. {
  342. var sHTML_TOC = "";
  343. if( true == g_bTOC )
  344. {
  345. sHTML_TOC = '<td id="eToc" class="sys-lhp-bgcolor" style="width:235px;padding-top:7px;border-left:2px solid #2459C3;border-right:2px solid #6375D6;" valign="top"><table cellspacing="11"><tbody>' +
  346. '<tr><td style="height:100%;"><table cellspacing="0" cellpadding="5" class="sys-toppane-bgcolor sys-toppane-color-border" width="100%">' +
  347. '<tbody><tr><td class="sys-toppane-header-bgcolor sys-font-body-bold sys-toppane-header-color toppane-header" style="padding-left:12px;padding-right:12px;"><b>' + g_sTopicTitle + '</b></td></tr>' +
  348. '<tr><td style="height:100%;border:2px solid #6375D6"><div class="sys-font-body toppane-body" style="overflow-y:auto;height:expression( document.body.offsetHeight - 100 );width:217px;"></div><br /></tbody></table></td></tr></tbody></table></td>';
  349. }
  350. var sAboutLink = "";
  351. if( -1 != g_sTargetURL.indexOf( "=updatecenter" ) )
  352. {
  353. sAboutLink = "<a class='sys-link-normal' href='javascript:ShowLearnMore( \"hcp://system/updatectr/LearnWU.htm\" )'>" + L_AboutWU_Text + "</a><br />";
  354. }
  355. else if( -1 != g_sTargetURL.indexOf( "=compatcenter" ) )
  356. {
  357. sAboutLink = "<a class='sys-link-normal' href='javascript:ShowLearnMore( \"hcp://system/compatctr/LearnCompat.htm\" )'>" + L_AboutCompat_Text + "</a><br />";
  358. }
  359. var sOfflineLink = "";
  360. if( "" != g_sCustomOfflineURL )
  361. {
  362. sOfflineLink = '<br /><br /><img src="hcp://system/images/centers/blue_arrow.gif" style="vertical-align:middle;"><a href="' + g_sCustomOfflineURL + '" class="sys-link-normal" style="margin-right:5px;margin-left:5px;">' + L_OfflineResource_Text + '</a>';
  363. }
  364. var sHTML = '<table id="tblBody" cellpadding="0" cellspacing="0" border="0" width="100%" height="100%"><tr>' + sHTML_TOC +
  365. '<td valign="top"><table id="tblContent" cellpadding="0" cellspacing="0" border="0" bgcolor="#FFFFFF" width="100%"><tr><td><br />' +
  366. '<div id="eConnecting" style="display:none;">&nbsp;<span id="eConnText" class="sys-font-heading3 sys-rhp-color-title sys-rhp-font-title">' + L_Connecting_Text + ' </span></div>' +
  367. '<div id="eCheckConn" style="display:none;">&nbsp;<span id="eCheckConnText" class="sys-font-heading3 sys-rhp-color-title sys-rhp-font-title">' + L_CheckingConn_Text + '</span>' +
  368. '</div><div id="eHiddenMain" style="display:none;">&nbsp;</div><div id="eContainer"><div id="eHeader">' +
  369. '<div id="eContent" class="sys-inlineform-bgcolor1"><table cellpadding="0" cellspacing="0" border="0"><tr><td valign="center">' +
  370. '<img id="eImgConnect" src="hcp://system/images/centers/connect.gif" height="32" width="32" /></td>' +
  371. '<td id="eTDHeaderTitle" valign="center" style="padding-left:10px;padding-right:10px;"><span id="eHeaderTitle" class="sys-font-heading3 sys-rhp-color-title sys-rhp-font-title">' + L_ConnectionRequired_Text + '</span></td></tr></table>' +
  372. '<div id="eContentInfo" class="sys-font-body" style="margin-right:42px;margin-left:42px;">' + L_ConnectionDesc_Text +
  373. '<br /><br /><a class="sys-link-normal" id="eLearnLnk" href="javascript:ShowLearnMore( \'hcp://system/updatectr/LearnInternet.htm\');" style="margin-left:3px;margin-right:3px;">' + L_LearnMoreLnk_Text + '</a><br /></div>' +
  374. '<table id="eTblConnect" align="right" cellpadding="0" cellspacing="0" border="0"><tr>' +
  375. '<td id="eTDConnectBtn" align="right"><button id="btnConnect" onclick="g_bOnload=false;InternetConnect();">' + L_ConnectBtn_Text +
  376. '</button></td></tr></table></div></div></td></tr></table><div id="eHeaderText" class="sys-font-body" style="margin-left:15px;margin-right:15px;;">' +
  377. g_sTopicIntroBlurb + '<br /><br />' + sAboutLink + sOfflineLink + '</td></tr></table></div>' +
  378. '<div id="eNoConnect" style="display:none;" class="sys-font-body"><br />' +
  379. '<b>' + L_ConnFailed_Text + '</b><br /><br />' + L_ConnFailDesc_Text + '<br /><br />' +
  380. '<a href="javascript:HSS_NavigateToTS();" class="sys-link-normal">' + L_GetTSTipsLnk_Text + '</a><br /></div>' +
  381. '<div id="eAdminError" style="display:none;"><b>' + L_AdminErrorHeader_Text + '</b><br /><br />' +
  382. L_AdminErrorDesc_Text + '<br /><br />' + L_AdminErrorInstr_Text + '<br /><br /><ol id="eLogOffOL">' +
  383. '<li id="eLogOffLI1">' + L_AdminErrorLI1_Text + '</li><li id="eLogOffLI2">' + L_AdminErrorLI2_Text + '</li><li id="eLogOffLI3">' + L_AdminErrorLI3_Text + '</li><li id="eLogOffLI4">' + L_AdminErrorLI4_Text + '</li><li id="eLogOffLI5">' + L_AdminErrorLI5_Text + '</li></ol></div>';
  384. document.body.innerHTML = sHTML;
  385. ASSERT( "ImplementStyles()" );
  386. }
  387. function ImplementStyles()
  388. {
  389. document.body.style.margin = "0px";
  390. document.body.style.backgroundColor = "#FFFFFF";
  391. tblBody.style.marginTop = "0px";
  392. tblBody.style.marginBottom = "0px";
  393. eContent.style.border = "1px solid #6681D9";
  394. eContent.style.marginTop = "20px";
  395. eContent.style.padding = "15px 15px 35px 15px";
  396. eHeaderTitle.style.fontSize = "95%";
  397. eHeader.style.margin = "0px 15px 30px 15px";
  398. btnConnect.style.font = "messagebox";
  399. btnConnect.style.paddingLeft = "10px";
  400. btnConnect.style.paddingRight = "10px";
  401. eCheckConn.style.margin = "22px 20px 0px 20px";
  402. eConnecting.style.margin = "22px 20px 0px 20px";
  403. }
  404. /*** Messages ***/
  405. function ShowMessage( sMessage )
  406. {
  407. var sButtonType = "YESNOCANCEL";
  408. var sRetVal = pchealth.MessageBox( sMessage, sButtonType );
  409. if( "YES" == sRetVal )
  410. {
  411. eNoConnect.style.display = "none";
  412. OpenConnWizard();
  413. }
  414. else if( "NO" == sRetVal )
  415. {
  416. g_bNonRASConnectoid = true;
  417. }
  418. }
  419. function window::onload()
  420. {
  421. var bContext_Subsite = pchealth.UI_Context.visible;
  422. var oPCH_TxtHlp = pchealth.TextHelpers;
  423. var oParsedURL = oPCH_TxtHlp.ParseURL( location.href );
  424. g_sTargetURL = oParsedURL.GetQueryParameter( "online_url" );
  425. g_sTopicTitle = oParsedURL.GetQueryParameter( "topic_title" );
  426. g_sTopicIntroBlurb = oParsedURL.GetQueryParameter( "topic_intro" );
  427. g_sCustomOfflineURL = oParsedURL.GetQueryParameter( "offline_url" );
  428. if(g_sTargetURL == "feedback")
  429. {
  430. g_sTargetURL = "http://go.microsoft.com/fwlink/?LinkId=3514&mode=feedback&lcid=" + pchealth.UserSettings.CurrentSKU.Language;
  431. g_sTopicTitle = "";
  432. g_sTopicIntroBlurb = L_FeedbackDesc_Text;
  433. g_sCustomOfflineURL = "";
  434. ASSERT( "pchealth.UI_NavBar.content.parentWindow.external.places.transitionTo( 'FullWindow' )" );
  435. }
  436. if( -1 != g_sTargetURL.indexOf( "=updatecenter" ) )
  437. {
  438. if( false == pchealth.UserSettings.IsAdmin )
  439. {
  440. BuildConnectionUI();
  441. tblBody.style.display = "block";
  442. eContent.innerHTML = eAdminError.innerHTML;
  443. return;
  444. }
  445. }
  446. if( false == bContext_Subsite )
  447. {
  448. g_bTOC = true;
  449. }
  450. if( -1 != g_sTargetURL.indexOf( "=updatecenter" ) || -1 != g_sTargetURL.indexOf( "=compatcenter" ) || -1 != g_sTargetURL.indexOf( "=errmsg" ) )
  451. {
  452. g_bTOC = true;
  453. ASSERT( "pchealth.UI_NavBar.content.parentWindow.external.places.transitionTo( 'FullWindow' )" );
  454. }
  455. ASSERT( "InternetConnect()" );
  456. }
  457. </script>
  458. </head>
  459. <body></body>
  460. </html>