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.

2342 lines
81 KiB

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML>
  3. <HEAD>
  4. <OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
  5. <TITLE>Start Application in Compatibility Mode</TITLE>
  6. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=windows-1252">
  7. <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))'>
  8. <META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
  9. <META content=en-us http-equiv=Content-Language>
  10. <LINK ID=Stylesheet_Ref0 href="hcp://system/css/shared.css" rel=STYLESHEET type=text/css>
  11. <LINK ID=Stylesheet_Ref1 href="hcp://system/css/Behaviors.css" rel=STYLESHEET type=text/css>
  12. <LINK ID=Stylesheet_Ref2 href="hcp://system/css/Layout.css" rel=STYLESHEET type=text/css>
  13. <SCRIPT language="javascript">
  14. <!--
  15. var g_sApplicationLocation; // folder where the app is to be found
  16. var g_sApplicationDisplayName; // display (friendly) name for an application
  17. var g_sApplication; // application to run(full path)
  18. var g_sPersistPath; // persist path for this item
  19. var g_sCompatLayer; // layer to run (string)
  20. var g_sCompatLayerMachine; // layer to run for the whole machine
  21. var g_sLayerDescription;
  22. var g_sCmdLine;
  23. var g_nPage = 0; // current page
  24. var g_nPages = 11;
  25. var g_nStartPage = 0;
  26. var g_rgPages = new Array(g_nPages);
  27. var g_shell = new ActiveXObject("Wscript.Shell");
  28. var g_fso = new ActiveXObject("Scripting.FileSystemObject");
  29. var g_bProgramsPopulated = false;
  30. var g_bAppBrowseProgsInitialized = false;
  31. var g_bProgListSelect = false;
  32. var g_util = new ActiveXObject("CompatUI.Util");
  33. var g_ProgramSelectMethod; // will be
  34. var g_upload = null; // global upload object
  35. var g_UnknownLayers; // unknown layers for the item
  36. var g_bSendReport; // controls whether we send the report or not
  37. var g_bUpdateLayers; // controls whether we set the layers permanently
  38. g_rgPages[0] = 'Intro';
  39. g_rgPages[1] = 'AppSelectMethod';
  40. g_rgPages[2] = 'AppProgramList';
  41. g_rgPages[3] = 'AppBrowseProgs';
  42. g_rgPages[4] = 'FixesLayers';
  43. g_rgPages[5] = 'FixesOther';
  44. g_rgPages[6] = 'FixesLUA';
  45. g_rgPages[7] = 'Run';
  46. g_rgPages[8] = 'Update';
  47. g_rgPages[9] = 'CompatibilityData';
  48. g_rgPages[10]= 'CompleteWizard';
  49. g_rgPages[11]= 'CompatWizardDisabled';
  50. var g_cIntroPage = 0;
  51. var g_cAppPage = 1;
  52. var g_cAppProgramListPage = 2;
  53. var g_cAppBrowseProgsPage = 3;
  54. var g_cFixesLayersPage = 4;
  55. var g_cFixesOtherPage = 5;
  56. var g_cFixesLUAPage = 6;
  57. var g_cRunPage = 7;
  58. var g_cUpdatePage = 8;
  59. var g_cCompatibilityDataPage = 9;
  60. var g_cCompleteWizardPage = 10;
  61. var g_cDisabledPage = 11;
  62. var g_cSelectFromList = 0;
  63. var g_cSelectRunFromCD = 1;
  64. var g_cSelectBrowse = 2;
  65. //////////////////////////////////////////////////////////////////////////////////////
  66. //
  67. // Localization
  68. //
  69. var L_strBtnBackCaption_Button = '&nbsp;&lt;&nbsp;<u>B</u>ack&nbsp;'; // this is the caption for Back button : ' < Back '
  70. var L_strBtnNextCaption_Button = '&nbsp;N<u>e</u>xt&nbsp;&gt;&nbsp;'; // this is the caption for Next button : ' Next > '
  71. var L_strBtnFinish_Button = '&nbsp;<u>F</u>inish&nbsp;'; // this is the caption for Finish button
  72. var L_strStopBtnCaption_Button = '&nbsp;Sto<u>p</u>&nbsp;';
  73. var L_strRefreshBtnCaption_Button = '&nbsp;<u>R</u>efresh&nbsp;';
  74. var L_strCancelBtnCaption_Button = '&nbsp;Cancel&nbsp;';
  75. var L_strAltCancelCaption_Button = '&nbsp;Cancel&nbsp;'; // text for the Cancel button
  76. var L_strBrowseBtnCaption_Button = 'Bro<u>w</u>se';
  77. var L_strPage2Accelerators_Text = 'RSPEB'; // Attention, localizers: this parameter should be localized and match accelerators on this page
  78. // R = Refresh S = Select P - stoP E - nExt B - Back -->
  79. // see page 2 below for Select, all the others have to match the buttons above
  80. var L_strPage3Accelerators_Text = 'YEB'; // Attention localizers: this parameter should be localized and match accelerators on this page
  81. // Y = tYpe E - nExt B - Back
  82. // except for the browse button
  83. var L_strCompatSettingsAdjusted_Text = 'You have successfully adjusted the compatibility settings for this program.';
  84. var L_strCompatSettingsNotAdjusted_Text= 'Compatibility settings were not changed for any programs.';
  85. var L_strBrowseFilter_Text = 'Program files (*.exe;*.com;*.pif;*.cmd;*.bat;*.lnk)|*.exe;*.com;*.pif;*.cmd;*.bat;*.lnk|All files (*.*)|*.*';
  86. var L_strBrowseCaption_DialogTitle = 'Please Select Application';
  87. var L_strBrowseProgsLabel_Text = 'T<U>y</U>pe the path to the program shortcut or executable file:';
  88. var L_rgExcludeFiles_FileName = new Array('%ProgramFiles%\\Windows NT\\hypertrm.exe',
  89. '%programfiles%\\msn\\msncorefiles\\msn6.exe',
  90. '%programfiles%\\messenger\\msmsgs.exe',
  91. '%SystemRoot%\\system32\\notepad.exe');
  92. var L_strCompatModeRemovableMedia_Text = '<b>Warning:</b> &nbsp;&nbsp; Compatibility mode cannot be set on this program. &nbsp; The selected program is on the network or a removable media device.';
  93. var L_strCompatModePartOfOS_Text = '<b>Warning:</b> &nbsp;&nbsp; Compatibility Mode cannot be set on this program. &nbsp; Selected program is part of the Operating System.';
  94. var L_strCompatModeNotExe_Text = '<b>Warning:</b> &nbsp;&nbsp; Compatibility Mode cannot be set on this object. &nbsp; Selected object is not a program executable file.';
  95. var L_strFileOnTheNet_Text = '<br>Warning: &nbsp;&nbsp; this file is on removable media or on the network';
  96. var L_strProgramWorked_Text = '<u>Y</u>es, this program worked correctly';
  97. var L_strProgramWorkedTitle_Text = 'Yes, this program worked correctly';
  98. var L_strSetPermanentLayers_Text = '<u>Y</u>es, set this program to always use these compatibility settings';
  99. var L_strSetPermanentLayersTitle_Text = 'Yes, set this program to always use these compatibility settings';
  100. var L_strNoCompatSettings_Text = 'No compatibility settings were selected.';
  101. var L_strRetryCD_Message = 'Wizard could not locate programs on your CD\nClick OK to retry, Cancel to try and locate the program manually';
  102. var L_strSpecifyValidApp_Message = 'Please specify a valid program';
  103. var L_strChooseProgram_Message = 'Please choose a program from the list';
  104. var L_strErrorUpdatingShortcut_ErrorMessage = 'Error Updating application shortcut for ';
  105. var L_strAppNotFound_ErrorMessage = 'Target Application Not Found!\n\nThe file path is invalid: ';
  106. var L_strEnsureExist_ErrorMessage = '\n\nEnsure that you have entered the full and correct path to the target application.\n';
  107. var L_strMustValid_ErrorMessage = 'The application path must point to a valid Program or Shortcut file.';
  108. var L_strErrorStartingApp_ErrorMessage = 'Error starting program:\n\n';
  109. var L_rgSetupPrograms_FileName = new Array(4); // this array contains the names of setup programs
  110. L_rgSetupPrograms_FileName[0] = 'setup.cmd'; // this array should not be touched but some more
  111. L_rgSetupPrograms_FileName[1] = 'setup.bat'; // (localized) entries may be added
  112. L_rgSetupPrograms_FileName[2] = 'setup.exe';
  113. L_rgSetupPrograms_FileName[3] = 'install.exe';
  114. //
  115. // these idcs correspond to ids of internal controls in appcompat\compatui.dll
  116. //
  117. var g_cIDC_EDITFILENAME = 207;
  118. var g_cIDC_BROWSE = 208;
  119. ///////////////////////////////////////////////////////////////////////////////////
  120. //
  121. // Initialize global objects (compatUI)
  122. //
  123. function InitCompatUIObjects() {
  124. var BrowseProgs = document.all['BrowseProgs'];
  125. var ProgList = document.all['SelectProgs'];
  126. var lblBrowse = document.all['lblBrowseProgs'];
  127. var sExclude = '';
  128. var i;
  129. for (i = 0; i < L_rgExcludeFiles_FileName.length; ++i) {
  130. if (i > 0) {
  131. sExclude += ';';
  132. }
  133. sExclude += L_rgExcludeFiles_FileName[i];
  134. }
  135. ProgList.ExcludeFiles = sExclude;
  136. ProgList.ExternAccel = L_strPage2Accelerators_Text;
  137. lblBrowse.innerHTML = L_strBrowseProgsLabel_Text;
  138. lblBrowse.accessKey = GetAccessKeyFromCaption(L_strBrowseProgsLabel_Text);
  139. BrowseProgs.AccelCmd(g_cIDC_EDITFILENAME) = GetAccessKeyFromCaption(L_strBrowseProgsLabel_Text);
  140. BrowseProgs.ExternAccel = L_strPage3Accelerators_Text;
  141. BrowseProgs.BrowseBtnCaption = L_strBrowseBtnCaption_Button;
  142. BrowseProgs.accessKey = GetAccessKeyFromCaption(L_strBrowseBtnCaption_Button);
  143. }
  144. function checkRadio(ctlName, choiceValue) {
  145. var collection;
  146. var i;
  147. collection = document.all[ctlName];
  148. for (i = 0; i < collection.length; i++) {
  149. if (collection[i].value.toUpperCase() == choiceValue.toUpperCase()) {
  150. collection[i].checked = true;
  151. return;
  152. }
  153. }
  154. }
  155. function getRadioText(ctlName, selValue) {
  156. var collection;
  157. var i;
  158. var lblName;
  159. var vLabel;
  160. collection = document.all[ctlName];
  161. for (i = 0; i < collection.length; i++) {
  162. if (collection[i].value.toUpperCase() == selValue.toUpperCase()) {
  163. lblName = 'lbl' + collection[i].value;
  164. vLabel = document.all[lblName];
  165. return(vLabel.innerText);
  166. }
  167. }
  168. }
  169. function getRadioValue(ctlName) {
  170. var collection;
  171. var i;
  172. collection = document.all[ctlName];
  173. for (i = 0; i < collection.length; i++) {
  174. if (collection[i].checked) {
  175. return(collection[i].value);
  176. }
  177. }
  178. }
  179. function checkCheckbox(ctlName, bCheck) {
  180. var ctl = document.all[ctlName];
  181. ctl.checked = bCheck;
  182. }
  183. function getCheckValue(ctlName) {
  184. var ctl = document.all[ctlName];
  185. if (ctl.checked == true) {
  186. return ctl.value;
  187. }
  188. return null;
  189. }
  190. function getCheckText(selValue) {
  191. var lblName = 'lbl' + selValue;
  192. var vLabel = document.all[lblName];
  193. if (vLabel != null) {
  194. return vLabel.innerText;
  195. }
  196. //
  197. // this means we have no text -- "unknown" value
  198. //
  199. return '(' + selValue + ')';
  200. }
  201. function ShowDiv(divName, bShow) {
  202. var div = document.all[divName];
  203. if (bShow) {
  204. // alert('Show ' + divName);
  205. div.style.display = '';
  206. } else {
  207. // alert('Hide ' + divName);
  208. div.style.display = 'none';
  209. }
  210. }
  211. function InitPage() {
  212. var bDisabled;
  213. //
  214. // before we do anything else, check policy setting
  215. //
  216. bDisabled = g_util.IsCompatWizardDisabled();
  217. if (bDisabled) {
  218. //
  219. // we are disabled
  220. //
  221. var btnCancel = document.all('btnCancel');
  222. btnCancel.innerHTML = L_strAltCancelCaption_Button;
  223. var btnNext = document.all('btnNext');
  224. var btnBack = document.all('btnBack');
  225. btnNext.style.display = 'none';
  226. btnBack.style.display = 'none';
  227. g_nStartPage = g_cDisabledPage;
  228. }
  229. for (i = 0; i < g_rgPages.length; ++i) {
  230. ShowDiv(g_rgPages[i], g_nStartPage == i);
  231. }
  232. if (bDisabled) {
  233. return;
  234. }
  235. // init common buttons (cancel)
  236. var btnCancel = document.all('btnCancel');
  237. btnCancel.innerHTML = L_strCancelBtnCaption_Button;
  238. InitCompatUIObjects();
  239. Intro_InitPage();
  240. // init global vars - no further init
  241. }
  242. function GetAccessKeyFromCaption(sCaption) {
  243. var sUTag = '<u>';
  244. var sUCTag = '</u>';
  245. var sAccessKey = '';
  246. var sCaplc = sCaption.toLowerCase();
  247. var ixU = sCaplc.indexOf(sUTag);
  248. if (ixU < 0) {
  249. return sAccessKey;
  250. }
  251. var ixCU = sCaplc.indexOf(sUCTag, ixU);
  252. if (ixCU < 0) {
  253. return sAccessKey;
  254. }
  255. // get the string between the tags
  256. sAccessKey = sCaplc.substring(ixU + sUTag.length, ixCU);
  257. sAccessKey.toUpperCase();
  258. return sAccessKey;
  259. }
  260. function InitNavButtons(bBackEnabled, sNextButtonValue) {
  261. var frmNav = document.forms('frmNav');
  262. var btnBack = frmNav('btnBack');
  263. btnBack.innerHTML = L_strBtnBackCaption_Button;
  264. btnBack.accessKey = GetAccessKeyFromCaption(L_strBtnBackCaption_Button);
  265. btnBack.disabled = !bBackEnabled;
  266. var btnNext = frmNav('btnNext');
  267. btnNext.disabled = false;
  268. if (null != sNextButtonValue) {
  269. btnNext.innerHTML = sNextButtonValue;
  270. } else {
  271. btnNext.innerHTML = L_strBtnNextCaption_Button;
  272. }
  273. btnNext.accessKey = GetAccessKeyFromCaption(btnNext.innerHTML);
  274. btnNext.focus();
  275. }
  276. //
  277. // selected flags
  278. //
  279. var OFN_HIDEREADONLY = 0x00000004;
  280. var OFN_PATHMUSTEXIST = 0x00000800;
  281. var OFN_FILEMUSTEXIST = 0x00001000;
  282. var OFN_EXPLORER = 0x00080000; // new look commdlg
  283. var OFN_NODEREFERENCELINKS = 0x00100000; // prevents a link from being cracked
  284. var OFN_ENABLESIZING = 0x00800000;
  285. var OFN_FORCESHOWHIDDEN = 0x10000000; // Show All files including System and hidden files
  286. var g_ofnFlags = OFN_HIDEREADONLY|
  287. OFN_PATHMUSTEXIST|
  288. OFN_FILEMUSTEXIST|
  289. OFN_NODEREFERENCELINKS;
  290. //
  291. // ====================== Page Init Code ====================================
  292. //
  293. //
  294. function Intro_InitPage(nPageFrom) {
  295. InitNavButtons(false, null);
  296. }
  297. function ProgListAction() {
  298. var btnAction = document.all['btnProgListAction'];
  299. switch(btnAction.name) {
  300. case 'Cancel':
  301. CancelProgScan();
  302. break;
  303. case 'Scan':
  304. RefreshProgs();
  305. break;
  306. }
  307. }
  308. function SetProglistAction(proglistAction) {
  309. var btnAction = document.all['btnProgListAction'];
  310. btnAction.name = proglistAction;
  311. switch(proglistAction) {
  312. case 'Cancel':
  313. btnAction.innerHTML = L_strStopBtnCaption_Button;
  314. break;
  315. case 'Scan':
  316. btnAction.innerHTML = L_strRefreshBtnCaption_Button;
  317. break;
  318. }
  319. btnAction.accessKey = GetAccessKeyFromCaption(btnAction.innerHTML);
  320. }
  321. function BlockNextButton(bBlock) {
  322. var frmNav = document.forms('frmNav');
  323. var btnNext = frmNav('btnNext');
  324. var btnBack = frmNav('btnBack');
  325. if (bBlock) {
  326. btnBack.focus();
  327. }
  328. btnNext.disabled = bBlock; // bummer, next is disabled
  329. if (!bBlock) {
  330. btnNext.focus();
  331. }
  332. }
  333. function AppProgramList_InitPage(nPageFrom) {
  334. var SelectProgs = document.all['SelectProgs'];
  335. var BrowseProgs = document.all['BrowseProgs'];
  336. BrowseProgs.Enabled = false;
  337. BrowseProgs.Valid = false;
  338. SelectProgs.Enabled = true;
  339. SelectProgs.Valid = true;
  340. InitNavButtons(true, null);
  341. if (!g_bProgramsPopulated) {
  342. BlockNextButton(true);
  343. SetProglistAction('Cancel');
  344. } else {
  345. SetProglistAction('Scan');
  346. }
  347. }
  348. function CancelProgScan() {
  349. var SelectProgs = document.all['SelectProgs'];
  350. SelectProgs.CancelPopulateList();
  351. }
  352. function RefreshProgs() {
  353. var SelectProgs = document.all['SelectProgs'];
  354. var btnNext = document.all['btnNext'];
  355. BlockNextButton(true);
  356. SetProglistAction('Cancel');
  357. SelectProgs.PopulateList();
  358. }
  359. function AppBrowseProgs_InitPage(nPageFrom) {
  360. var BrowseProgs = document.all['BrowseProgs'];
  361. var oShell = new ActiveXObject('Shell.Application');
  362. // DEBUGDEBUG
  363. var SelectProgs = document.all['SelectProgs'];
  364. SelectProgs.Enabled = false;
  365. SelectProgs.Valid = false;
  366. BrowseProgs.Enabled = true;
  367. BrowseProgs.Valid = true;
  368. // localization
  369. BrowseProgs.BrowseFilter = L_strBrowseFilter_Text;
  370. BrowseProgs.BrowseFlags = g_ofnFlags;
  371. BrowseProgs.BrowseTitle = L_strBrowseCaption_DialogTitle;
  372. var shFolder = oShell.Namespace(0x2); // ssPrograms, Folder2 object
  373. BrowseProgs.BrowseInitialDirectory = shFolder.Self.Path; // convert to folder item and get path
  374. InitNavButtons(true, null);
  375. }
  376. function Page_NavigateComplete(nPageTo) {
  377. if (nPageTo == g_cAppBrowseProgsPage) {
  378. if (g_bAppBrowseProgsInitialized) {
  379. OnBrowseProgsReady();
  380. }
  381. }
  382. }
  383. function SetFocusBrowseProgs() {
  384. var BrowseProgs = document.all['BrowseProgs'];
  385. BrowseProgs.focus();
  386. }
  387. function OnBrowseProgsReady() {
  388. setTimeout(SetFocusBrowseProgs, 0, 'javascript');
  389. }
  390. function AppSelectMethod_InitPage(nPageFrom) {
  391. InitNavButtons(true, null);
  392. }
  393. function FixesLayers_InitPage(nPageFrom) {
  394. var sCompatLayer;
  395. if (nPageFrom < g_cFixesLayersPage) { // we want to find whether it is a motion forward or backwards
  396. sCompatLayer = GetApplicationLayer();
  397. ParseLayers(sCompatLayer);
  398. }
  399. InitNavButtons(true, null);
  400. }
  401. function CompatibilityData_InitPage(nPageFrom) {
  402. ClearUploadInformation();
  403. g_upload = new ActiveXObject("CompatUI.Upload");
  404. //
  405. // prepare for an upload
  406. //
  407. PrepareUploadInformation(g_upload);
  408. InitNavButtons(true, null);
  409. //
  410. // make sure yes and no -- neither is checked
  411. //
  412. document.all['chkUploadInfo' ].checked = false;
  413. document.all['chkNoUploadInfo'].checked = false;
  414. //
  415. // disable next button for now please
  416. //
  417. BlockNextButton(true);
  418. }
  419. function ClearUploadInformation() {
  420. if (g_upload != null) {
  421. g_upload.DeleteTempFiles();
  422. delete g_upload;
  423. g_upload = null;
  424. }
  425. }
  426. function SendCompatibilityReport(bSend) {
  427. if (g_upload == null) {
  428. return;
  429. }
  430. if (bSend) {
  431. g_upload.SendReport();
  432. }
  433. ClearUploadInformation();
  434. }
  435. function ViewTempFileList() {
  436. g_upload.ShowTempFiles();
  437. }
  438. function CompleteWizard_InitPage(nPageFrom) {
  439. //
  440. // see if our app was system
  441. //
  442. var UpdateAction = getRadioValue('UpdateShortcut');
  443. var divCompatSettings = document.all['divCompatSettings'];
  444. var sSettings;
  445. if (UpdateAction == 'Yes') {
  446. sSettings = L_strCompatSettingsAdjusted_Text;
  447. } else {
  448. sSettings = L_strCompatSettingsNotAdjusted_Text;
  449. }
  450. divCompatSettings.innerHTML = sSettings;
  451. InitNavButtons(true, L_strBtnFinish_Button);
  452. var btnNext = document.all['btnNext'];
  453. btnNext.accessKey = 'F';
  454. }
  455. //
  456. // Read autorun.inf and be happy
  457. //
  458. // returns dictionary object with all the relevant information
  459. //
  460. // autorunToken may be anything that comes with autorun.xxx
  461. function ReadAutorunContent(ts, autorunToken) {
  462. var line;
  463. var re; // regexpression
  464. var rr; // result of a match
  465. var dictAutorun = null;
  466. var ReadingContent = false;
  467. while (!ts.AtEndOfStream) {
  468. line = ts.ReadLine();
  469. //
  470. // look for 'open' token
  471. // parse the line we got from the autorun
  472. //
  473. re = /\[\s*autorun(\.\S+){0,}\s*\]/i
  474. rr = line.match(re);
  475. if (rr != null) {
  476. // see if this is autorun.architecture
  477. if (ReadingContent) {
  478. break;
  479. }
  480. if (rr.length > 1 && autorunToken != null) {
  481. autorunToken.toLowerCase();
  482. rr[1].toLowerCase();
  483. if (rr[1] != autorunToken) {
  484. continue;
  485. }
  486. }
  487. dictAutorun = new ActiveXObject("Scripting.Dictionary");
  488. ReadingContent = true;
  489. } else if (dictAutorun != null) {
  490. re = /\s*(\w+)\s*=\s*(.+)/i
  491. rr = line.match(re);
  492. if (rr != null && rr.length >= 3 && !dictAutorun.Exists(rr[1])) {
  493. //
  494. // is this a 2 part match?
  495. //
  496. rr[1].toLowerCase();
  497. dictAutorun.Add(rr[1], rr[2]);
  498. }
  499. }
  500. }
  501. return dictAutorun;
  502. }
  503. function ReadAutorunInf(driveName) {
  504. var sAutorun = driveName + 'Autorun.inf';
  505. var f = null;
  506. var ts;
  507. var dictAutorun;
  508. var autorunToken;
  509. try {
  510. if (g_fso.FileExists(sAutorun)) {
  511. f = g_fso.GetFile(sAutorun);
  512. }
  513. } catch (e) {
  514. f = null;
  515. }
  516. if (f == null) {
  517. return null;
  518. }
  519. autorunToken = '.' + g_shell.Environment.Item('PROCESSOR_ARCHITECTURE');
  520. while(true) {
  521. ts = f.OpenAsTextStream(1); // open for reading
  522. if (ts == null) {
  523. return null;
  524. }
  525. dictAutorun = ReadAutorunContent(ts, autorunToken);
  526. ts.Close();
  527. if (dictAutorun != null) { // if we have the dictionary -- get out now
  528. return dictAutorun;
  529. }
  530. if (autorunToken != null) { // if we have tried architecture-specific item, try generic one now
  531. autorunToken = null;
  532. } else {
  533. // we have tried generic -- found nothing
  534. return null;
  535. }
  536. }
  537. return dictAutorun;
  538. }
  539. function removeParams(sPath) {
  540. var sPurePath;
  541. try {
  542. sPurePath = g_util.RemoveArgs(sPath);
  543. } catch(e) {
  544. sPurePath = sPath;
  545. }
  546. return sPurePath;
  547. }
  548. //
  549. // reads and sets globals for apphelp's benefit
  550. //
  551. //
  552. function GetAutorunInformation(driveName, dictAutorun, IsAutorun) {
  553. var sApplication = null;
  554. var sApplicationDisplayName = null;
  555. var sApplicationPath = null;
  556. var drive;
  557. if (dictAutorun.Exists('label')) {
  558. sApplicationDisplayName = dictAutorun.Item('label');
  559. }
  560. if (sApplicationDisplayName == null) {
  561. drive = g_fso.GetDrive(driveName);
  562. sApplicationDisplayName = drive.VolumeName + ' (' + driveName + ')';
  563. }
  564. if (dictAutorun.Exists('open')) {
  565. sApplication = dictAutorun.Item('open');
  566. } else {
  567. //
  568. // no open verb -- we will try this - but what do we do with this item?
  569. //
  570. if (dictAutorun.Exists('shellexecute')) {
  571. sApplication = dictAutorun.Item('shellexecute');
  572. if (sApplication != null && sApplication.length) {
  573. //
  574. // This case was never found in our testing
  575. //
  576. }
  577. }
  578. }
  579. // convert sApplication into a friendly name
  580. // see if sApplication has a friendly path
  581. if (sApplication == null || !sApplication.length) {
  582. return false;
  583. }
  584. //
  585. // sApplicationLocation
  586. //
  587. if (sApplication.substr(0, 2) == '\\\\') {
  588. // this is UNC, do not touch
  589. ;
  590. } else if (sApplication.substr(1, 1) == ':') {
  591. // has a drive name, do not touch
  592. ;
  593. } else if (sApplication.substr(0, 1) == '%') {
  594. // has env var in it -- do not touch
  595. ;
  596. } else if (sApplication.substr(0, 1) == '\\') {
  597. // prepend
  598. sApplication = driveName.substr(0, 2) + sApplication;
  599. } else {
  600. sApplication = driveName + sApplication;
  601. }
  602. // sanitize parameters
  603. sApplicationPath = removeParams(sApplication);
  604. //
  605. // make sure that whatever chemistry we did here -- it worked
  606. //
  607. if (!validateFile(sApplicationPath)) {
  608. return false;
  609. }
  610. if (IsAutorun) {
  611. g_sApplicationLocation = 'AutoRun (' + driveName + ')';
  612. } else {
  613. g_sApplicationLocation = 'Setup Application (' + driveName + ')';
  614. }
  615. g_sApplication = sApplication;
  616. g_sApplicationDisplayName = sApplicationDisplayName;
  617. g_sPersistPath = null;
  618. g_sCmdLine = g_sApplication;
  619. return true;
  620. }
  621. function ScanForAutorun() {
  622. var driveLetter = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
  623. var drive = null;
  624. var dictAutorun = null;
  625. var sAutorun;
  626. var bRet = false;
  627. for (i = 0; i < 26; ++i) {
  628. driveName = driveLetter.charAt(i) + ':\\';
  629. if (!g_fso.DriveExists(driveName)) {
  630. continue;
  631. }
  632. drive = g_fso.GetDrive(driveName);
  633. if (drive == null || drive.DriveType != 4 || !drive.IsReady) {
  634. continue;
  635. }
  636. dictAutorun = ReadAutorunInf(driveName);
  637. if (dictAutorun != null) {
  638. break;
  639. }
  640. }
  641. if (dictAutorun == null) {
  642. return false;
  643. }
  644. //
  645. // see what we have learnt
  646. //
  647. bRet = GetAutorunInformation(driveName, dictAutorun, true);
  648. delete dictAutorun;
  649. return bRet;
  650. }
  651. function Update_InitPage(nPageFrom) {
  652. var frmUpdate = document.forms('frmUpdate');
  653. var divMedia = document.all['MediaWarning'];
  654. var drive;
  655. var driveName;
  656. var sAppPath;
  657. var bUpdateDisabled = false;
  658. var optNoUpdate = document.all['chkNo'];
  659. var optUpdate = document.all['chkYes'];
  660. var lblYes = document.all['lblYes'];
  661. sAppPath = ExpandSpecialFolders(g_sApplication);
  662. driveName = g_fso.GetDriveName(sAppPath);
  663. drive = g_fso.GetDrive(driveName);
  664. g_bSendReport = true;
  665. g_bUpdateLayers = true;
  666. if (drive.DriveType == 1 || drive.DriveType == 3) {
  667. //
  668. // removable media or the network - disable both the check and the label
  669. //
  670. divMedia.innerHTML = L_strCompatModeRemovableMedia_Text;
  671. bUpdateDisabled = false;
  672. //
  673. // we shall send the report but will not update layers
  674. //
  675. g_bSendReport = true;
  676. g_bUpdateLayers = false;
  677. } else if (g_util.IsSystemTarget(g_sApplication)){
  678. divMedia.innerHTML = L_strCompatModePartOfOS_Text;
  679. bUpdateDisabled = false;
  680. //
  681. // system target, no sending report, disable update
  682. //
  683. g_bSendReport = false;
  684. g_bUpdateLayers = false;
  685. } else if (!g_util.IsExecutableFile(g_sApplication)) {
  686. divMedia.innerHTML = L_strCompatModeNotExe_Text;
  687. bUpdateDisabled = false;
  688. g_bSendReport = true;
  689. g_bUpdateLayers = false;
  690. }
  691. if (g_bUpdateLayers) {
  692. lblYes.innerHTML = L_strSetPermanentLayers_Text;
  693. lblYes.accessKey = GetAccessKeyFromCaption(L_strSetPermanentLayers_Text);
  694. lblYes.title = L_strSetPermanentLayersTitle_Text;
  695. } else {
  696. lblYes.innerHTML = L_strProgramWorked_Text;
  697. lblYes.accessKey = GetAccessKeyFromCaption(L_strProgramWorked_Text);
  698. lblYes.title = L_strProgramWorkedTitle_Text;
  699. }
  700. if (bUpdateDisabled) {
  701. optNoUpdate.checked = true;
  702. }
  703. optUpdate.disabled = bUpdateDisabled;
  704. lblYes.disabled = bUpdateDisabled;
  705. divMedia.style.display = (g_bSendReport && g_bUpdateLayers) ? 'none' : '';
  706. InitNavButtons(true, null);
  707. }
  708. function Run_InitPage(nPageFrom) {
  709. var divLayer;
  710. var divApp;
  711. var shtml = '';
  712. var sAppName;
  713. divApp = document.all['divTargetApp'];
  714. divLayer = document.all['divCompatLayer'];
  715. //
  716. // what goes as an app name?
  717. //
  718. if (g_sApplicationDisplayName != null) {
  719. shtml = '<label title=\"' + g_sApplication +'\">' + g_sApplicationDisplayName + '</label>';
  720. } else {
  721. shtml = g_sApplication;
  722. }
  723. // if (g_sApplicationDisplayName != null) {
  724. // sAppName = g_sApplicationDisplayName;
  725. // } else {
  726. // sAppName = g_sApplication;
  727. // }
  728. // shtml = sAppName;
  729. // if (g_sApplicationLocation != null) {
  730. // shtml += '<br>' + g_sApplicationLocation;
  731. // }
  732. // if (g_sApplicationDisplayName != null) {
  733. // shtml += '<br>' + g_sApplication;
  734. // }
  735. divApp.innerHTML = shtml;
  736. divApp.style.display = '';
  737. // also check drive type, do warning if net or cd-r
  738. var drive;
  739. var driveName;
  740. driveName = g_fso.GetDriveName(g_sApplication);
  741. drive = g_fso.GetDrive(driveName);
  742. if (drive.DriveType == 1 || drive.DriveType == 3) {
  743. divApp.innerHTML += L_strFileOnTheNet_Text;
  744. }
  745. if (g_sLayerDescription == null || g_sLayerDescription.length == 0) {
  746. divLayer.innerHTML = L_strNoCompatSettings_Text;
  747. } else {
  748. divLayer.innerHTML = g_sLayerDescription;
  749. }
  750. InitNavButtons(true, null);
  751. }
  752. function validateFile(sFileName) {
  753. if (sFileName == null) {
  754. return false;
  755. }
  756. sPath = ExpandSpecialFolders(sFileName);
  757. // sPath = GetRealPathName(sPath);
  758. return g_fso.FileExists(sPath);
  759. }
  760. function NavigateToPage(nPage) {
  761. var frmNav = document.forms('frmNav');
  762. //
  763. // if we are moving beyond the last or before the first -- navigate to
  764. // the first page
  765. //
  766. if (nPage < 0 || nPage >= g_nPages) {
  767. nPage = 0;
  768. }
  769. if (eval('typeof(' + g_rgPages[nPage] + '_InitPage)') == 'function') {
  770. eval(g_rgPages[nPage] + '_InitPage(' + g_nPage + ')');
  771. }
  772. // show the divs
  773. ShowDiv(g_rgPages[g_nPage], false);
  774. g_nPage = nPage;
  775. ShowDiv(g_rgPages[g_nPage], true);
  776. if (eval('typeof(Page_NavigateComplete)') == 'function') {
  777. eval('Page_NavigateComplete(' + g_nPage + ')');
  778. }
  779. }
  780. function CheckForSetupProgsOnCD() {
  781. var driveLetter = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
  782. var drive = null;
  783. var dictAutorun = null;
  784. var sAutorun;
  785. var dictAutorun = null;
  786. var bRet;
  787. var i, j;
  788. var driveName;
  789. var sSetup;
  790. for (i = 0; i < 26; ++i) {
  791. driveName = driveLetter.charAt(i) + ':\\';
  792. if (!g_fso.DriveExists(driveName)) {
  793. continue;
  794. }
  795. drive = g_fso.GetDrive(driveName);
  796. if (drive == null || drive.DriveType != 4 || !drive.IsReady) {
  797. continue;
  798. }
  799. for (j = 0; j < L_rgSetupPrograms_FileName.length; j++) {
  800. sSetup = driveName + L_rgSetupPrograms_FileName[j];
  801. if (!g_fso.FileExists(sSetup)) {
  802. continue;
  803. }
  804. //
  805. // we have an install program
  806. //
  807. var dictAutorun = new ActiveXObject("Scripting.Dictionary");
  808. dictAutorun.Add('open', sSetup);
  809. bRet = GetAutorunInformation(driveName, dictAutorun, false);
  810. delete dictAutorun;
  811. if (bRet) {
  812. return true;
  813. }
  814. }
  815. }
  816. return false;
  817. }
  818. function getAppFromCD() {
  819. var bret;
  820. g_bProgListSelect = false;
  821. bret = ScanForAutorun();
  822. if (!bret) {
  823. bret = CheckForSetupProgsOnCD();
  824. }
  825. return bret;
  826. }
  827. function getBrowseProgsSel() {
  828. var BrowseProgs = document.all['BrowseProgs'];
  829. g_bProgListSelect = false;
  830. g_sApplication = BrowseProgs.FileName;
  831. g_sPersistPath = null;
  832. g_sApplicationDisplayName = null;
  833. g_sApplicationLocation = null;
  834. g_sCmdLine = g_sApplication;
  835. // now validate
  836. //
  837. return validateFile(g_sApplication);
  838. }
  839. function getProgListSel() {
  840. var SelectProgs = document.all['SelectProgs'];
  841. SelectProgs.GetSelectedItem();
  842. g_sApplicationDisplayName = SelectProgs.SelectionName;
  843. if (g_sApplicationDisplayName == null) {
  844. return false;
  845. }
  846. g_sApplicationLocation = SelectProgs.GetSelectionInformation(1); // folder
  847. g_sApplication = SelectProgs.GetSelectionInformation(4); // we will run this
  848. g_sPersistPath = SelectProgs.GetSelectionInformation(2); // path that we shall persist
  849. g_sCmdLine = SelectProgs.GetSelectionInformation(3);
  850. g_bProgListSelect = true;
  851. // validate
  852. return validateFile(g_sPersistPath);
  853. }
  854. function addLayerInfo(sCompatLayer, bMachine) {
  855. var sLayers;
  856. if (bMachine) {
  857. sLayers = g_sCompatLayerMachine;
  858. } else {
  859. sLayers = g_sCompatLayer;
  860. }
  861. if (sLayers.length) {
  862. sLayers += ' ';
  863. }
  864. sLayers += sCompatLayer;
  865. if (bMachine) {
  866. g_sCompatLayerMachine = sLayers;
  867. } else {
  868. g_sCompatLayer = sLayers;
  869. }
  870. if (g_sLayerDescription.length) {
  871. g_sLayerDescription += '<br>';
  872. }
  873. g_sLayerDescription += getCheckText(sCompatLayer);
  874. }
  875. function getLayerSelection() {
  876. g_sCompatLayer = '';
  877. g_sCompatLayerMachine = '';
  878. g_sLayerDescription = '';
  879. var sRadioLayer = 'layer';
  880. var sCompatLayer;
  881. //
  882. // emulation mode
  883. //
  884. sCompatLayer = getRadioValue(sRadioLayer);
  885. if (sCompatLayer != 'None') {
  886. g_sCompatLayer = sCompatLayer;
  887. g_sLayerDescription = getRadioText(sRadioLayer, g_sCompatLayer);
  888. }
  889. sCompatLayer = getCheckValue('chk256color');
  890. if (sCompatLayer != null) {
  891. addLayerInfo(sCompatLayer, false);
  892. }
  893. sCompatLayer = getCheckValue('chk640x480');
  894. if (sCompatLayer != null) {
  895. addLayerInfo(sCompatLayer, false);
  896. }
  897. sCompatLayer = getCheckValue('chkNoThemes');
  898. if (sCompatLayer != null) {
  899. addLayerInfo(sCompatLayer, false);
  900. }
  901. sCompatLayer = getCheckValue('chkLUA');
  902. if (sCompatLayer != null) {
  903. addLayerInfo(sCompatLayer, true);
  904. }
  905. if (g_UnknownLayers.length) {
  906. addLayerInfo(g_UnknownLayers, false);
  907. }
  908. // alert(g_sCompatLayer + '\n' + g_sLayerDescription);
  909. return (g_sCompatLayer.length > 0 || g_sCompatLayerMachine.length > 0);
  910. }
  911. function onBtnNext() {
  912. var frmNav = document.forms('frmNav');
  913. var bSuccess;
  914. // cancel calling action
  915. if (event != null) {
  916. event.returnValue = false;
  917. }
  918. var nPage = g_nPage + 1;
  919. // do what we need to do for this page
  920. switch(g_nPage) {
  921. case g_cIntroPage:
  922. break; // nothing to do for the first page
  923. case g_cAppPage: // App page -- extract application choice
  924. var prog = getRadioValue('progClass');
  925. switch(prog) {
  926. case 'CDProg':
  927. //
  928. // run program from CDROM
  929. //
  930. var bFound;
  931. var bRetry;
  932. do {
  933. bRetry = false;
  934. bFound = getAppFromCD();
  935. if (!bFound) {
  936. bRetry = confirm(L_strRetryCD_Message);
  937. }
  938. } while(bRetry);
  939. if (bFound) {
  940. nPage = g_cFixesLayersPage;
  941. g_ProgramSelectMethod = g_cSelectRunFromCD;
  942. } else {
  943. nPage = g_cAppBrowseProgsPage;
  944. g_ProgramSelectMethod = g_cSelectBrowse;
  945. }
  946. break;
  947. case 'ProgList':
  948. //
  949. // choose the program from the list
  950. //
  951. nPage = g_cAppProgramListPage;
  952. g_ProgramSelectMethod = g_cSelectFromList;
  953. break;
  954. case 'BrowseProg':
  955. nPage = g_cAppBrowseProgsPage;
  956. g_ProgramSelectMethod = g_cSelectBrowse;
  957. break;
  958. }
  959. break;
  960. case g_cAppProgramListPage:
  961. // have we chosen anything here?
  962. //
  963. if (!getProgListSel()) {
  964. alert(L_strChooseProgram_Message);
  965. return;
  966. }
  967. nPage = g_cFixesLayersPage;
  968. break;
  969. case g_cAppBrowseProgsPage:
  970. //
  971. // validate
  972. //
  973. if (!getBrowseProgsSel()) {
  974. alert(L_strSpecifyValidApp_Message);
  975. return;
  976. }
  977. nPage = g_cFixesLayersPage;
  978. break;
  979. case g_cFixesLayersPage: // nothing to do here
  980. break;
  981. case g_cFixesOtherPage: //
  982. //
  983. // check if we are admin, if not - skip to the page after LUA
  984. // get layer selection before that
  985. if (!g_util.CheckAdminPrivileges()) {
  986. getLayerSelection();
  987. nPage = g_cRunPage;
  988. }
  989. break;
  990. case g_cFixesLUAPage:
  991. getLayerSelection();
  992. break;
  993. case g_cRunPage: // run page (separate button for run, nothing to do here)
  994. // clicked "Next" on run page, run the app
  995. if (!RunApp()) {
  996. switch(g_ProgramSelectMethod) {
  997. case g_cSelectFromList:
  998. nPage = g_cAppProgramListPage;
  999. break;
  1000. case g_cSelectBrowse:
  1001. nPage = g_cAppBrowseProgsPage;
  1002. break;
  1003. case g_cSelectRunFromCD:
  1004. nPage = g_cAppPage;
  1005. break;
  1006. }
  1007. }
  1008. break;
  1009. case g_cUpdatePage: // update page
  1010. //
  1011. // this is where the layers are being set
  1012. //
  1013. if (g_bUpdateLayers) { // should we even bother with layers ?
  1014. var UpdateAction = getRadioValue('UpdateShortcut');
  1015. switch(UpdateAction) {
  1016. case 'Yes':
  1017. bSuccess = UpdateAppShortcut(true, null);
  1018. break;
  1019. case 'No':
  1020. break;
  1021. default:
  1022. nPage = g_cFixesLayersPage;
  1023. break;
  1024. }
  1025. }
  1026. //
  1027. // we go to the compat report only if this is not a system target ??
  1028. //
  1029. if (!g_bSendReport && nPage == g_cCompatibilityDataPage) {
  1030. nPage = g_cCompleteWizardPage;
  1031. }
  1032. break;
  1033. case g_cCompatibilityDataPage:
  1034. //
  1035. // compat data page - send report now
  1036. //
  1037. var SendReport = getRadioValue("UploadInfo");
  1038. SendCompatibilityReport(SendReport == 'Yes');
  1039. break;
  1040. case g_cCompleteWizardPage:
  1041. //
  1042. // on complete wizard
  1043. //
  1044. CompleteWizard();
  1045. nPage = g_cCompleteWizardPage; // no way we're moving
  1046. break;
  1047. }
  1048. //
  1049. // this also sets the global g_nPage to the right page number
  1050. //
  1051. NavigateToPage(nPage);
  1052. }
  1053. function PrepareUploadInformation(oUpload) {
  1054. var UpdateAction = getRadioValue('UpdateShortcut');
  1055. var bCompatSuccess = (UpdateAction == 'Yes');
  1056. var sAppDisplayName;
  1057. var sCmd;
  1058. var lMediaType = 0; // unknown
  1059. sAppDisplayName = g_sApplicationDisplayName;
  1060. if (g_sApplicationDisplayName == null || !g_sApplicationDisplayName.length) {
  1061. sAppDisplayName = g_sApplication;
  1062. }
  1063. //
  1064. // check whether we have a command line (this should be cracked)
  1065. //
  1066. sCmd = g_util.GetExePathFromObject(g_sApplication);
  1067. if (sCmd == null) {
  1068. sCmd = g_sApplication;
  1069. }
  1070. //
  1071. // obtain drive type
  1072. //
  1073. var driveName = g_fso.GetDriveName(sCmd);
  1074. if (driveName != null) {
  1075. var oDrive = g_fso.GetDrive(driveName);
  1076. if (oDrive != null) {
  1077. lMediaType = oDrive.DriveType;
  1078. }
  1079. }
  1080. //
  1081. // ===== Upload UI =====
  1082. //
  1083. var sErrorText;
  1084. // var sErrorDetail;
  1085. // var sPlea;
  1086. // localization for this is not needed (no ui)
  1087. //
  1088. sErrorText = 'This report contains information about the compatibility settings ' +
  1089. 'you tried and whether these settings resolved the problem.'
  1090. // sErrorDetail = sErrorText;
  1091. // sPlea = 'If you send this report to Microsoft, it will help improve future program compatibility. ';
  1092. // sPlea += 'The report will be anonymous and confidential.'
  1093. oUpload.SetKey ('Server', 'watson.microsoft.com');
  1094. oUpload.SetKey ('Stage1URL', '/StageOne/AppCompat/x.htm');
  1095. oUpload.SetKey ('Stage2URL', '/dw/AppCompatTwo.asp');
  1096. oUpload.SetKey ('TitleName', 'Program Compatibility Report');
  1097. oUpload.SetKey ('Brand', 'SYSTEMRESTORE');
  1098. oUpload.SetKey ('ErrorText', sErrorText);
  1099. oUpload.SetKey ('HeaderText', 'A Program Compatibility Report has been created');
  1100. oUpload.SetKey ('UI LCID', '1033');
  1101. oUpload.SetKey ('ErrorSubPath', 'Compat');
  1102. oUpload.SetKey ('RegSubPath', 'Microsoft\\PCHealth\\ErrorReporting\\DW');
  1103. // oUpload.SetKey ('ErrorDetail', sErrorDetail);
  1104. oUpload.SetKey ('ErrorSig', 'Program Compatibility Wizard: ' + (bCompatSuccess ? 'Success' : 'Failure'));
  1105. // oUpload.SetKey ('Caption', 'Program Compatibility Report');
  1106. // oUpload.SetKey ('Plea', sPlea);
  1107. //
  1108. // ===== Text on buttons =====
  1109. //
  1110. // oUpload.SetKey ('ReportButton', '&Send Report');
  1111. // oUpload.SetKey ('NoReportButton', '&Don\'t Send');
  1112. // oUpload.SetKey ('Reportee', 'Microsoft');
  1113. // use the flags below to go headless
  1114. // fDwHeadless = 0x80
  1115. // fDwUseHKLM = 0x100
  1116. // fDwNoDefaultCabLimit = 0x4000
  1117. var fDwFlags = 0x80 | 0x100 | 0x4000;
  1118. // var fdwFlags = 0x40;
  1119. oUpload.SetKey ('Flags', fDwFlags);
  1120. // alert('Display name:' + sAppDisplayName + ' cmd: ' + sCmd + ' media: ' + lMediaType + ' success : ' + bCompatSuccess + ' Layer: ' + g_sCompatLayer);
  1121. var bSuccessGeneralInfo = oUpload.AddDescriptionFile(sAppDisplayName,
  1122. sCmd, // actual command that we ran
  1123. lMediaType,
  1124. bCompatSuccess,
  1125. g_sCompatLayer);
  1126. var bSuccessMatchingInfo = oUpload.AddMatchingInfo(g_sApplication);
  1127. var bSuccessManifest = oUpload.CreateManifestFile();
  1128. return (bSuccessMatchingInfo && bSuccessManifest && bSuccessGeneralInfo);
  1129. }
  1130. function CompleteWizard() {
  1131. pchealth.close();
  1132. }
  1133. function onBtnBack() {
  1134. var nPage = g_nPage - 1;
  1135. //
  1136. // check the page we're going back from
  1137. //
  1138. if (event != null) {
  1139. event.returnValue = false;
  1140. }
  1141. switch(g_nPage) {
  1142. case g_cFixesLayersPage:
  1143. switch(g_ProgramSelectMethod) {
  1144. case g_cSelectFromList:
  1145. nPage = g_cAppProgramListPage;
  1146. break;
  1147. case g_cSelectRunFromCD:
  1148. nPage = g_cAppPage;
  1149. break;
  1150. case g_cSelectBrowse:
  1151. nPage = g_cAppBrowseProgsPage;
  1152. break;
  1153. }
  1154. break;
  1155. case g_cRunPage:
  1156. //
  1157. // in case of non-admin user, skip LUA page
  1158. //
  1159. if (!g_util.CheckAdminPrivileges()) {
  1160. nPage = g_cFixesOtherPage;
  1161. }
  1162. break;
  1163. case g_cAppBrowseProgsPage:
  1164. nPage = g_cAppPage;
  1165. break;
  1166. case g_cCompatibilityDataPage:
  1167. // if we are on a data page -- we have gathered some info
  1168. // clear it if so
  1169. ClearUploadInformation();
  1170. break;
  1171. case g_cCompleteWizardPage:
  1172. nPage = g_cUpdatePage;
  1173. break;
  1174. }
  1175. NavigateToPage(nPage);
  1176. }
  1177. function onBtnCancel() {
  1178. if (event != null) {
  1179. event.returnValue = false;
  1180. }
  1181. ClearUploadInformation();
  1182. if (window.history.length <= 1) {
  1183. pchealth.close();
  1184. } else {
  1185. window.history.back();
  1186. }
  1187. }
  1188. function ExpandSpecialFolders(sPath) {
  1189. var Path = sPath;
  1190. Path = Path.replace(/%WINDIR%/gi, g_fso.GetSpecialFolder(0));
  1191. Path = Path.replace(/%SYSTEM%/gi, g_fso.GetSpecialFolder(1));
  1192. Path = Path.replace(/%TEMP%/gi, g_fso.GetSpecialFolder(2));
  1193. return(Path);
  1194. }
  1195. function IsDriveReady(sAppPath) {
  1196. var driveName;
  1197. var drive;
  1198. driveName = g_fso.GetDriveName(sAppPath);
  1199. if (!g_fso.DriveExists(driveName)) {
  1200. return false;
  1201. }
  1202. drive = g_fso.GetDrive(driveName);
  1203. if (drive == null || !drive.IsReady) {
  1204. return false;
  1205. }
  1206. return true;
  1207. }
  1208. function RunApp() {
  1209. var CompatLayer = g_sCompatLayer;
  1210. var TargetApp = g_sApplication;
  1211. var AppPath = ExpandSpecialFolders(TargetApp);
  1212. var sLayerSave;
  1213. var Result;
  1214. var bSuccess = false;
  1215. var AppName = removeParams(AppPath);
  1216. //
  1217. // Verify target file path
  1218. //
  1219. if (!IsDriveReady(AppName) || !g_fso.FileExists(AppName)) {
  1220. alert(L_strAppNotFound_ErrorMessage + AppName + L_strEnsureExist_ErrorMessage + L_strMustValid_ErrorMessage);
  1221. return false;
  1222. }
  1223. //
  1224. // get the layers associated with this guy
  1225. //
  1226. sLayerSave = GetApplicationLayer();
  1227. try {
  1228. if (sLayerSave != null) {
  1229. // alert(sLayerSave);
  1230. UpdateAppShortcut(false, null);
  1231. }
  1232. //
  1233. // run
  1234. //
  1235. Result = g_util.RunApplication(CompatLayer,
  1236. AppPath,
  1237. false); // enable log
  1238. bSuccess = (Result == 0);
  1239. } catch(e) {
  1240. }
  1241. if (sLayerSave != null) {
  1242. UpdateAppShortcut(true, sLayerSave);
  1243. }
  1244. if (!bSuccess) {
  1245. alert(L_strErrorStartingApp_ErrorMessage + AppPath);
  1246. }
  1247. return bSuccess;
  1248. }
  1249. function GetRealPathName(lpszPath) {
  1250. var AppPath;
  1251. AppPath = g_util.GetExePathFromObject(lpszPath);
  1252. if (AppPath == null) {
  1253. AppPath = lpszPath;
  1254. }
  1255. return AppPath;
  1256. }
  1257. function GetApplicationLayer() {
  1258. var CompatLayer = g_sCompatLayer;
  1259. var TargetApp;
  1260. var AppPath;
  1261. if (g_sPersistPath != null) {
  1262. TargetApp = g_sPersistPath;
  1263. } else {
  1264. AppPath = ExpandSpecialFolders(g_sApplication);
  1265. TargetApp = GetRealPathName(AppPath);
  1266. }
  1267. try {
  1268. CompatLayer = g_util.GetItemKeys(TargetApp);
  1269. } catch(e) {
  1270. CompatLayer = null;
  1271. }
  1272. return CompatLayer;
  1273. }
  1274. function ParseLayers(sCompatLayer) {
  1275. //
  1276. // parse the string we have obtained, tokenizing it in the process
  1277. //
  1278. // alert('parse');
  1279. checkRadio ('layer', 'None');
  1280. checkCheckbox('chk256color', false);
  1281. checkCheckbox('chk640x480', false);
  1282. checkCheckbox('chkNoThemes', false);
  1283. checkCheckbox('chkLUA', false);
  1284. g_UnknownLayers = '';
  1285. if (sCompatLayer == null) {
  1286. return;
  1287. }
  1288. var re = /\s+/i
  1289. var tokens = sCompatLayer.split(re);
  1290. var i;
  1291. for (i = 0; i < tokens.length; ++i) {
  1292. tok = tokens[i].toUpperCase();
  1293. switch(tok) {
  1294. case 'WIN95':
  1295. case 'NT4SP5':
  1296. case 'WIN98':
  1297. case 'WIN2000':
  1298. case 'WINXP':
  1299. // this item is a check-me shim
  1300. checkRadio('layer', tok);
  1301. break;
  1302. case '256COLOR':
  1303. checkCheckbox('chk256color', true);
  1304. break;
  1305. case '640X480':
  1306. checkCheckbox('chk640x480', true);
  1307. break;
  1308. case 'DISABLETHEMES':
  1309. checkCheckbox('chkNoThemes', true);
  1310. break;
  1311. case 'LUA':
  1312. checkCheckbox('chkLUA', true);
  1313. break;
  1314. default:
  1315. if (g_UnknownLayers.length > 0) {
  1316. g_UnknownLayers += ' ';
  1317. }
  1318. g_UnknownLayers += tok;
  1319. break;
  1320. }
  1321. }
  1322. }
  1323. function ParseCompatLayerForLUA(sCompatLayer) {
  1324. if (sCompatLayer == null || !sCompatLayer.length) {
  1325. return null;
  1326. }
  1327. var re = /\s+/i
  1328. var tokens = sCompatLayer.split(re);
  1329. var i;
  1330. var CompatLayer = '';
  1331. var bLUA = false;
  1332. var rgResult = new Array(2);
  1333. for (i = 0; i < tokens.length; ++i) {
  1334. tok = tokens[i].toUpperCase();
  1335. if (tok == 'LUA') {
  1336. bLUA = true;
  1337. continue;
  1338. }
  1339. if (CompatLayer.length) {
  1340. CompatLayer += ' ';
  1341. }
  1342. CompatLayer += tok;
  1343. }
  1344. //
  1345. // now, this string here will not have a LUA
  1346. //
  1347. rgResult[0] = CompatLayer.length ? CompatLayer : null;
  1348. rgResult[1] = bLUA ? 'LUA' : null;
  1349. return rgResult;
  1350. }
  1351. function UpdateAppShortcut(bStore, sCompatLayer) {
  1352. var CompatLayer = null;
  1353. var CompatLayerMachine = null;
  1354. var TargetApp;
  1355. var AppPath;
  1356. var bSuccess;
  1357. if (bStore) {
  1358. if (sCompatLayer == null) {
  1359. if (g_sCompatLayer != null && g_sCompatLayer.length) {
  1360. CompatLayer = g_sCompatLayer;
  1361. }
  1362. if (g_sCompatLayerMachine != null && g_sCompatLayerMachine.length) {
  1363. CompatLayerMachine = g_sCompatLayerMachine;
  1364. }
  1365. } else {
  1366. //
  1367. // this might have been a compat layer set before
  1368. // so we need to filter out the LUA and move it into the
  1369. // separate category (CompatLayerMachine)
  1370. var rgLayers;
  1371. rgLayers = ParseCompatLayerForLUA(sCompatLayer);
  1372. if (rgLayers != null) {
  1373. CompatLayer = rgLayers[0];
  1374. CompatLayerMachine = rgLayers[1];
  1375. }
  1376. }
  1377. }
  1378. if (g_sPersistPath != null) {
  1379. TargetApp = g_sPersistPath;
  1380. } else {
  1381. AppPath = ExpandSpecialFolders(g_sApplication);
  1382. TargetApp = GetRealPathName(AppPath);
  1383. }
  1384. try {
  1385. bSuccess = g_util.SetItemKeys(TargetApp, CompatLayer, CompatLayerMachine);
  1386. } catch(e) {
  1387. bSuccess = false;
  1388. }
  1389. //
  1390. // alert('setting ' + TargetApp + ' to ' + CompatLayer);
  1391. //
  1392. var SelectProgs = document.all['SelectProgs'];
  1393. // alert('line: ' + g_sCmdLine);
  1394. if (g_sCmdLine != null && g_sCmdLine.length != 0) {
  1395. SelectProgs.UpdateListItem(g_sCmdLine, CompatLayer);
  1396. }
  1397. if (!bSuccess) {
  1398. alert(L_strErrorUpdatingShortcut_ErrorMessage + TargetApp);
  1399. }
  1400. return bSuccess;
  1401. }
  1402. function EnableNext() {
  1403. BlockNextButton(false);
  1404. }
  1405. function onRadioDblClick() {
  1406. onBtnNext();
  1407. }
  1408. function SelectProgs_DblClk(lFlags) {
  1409. //
  1410. // retrieve selection, move on to the next page
  1411. //
  1412. onBtnNext();
  1413. return 0;
  1414. }
  1415. function BrowseProgs_SelectionComplete() {
  1416. //
  1417. // retrieve selection, move on to the next page
  1418. //
  1419. onBtnNext();
  1420. return 0;
  1421. }
  1422. function SelectProgs_ProgramListReady() {
  1423. var btnNext = document.all['btnNext'];
  1424. var progList = document.all['SelectProgs'];
  1425. if (g_nPage == g_cAppProgramListPage) {
  1426. btnNext.disabled = (progList.ItemCount <= 0);
  1427. progList.focus();
  1428. }
  1429. SetProglistAction('Scan');
  1430. g_bProgramsPopulated = true;
  1431. }
  1432. //-->
  1433. </SCRIPT>
  1434. <SCRIPT LANGUAGE=javascript FOR=BrowseProgs EVENT="SelectionComplete()">
  1435. <!--
  1436. BrowseProgs_SelectionComplete();
  1437. //-->
  1438. </SCRIPT>
  1439. <SCRIPT LANGUAGE=javascript FOR=BrowseProgs EVENT="StateChanged(lState)">
  1440. <!--
  1441. // handle state changed for the control
  1442. if (lState == -5) {
  1443. OnBrowseProgsReady();
  1444. g_bAppBrowseProgsInitialized = true;
  1445. }
  1446. //-->
  1447. </SCRIPT>
  1448. <SCRIPT LANGUAGE=javascript FOR=SelectProgs EVENT="DblClk(lFlags)">
  1449. <!--
  1450. SelectProgs_DblClk(lFlags);
  1451. //-->
  1452. </SCRIPT>
  1453. <SCRIPT LANGUAGE=javascript FOR=SelectProgs EVENT="ProgramListReady()">
  1454. <!--
  1455. SelectProgs_ProgramListReady();
  1456. //-->
  1457. </SCRIPT>
  1458. </head>
  1459. <body onLoad="javascript:InitPage()" style="margin-top:2em; margin-left:22px; margin-right:22px">
  1460. <!-- header -->
  1461. <table border=0 cellpadding=0 cellspacing=0 height=100% width=100% style="margin-top:0; margin-bottom:0">
  1462. <tr style="margin-bottom:0em; margin-top:0em">
  1463. <td>
  1464. <div id=loc00 class="sys-font-heading3 sys-rhp-color-title" style="margin-bottom:1em; margin-top:0em">
  1465. Program Compatibility Wizard
  1466. </div>
  1467. </td>
  1468. </tr>
  1469. <tr valign=top height=100%>
  1470. <td>
  1471. <!-- Page 0 - Intro -->
  1472. <Div id=Intro style="height:100%; margin-top:0em; margin-bottom:0em">
  1473. <form name=frmIntro onSubmit='javascript:onBtnNext()' method=post action="">
  1474. <table border=0 cellspacing=0 cellpadding=0 height=100% style="margin-top:0; margin-bottom:0">
  1475. <tr valign=top>
  1476. <td>
  1477. <Div style="height:90%; overflow-y:auto">
  1478. <Div id=loc01 class="sys-font-body-bold sys-color-body" style="margin-bottom:1em; margin-top:0em">
  1479. <b>Welcome to the Program Compatibility Wizard</b>
  1480. </Div>
  1481. <Div id=loc02 class="sys-font-body sys-color-body" style="margin-bottom:2em; margin-top:0em">
  1482. If you are experiencing problems with a program that worked
  1483. correctly on an earlier version of Windows, this wizard helps you
  1484. select and test compatibility settings that may fix those problems.
  1485. </Div>
  1486. <Div id=loc03 class="sys-font-body sys-color-body" style="margin-top:0em">
  1487. <b>Caution:</b> It is recommended that you do not use this wizard for older
  1488. virus detection, backup, or system programs.
  1489. </Div>
  1490. </Div>
  1491. </td>
  1492. </tr>
  1493. <tr style="height:2.5em">
  1494. <td>
  1495. <Div id=loc04 class="sys-font-body sys-color-body" style="vertical-align:bottom; margin-bottom:1em">
  1496. To continue, click Next.
  1497. </Div>
  1498. </td>
  1499. </tr>
  1500. </table>
  1501. </form>
  1502. </Div>
  1503. <!-- Page 1 - App -->
  1504. <DIV id=AppSelectMethod style="height:100%; display:none; overflow-y:auto">
  1505. <form name="frmApp" method="post" onsubmit='javascript:onBtnNext()' enctype="multipart/form-data" action="">
  1506. <TABLE border=0 cellspacing=0 cellpadding=0 width=100%>
  1507. <TR>
  1508. <TD>
  1509. <Div id=loc11 class="sys-font-body-bold sys-color-body" style="margin-bottom:1em; margin-top:0em">
  1510. <b>How do you want to locate the program that you
  1511. would like to run with compatibility settings?</b>
  1512. </Div>
  1513. <Div class="sys-font-body sys-color-body" style="margin-left:0; margin-bottom:1em; margin-top:0em">
  1514. <INPUT CHECKED name=progClass type=radio value=ProgList id=chkProgList ondblclick="javascript:onRadioDblClick()">
  1515. <label id=lblProgList for=chkProgList title="Choose a program from the list" ondblclick="javascript:onRadioDblClick()"
  1516. ACCESSKEY="h">
  1517. I want to c<u>h</u>oose from a list of programs
  1518. </label>
  1519. </Div>
  1520. <Div class="sys-font-body sys-color-body" style="margin-bottom:1em; margin-top:0em">
  1521. <INPUT name=progClass type=radio value=CDProg id=chkCDProg ondblclick="javascript:onRadioDblClick()">
  1522. <label id=lblCDProg for=chkCDProg title="I want to use the program in the CD-ROM drive" ondblclick="javascript:onRadioDblClick()"
  1523. ACCESSKEY="u">
  1524. I want to <u>u</u>se the program in the CD-ROM drive
  1525. </label>
  1526. </Div>
  1527. <Div class="sys-font-body sys-color-body" style="margin-bottom:1em; margin-top:0em">
  1528. <INPUT name=progClass type=radio value=BrowseProg id=chkBrowseProg ondblclick="javascript:onRadioDblClick()">
  1529. <label id=lblBrowseProg for=chkBrowseProg title="Browse for the application" ondblclick="javascript:onRadioDblClick()"
  1530. ACCESSKEY="a">
  1531. I want to loc<u>a</u>te the program manually
  1532. </label>
  1533. </Div>
  1534. </TD>
  1535. </TR>
  1536. </TABLE>
  1537. </form>
  1538. </DIV>
  1539. <!-- Page 2 - AppProgramList -->
  1540. <DIV id=AppProgramList style="display:none; height:100%; margin-top:0em; margin-bottom:0em">
  1541. <form name="frmAppProgramList" method="post" onsubmit='javascript:onBtnNext()' enctype="multipart/form-data" action="">
  1542. <TABLE border=0 cellspacing=0 cellpadding=0 width=100% height=100% style="margin-top:0; margin-bottom:0">
  1543. <TR valign=top>
  1544. <TD>
  1545. <Div style="height:90%; overflow-y:auto">
  1546. <Div id=loc21 class="sys-font-body-bold sys-color-body" style="margin-top:0; margin-bottom:1em">
  1547. <b>Which program do you want to run with compatibility settings?</b>
  1548. </Div>
  1549. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:0em">
  1550. <label id=lblSelectProgs for=SelectProgs title="Select a program"
  1551. ACCESSKEY="S">
  1552. <u>S</u>elect a program:
  1553. </label>
  1554. <div class="sys-font-body sys-color-body" style="margin-top:0.25em; margin-bottom:0em"></div>
  1555. <!-- No accesskey is needed for this object tag - it is complimentary (from the label) -->
  1556. <OBJECT ID=SelectProgs classid=CLSID:B9B7D40C-0C41-4EAF-B0B5-6B41378C7F48 width="100%" height="80%">
  1557. </OBJECT>
  1558. </Div>
  1559. </Div>
  1560. </TD>
  1561. </TR>
  1562. <tr style="height:3em">
  1563. <td>
  1564. <Div id=divProgListAction class="sys-font-body sys-color-body" style="margin-bottom:1em; margin-top:0em">
  1565. <BUTTON value="Action" onclick="javascript:ProgListAction()"
  1566. id=btnProgListAction
  1567. style="width:6em; margin-left:0em; margin-top:0em; margin-bottom:0.5em">
  1568. </BUTTON>
  1569. </Div>
  1570. </td>
  1571. </tr>
  1572. </TABLE>
  1573. </form>
  1574. </DIV>
  1575. <!-- Page 3 - AppBrowseProgs -->
  1576. <DIV id=AppBrowseProgs style="display:none; height=100%; overflow-y:auto">
  1577. <form name="frmAppBrowseProgs" method="post" onsubmit='javascript:onBtnNext()' enctype="multipart/form-data" action="">
  1578. <TABLE border=0 cellspacing=0 cellpadding=0 width=100%>
  1579. <TR>
  1580. <TD valign="top">
  1581. <Div id=loc31 class="sys-font-body-bold sys-color-body" style="margin-top:0; margin-bottom:1em">
  1582. <b>Which program do you want to run with compatibility settings?</b>
  1583. </Div>
  1584. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1585. <label id=lblBrowseProgs for=BrowseProgs
  1586. titile="Type the path to the program shortcut or executable file">
  1587. </label>
  1588. <div class="sys-font-body sys-color-body" style="margin-top:0.25em; margin-bottom:0em"></div>
  1589. <!-- note that the accesskey for the control should match all the accelerators defined in that control
  1590. parameter Accel should be set to match ACCESSKEY
  1591. -->
  1592. <OBJECT ID=BrowseProgs classid=CLSID:66CBC149-A49F-48F9-B17A-6A3EA9B42A87 width="100%" height="30">
  1593. </OBJECT>
  1594. </Div>
  1595. </TD>
  1596. </TR>
  1597. </TBODY>
  1598. </TABLE>
  1599. </form>
  1600. </DIV>
  1601. <!-- Page 4 - FixesLayers -->
  1602. <DIV id=FixesLayers style="display:none; height:100%; overflow-y:auto">
  1603. <form name="frmFixesLayers" method="post" onsubmit='javascript:onBtnNext()' enctype="multipart/form-data" action="">
  1604. <TABLE border=0 cellspacing=0 cellpadding=0 width=100%>
  1605. <TR>
  1606. <TD valign="top">
  1607. <Div id=loc41 class="sys-font-body-bold sys-color-body" style="margin-top:0; margin-bottom:1em">
  1608. <b>Select a compatibility mode for the program</b>
  1609. </Div>
  1610. <Div id=loc42 class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1611. Choose the operating system that is recommended for this program,
  1612. or that previously supported the program correctly:
  1613. </Div>
  1614. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1615. <INPUT CHECKED name=layer type=radio value=WIN95 id=chkWin95 ondblclick="javascript:onRadioDblClick()">
  1616. <label id=lblWIN95 for=chkWin95 ondblclick="javascript:onRadioDblClick()"
  1617. title="Set to run under Windows 95 compatibility mode" ACCESSKEY="5">
  1618. Microsoft Windows 9<u>5</u>
  1619. </label>
  1620. </Div>
  1621. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1622. <INPUT name=layer type=radio value=NT4SP5 id=chkNT4SP5 ondblclick="javascript:onRadioDblClick()">
  1623. <label id=lblNT4SP5 for=chkNT4SP5 ondblclick="javascript:onRadioDblClick()"
  1624. title="Set to run under NT4 Service pack 5 compatibility mode" ACCESSKEY="T">
  1625. Microsoft Windows N<u>T</u> 4.0 (Service Pack 5)
  1626. </label>
  1627. </Div>
  1628. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1629. <INPUT name=layer type=radio value=WIN98 id=chkWin98 ondblclick="javascript:onRadioDblClick()">
  1630. <label id=lblWIN98 for=chkWin98 ondblclick="javascript:onRadioDblClick()"
  1631. title="Set to run under Windows 98/Windows Me compatibility mode" ACCESSKEY="8">
  1632. Microsoft Windows 9<u>8</u> / Windows Me
  1633. </label>
  1634. </Div>
  1635. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1636. <INPUT name=layer type=radio value=WIN2000 id=chkWin2000 ondblclick="javascript:onRadioDblClick()">
  1637. <label id=lblWIN2000 for=chkWin2000 ondblclick="javascript:onRadioDblClick()"
  1638. title="Set to run under Windows 2000 compatibility mode" ACCESSKEY="2">
  1639. Microsoft Windows <u>2</u>000
  1640. </label>
  1641. </Div>
  1642. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1643. <INPUT name=layer type=radio value=WINXP id=chkWinXP ondblclick="javascript:onRadioDblClick()">
  1644. <label id=lblWINXP for=chkWinXP ondblclick="javascript:onRadioDblClick()"
  1645. title="Set to run under Windows XP compatibility mode" ACCESSKEY="X">
  1646. Microsoft Windows <u>X</u>P
  1647. </label>
  1648. </Div>
  1649. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:0em">
  1650. <INPUT name=layer type=radio value=None id=chkNoLayer ondblclick="javascript:onRadioDblClick()">
  1651. <label id=lblNone for=chkNoLayer ondblclick="javascript:onRadioDblClick()"
  1652. title="Do not apply a compatibility mode" ACCESSKEY="D">
  1653. <u>D</u>o not apply a compatibility mode
  1654. </label>
  1655. </Div>
  1656. </TD>
  1657. </TR>
  1658. </TABLE>
  1659. </form>
  1660. </DIV>
  1661. <!-- Page 5 - FixesOther -->
  1662. <DIV id=FixesOther style="height:100%; display:none; overflow-y:auto">
  1663. <form name="frmFixesOther" method="post" onsubmit='javascript:onBtnNext()' enctype="multipart/form-data" action="">
  1664. <TABLE border=0 cellspacing=0 cellpadding=0 width=100%>
  1665. <TR>
  1666. <TD valign="top">
  1667. <Div id=loc51 class="sys-font-body-bold sys-color-body" style="margin-top:0; margin-bottom:1em">
  1668. <b>Select display settings for the program</b>
  1669. </Div>
  1670. <Div id=loc52 class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1671. Choose the settings that are recommended for this program,
  1672. or that previously supported the program correctly:
  1673. </Div>
  1674. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1675. <INPUT type=checkbox name=chk256color id=chk256color value="256COLOR" >
  1676. <label id=lbl256COLOR for=chk256color title="Run program in 256 colors mode"
  1677. ACCESSKEY="R">
  1678. 256 colo<u>r</u>s
  1679. </LABEL>
  1680. </Div>
  1681. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1682. <INPUT type=checkbox name=chk640x480 id=chk640x480 value="640X480" >
  1683. <label id=lbl640X480 for=chk640x480 title="Run program in 640 x 480 screen resolution"
  1684. ACCESSKEY="s">
  1685. 640 x 480 <u>s</u>creen resolution
  1686. </LABEL>
  1687. </Div>
  1688. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1689. <INPUT type=checkbox name=chkNoThemes id=chkNoThemes value="DISABLETHEMES" >
  1690. <label id=lblDISABLETHEMES for=chkNoThemes title="Disable visual themes"
  1691. ACCESSKEY="D">
  1692. <u>D</u>isable visual themes
  1693. </LABEL>
  1694. <div id=loc53 class="sys-font-body sys-color-body" style="margin-left:2em; margin-top:0em; margin-bottom:0em">
  1695. Try this option if you are experiencing problems with menus or buttons
  1696. on the title bar of the program.
  1697. </div>
  1698. </Div>
  1699. </TD>
  1700. </TR>
  1701. </TABLE>
  1702. </form>
  1703. </DIV>
  1704. <!-- Page 6 - FixesLUA -->
  1705. <DIV id=FixesLUA style="height:100%; display:none; overflow-y:auto">
  1706. <form name="frmFixesOther" method="post" onsubmit='javascript:onBtnNext()' enctype="multipart/form-data" action="">
  1707. <TABLE border=0 cellspacing=0 cellpadding=0 width=100%>
  1708. <TR>
  1709. <TD valign="top">
  1710. <Div id=loc61 class="sys-font-body-bold sys-color-body" style="margin-top:0; margin-bottom:1em">
  1711. <b>Select user account privileges</b>
  1712. </Div>
  1713. <Div id=loc62 class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1714. If you are receiving access denied errors or cannot
  1715. start the program, select the check box.
  1716. </Div>
  1717. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1718. <INPUT type=checkbox name=chkLUA id=chkLUA value="LUA">
  1719. <label id=lblLUA for=chkLUA title="Simulate administrative privileges"
  1720. ACCESSKEY="A">
  1721. <u>A</u>llow non-administrators to run this program
  1722. </label>
  1723. <div id=loc63 class="sys-font-body sys-color-body" style="margin-left:2em; margin-top:0em; margin-bottom:0em">
  1724. Redirects program data to unrestricted locations so that users
  1725. without administrator accounts can use the program.
  1726. </div>
  1727. </Div>
  1728. </TD>
  1729. </TR>
  1730. </TABLE>
  1731. </form>
  1732. </DIV>
  1733. <!-- Page 7 - Run -->
  1734. <DIV id=Run style="height:100%; display:none; margin-top:0em; margin-bottom:0em">
  1735. <form name="frmRun" onSubmit="javascript:onBtnNext()" action="" method=post>
  1736. <TABLE border=0 cellPadding=0 cellSpacing=0 width=100% height=100% style="margin-top=0; margin-bottom:0">
  1737. <TR>
  1738. <TD valign="top">
  1739. <Div style="height:100%; overflow-y:auto">
  1740. <Div id=loc71 class="sys-font-body-bold sys-color-body" style="margin-top:0; margin-bottom:1em">
  1741. <b>Test your compatibility settings</b>
  1742. </Div>
  1743. <Div id=loc72 class="sys-font-body-bold sys-color-body" style="margin-top:0; margin-bottom:1em">
  1744. <b>Program name or path:</b>
  1745. </Div>
  1746. <Div id="divTargetApp" class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em; margin-left:1em"></Div>
  1747. <Div id=loc73 class="sys-font-body-bold sys-color-body" style="margin-top:0; margin-bottom:1em">
  1748. <b>Compatibility settings to apply:</b>
  1749. </Div>
  1750. <Div id="divCompatLayer" class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:2em; margin-left:1em"></div>
  1751. </Div>
  1752. </TD>
  1753. </TR>
  1754. <TR style="height=6em">
  1755. <TD>
  1756. <Div class="sys-font-body sys-color-body" style="vertical-align:bottom; margin-top:0; margin-bottom:1em">
  1757. <Div id=loc74 class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1758. To test the program with the new compatibility settings, click Next.
  1759. </Div>
  1760. <Div id=loc75 class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:0em">
  1761. After verifying whether the program worked correctly, return to this wizard.
  1762. </Div>
  1763. </Div>
  1764. </TD>
  1765. </TR>
  1766. </TABLE>
  1767. </form>
  1768. </DIV>
  1769. <!-- Page 8 - Update -->
  1770. <DIV id=Update style="height:100%; display:none; overflow-y:auto; margin-top:0em; margin-bottom:0em">
  1771. <form name="frmUpdate" method="post" onSubmit='javascript:onBtnNext()' action="">
  1772. <TABLE border=0 cellPadding=0 cellSpacing=0 width=100%>
  1773. <TR>
  1774. <TD valign="top">
  1775. <Div id=loc81 class="sys-font-body-bold sys-color-body" style="margin-top:0; margin-bottom:1em">
  1776. <b>Did the program work correctly?</b>
  1777. </Div>
  1778. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1779. <input name="UpdateShortcut" type="radio" value="Yes" CHECKED id=chkYes ondblclick="javascript:onRadioDblClick()">
  1780. <label id=lblYes for=chkYes title="Yes, set this program to always use these compatibility settings" ondblclick="javascript:onRadioDblClick()"
  1781. ACCESSKEY="Y">
  1782. <u>Y</u>es, set this program to always use these compatibility settings
  1783. </label>
  1784. </Div>
  1785. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1786. <input name="UpdateShortcut" type="radio" value="TryOther" id=chkTryOther ondblclick="javascript:onRadioDblClick()">
  1787. <label id=lblTryOther for=chkTryOther title="No. Try different compatibility settings" ondblclick="javascript:onRadioDblClick()"
  1788. ACCESSKEY="D">
  1789. No, try <u>d</u>ifferent compatibility settings
  1790. </label>
  1791. </Div>
  1792. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:2em">
  1793. <input name="UpdateShortcut" type="radio" value="No" id=chkNo ondblclick="javascript:onRadioDblClick()">
  1794. <label id=lblNo for=chkNo title="No, go to the end of this wizard" ondblclick="javascript:onRadioDblClick()"
  1795. ACCESSKEY="F">
  1796. No, I am <u>f</u>inished trying compatibility settings
  1797. </label>
  1798. </Div>
  1799. <Div id=MediaWarning class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em"></div>
  1800. </TD>
  1801. </TR>
  1802. </TABLE>
  1803. </form>
  1804. </DIV>
  1805. <!-- Page 9 - Compatibility Data -->
  1806. <DIV id=CompatibilityData style="height:100%; display:none; margin-top:0em; margin-bottom:0em">
  1807. <form name="frmCompatData" method="post" onSubmit='javascript:onBtnNext()' action="">
  1808. <TABLE border=0 cellPadding=0 cellSpacing=0 width=100% height=100%>
  1809. <TR>
  1810. <TD valign="top">
  1811. <Div id=cwBody style="height:90%; overflow-y:auto">
  1812. <Div id=loc91 class="sys-font-body-bold sys-color-body" style="margin-top:0; margin-bottom:1em">
  1813. <b>Program Compatibility Data</b>
  1814. </Div>
  1815. <Div id=loc92 class="sys-font-body sys-color-body" style="margin-top:0em; margin-bottom:1em; margin-left:0">
  1816. Microsoft has created temporary files that contain information about the settings you selected
  1817. and whether the problems were fixed. Sending this information to Microsoft will help us improve
  1818. program compatibility.
  1819. </Div>
  1820. <Div id=loc93 class="sys-font-body sys-color-body" style="margin-top:0em; margin-bottom:1em; margin-left:0">
  1821. Would you like to send this information to Microsoft?
  1822. </Div>
  1823. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1824. <INPUT name=UploadInfo type=radio value=Yes id=chkUploadInfo onclick="javascript:EnableNext()">
  1825. <label id=lblUploadInfo for=chkUploadInfo
  1826. title="Yes, send this information to Microsoft"
  1827. ACCESSKEY="Y">
  1828. <U>Y</U>es
  1829. </label>
  1830. </Div>
  1831. <Div class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1832. <INPUT name=UploadInfo type=radio value=No id=chkNoUploadInfo onclick="javascript:EnableNext()">
  1833. <label id=lblNoUploadInfo for=chkNoUploadInfo
  1834. title="No, Do not send this information to Microsoft"
  1835. ACCESSKEY="o">
  1836. N<U>o</U>
  1837. </label>
  1838. </Div>
  1839. <Div id=loc94 class="sys-font-body sys-color-body" style="margin-top:0em; margin-bottom:1em; margin-left:0">
  1840. The information will be treated anonymously and confidentially per
  1841. <a target="_new" href="http://go.microsoft.com/fwlink/?LinkId=825">our data collection policy</a> on the the Web.
  1842. </Div>
  1843. <Div id=loc95 class="sys-font-body sys-color-body" style="margin-top:0em; margin-bottom:1em; margin-left:0">
  1844. <a href="javascript:ViewTempFileList();">See the temporary files that would be sent</a>
  1845. </Div>
  1846. </Div>
  1847. </TD>
  1848. </TR>
  1849. </TABLE>
  1850. </form>
  1851. </DIV>
  1852. <!-- Page 10 - Finish -->
  1853. <DIV id=CompleteWizard style="height:100%; display:none; margin-top:0em; margin-bottom:0em">
  1854. <form name="frmCompleteWizard" method="post" onSubmit='javascript:onBtnNext()' action="">
  1855. <TABLE border=0 cellPadding=0 cellSpacing=0 width=100% height=100%>
  1856. <TR>
  1857. <TD valign="top">
  1858. <Div id=cwBody style="height:90%; overflow-y:auto">
  1859. <Div id=loc101 class="sys-font-body-bold sys-color-body" style="margin-top:0; margin-bottom:1em">
  1860. <b>Completing the Program Compatibility Wizard</b>
  1861. </Div>
  1862. <Div id="divCompatSettings" class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:2em"></Div>
  1863. <Div id=loc102 class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1864. To readjust or remove compatibility settings, run this wizard again.
  1865. </Div>
  1866. </Div>
  1867. </TD>
  1868. </TR>
  1869. <TR style="height:2.5em">
  1870. <TD>
  1871. <Div id=loc103 class="sys-font-body sys-color-body" style="vertical-align:bottom; margin-top:0; margin-bottom:1em">
  1872. To close this wizard, click Finish.
  1873. </Div>
  1874. </TD>
  1875. </TR>
  1876. </TABLE>
  1877. </form>
  1878. </DIV>
  1879. <!-- Page 11 - Compat Wizard Disabled -->
  1880. <DIV id=CompatWizardDisabled style="height:100%; display:none; margin-top:0em; margin-bottom:0em">
  1881. <form name="frmCompleteWizard" method="post" onSubmit='javascript:onBtnNext()' action="">
  1882. <TABLE border=0 cellPadding=0 cellSpacing=0 width=100% height=100%>
  1883. <TR>
  1884. <TD valign="top">
  1885. <Div id=cwBody style="height:90%; overflow-y:auto">
  1886. <Div id=loc111 class="sys-font-body-bold sys-color-body" style="margin-top:0; margin-bottom:1em">
  1887. <b>This wizard is not available</b>
  1888. </Div>
  1889. <Div id=loc112 class="sys-font-body sys-color-body" style="margin-top:0; margin-bottom:1em">
  1890. The Program Compatibility Wizard has been disabled.
  1891. For more information, contact your system administrator.
  1892. </Div>
  1893. </Div>
  1894. </TD>
  1895. </TR>
  1896. <TR style="height:2.5em">
  1897. <TD>
  1898. <Div id=loc113 class="sys-font-body sys-color-body" style="vertical-align:bottom; margin-top:0; margin-bottom:1em">
  1899. To close this wizard, click Cancel.
  1900. </Div>
  1901. </TD>
  1902. </TR>
  1903. </TABLE>
  1904. </form>
  1905. </DIV>
  1906. </td>
  1907. </tr>
  1908. <tr style="height:3em" valign=top>
  1909. <td>
  1910. <hr>
  1911. <form name="frmNav" method="post" onsubmit='javascript:onBtnNext()'>
  1912. <p align="right">
  1913. <BUTTON id=btnBack value="Back" onclick="javascript:onBtnBack()" name="btnBack" style="width:6em; margin-left:0em; margin-right:0.5em; margin-top:0em"></BUTTON>
  1914. <BUTTON id=btnNext type="Submit" value="Next" onclick="javascript:onBtnNext()" name="btnNext" style="width:6em; margin-left:0.5em; margin-right:0.5em; margin-top:0em"></BUTTON>
  1915. <BUTTON id=btnCancel value="Cancel" onclick="javascript:onBtnCancel()" name="btnCancel" style="width:6em; margin-left:0.5em; margin-right:0em; margin-top:0em"></BUTTON>
  1916. </p>
  1917. </form>
  1918. </TD>
  1919. </TR>
  1920. </TABLE>
  1921. </body>
  1922. </HTML>