Source code of Windows XP (NT5)
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.

562 lines
12 KiB

  1. <HTML>
  2. <HEAD>
  3. <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
  4. <TITLE>Content Feedback</TITLE>
  5. </HEAD>
  6. <OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
  7. <LINK ID=Stylesheet_Ref1 href="css/PCHealth.css" rel=STYLESHEET type=text/css>
  8. <LINK ID=Stylesheet_Ref2 href="css/Viewer.css" rel=STYLESHEET type=text/css>
  9. <SCRIPT LANGUAGE=javascript>
  10. var aDesktopApp = [
  11. "Accessibility",
  12. "Add New Hardware",
  13. "Add/Remove Programs",
  14. "Automatic Updates",
  15. "Calculator",
  16. "Control Panel",
  17. "Date/Time",
  18. "Display",
  19. "Dial-Up Networking",
  20. "File and Folder Management",
  21. "Gaming Options",
  22. "Getting Started",
  23. "HelpCenter",
  24. "Imaging",
  25. "Internet Options",
  26. "Internet Explorer",
  27. "Keyboard",
  28. "Modems",
  29. "Mouse",
  30. "Netmeeting",
  31. "Notepad",
  32. "Outlook Express",
  33. "Paint",
  34. "Power Options",
  35. "Printers",
  36. "Regional Settings",
  37. "Scanners and Cameras",
  38. "Scheduled Tasks",
  39. "Search",
  40. "System",
  41. "System Restore",
  42. "Taskbar and Start Menu",
  43. "Telephony",
  44. "User Accounts",
  45. "Windows Media Player",
  46. "Windows Movie Maker",
  47. "Wordpad",
  48. "END"
  49. ];
  50. var aServerApp = [
  51. "Accessibilities",
  52. "ACME Setup",
  53. "Active Setup",
  54. "ADC",
  55. "Agent",
  56. "Canon",
  57. "CDO",
  58. "CFM/Cannon/Ricoh/ Scanner",
  59. "CMAK",
  60. "Com+",
  61. "Compatibility Details",
  62. "Core",
  63. "CTMA/Comtrol",
  64. "DEV Webadmin NNTP Help",
  65. "DEV Wedadmin SMTP Help",
  66. "Digi International",
  67. "DirectX 7.0",
  68. "Discover Tour",
  69. "DOS Help",
  70. "DPA Auth Package",
  71. "Drivers",
  72. "DSM",
  73. "Eicon",
  74. "Epson",
  75. "Equinox",
  76. "Exchange Intro (in win toc)",
  77. "Front page",
  78. "FrontPage Server Extensions -snap in",
  79. "Fujitsu",
  80. "FX!32",
  81. "FX!33",
  82. "Group Policy Editor",
  83. "HCL",
  84. "Hewlitt-Packard helpfile",
  85. "IBM Trackpoint",
  86. "IBM/Unimodem",
  87. "IE Browser",
  88. "IE Eula (license agreement)",
  89. "IE Technical Support",
  90. "IIS",
  91. "Indexing Service",
  92. "Inoculan",
  93. "Internet Connection Wizard",
  94. "Java Permissions",
  95. "Java Security",
  96. "Java VM",
  97. "Kodak DC120",
  98. "Kodak DC200",
  99. "Kodak DC25",
  100. "Lexmark",
  101. "MDAC",
  102. "Media Player",
  103. "Microgate/WAN",
  104. "Microtek",
  105. "MMC Core",
  106. "MS Chat",
  107. "MSMQ",
  108. "MSN",
  109. "MSReport",
  110. "MTS",
  111. "Multimedia",
  112. "NetMeeting 3.0",
  113. "NetMeeting/Intel Connection Advisor S/W",
  114. "Network Monitor",
  115. "NNTP - snap-in",
  116. "NNTP documentation",
  117. "Not in 2000.3",
  118. "ODBC Desktop Database Drivers 3.5 (Jet)/Core",
  119. "ODBC Desktop Database Drivers 3.6/Core",
  120. "ODBC for Oracle/Core",
  121. "ODBC/Core",
  122. "OLE DB/Core",
  123. "Outlook Express",
  124. "Peer/Comtrol",
  125. "Portmon/Comtrol",
  126. "Printing",
  127. "Radius",
  128. "RAS/Routing",
  129. "Ratings",
  130. "Readme",
  131. "Release Notes",
  132. "Scripting",
  133. "Security",
  134. "Setup",
  135. "Shell",
  136. "Shell Help",
  137. "SMTP",
  138. "SMTP documentation",
  139. "SMTP snap-in",
  140. "SQL",
  141. "SQL & ODBC",
  142. "SQL Server Client Configuration",
  143. "SQL/Oracle",
  144. "Stallion",
  145. "Storm",
  146. "SW",
  147. "TTS/Speech API",
  148. "UI",
  149. "UMAX",
  150. "Under Investigation",
  151. "Unimodem",
  152. "User Settings",
  153. "Visual FoxPro",
  154. "VSS/Comtrol",
  155. "Wallet",
  156. "WCOM/Comtrol",
  157. "Web Publishing Wizard",
  158. "WebAdmin",
  159. "Webadmin NNTP Help",
  160. "Wedadmin SMTP Help",
  161. "Win2KDev",
  162. "Win32 Client",
  163. "Win9x Client",
  164. "Windows Media Services",
  165. "Windows Update",
  166. "Xerox",
  167. "END"
  168. ];
  169. var aConsumerApp = aDesktopApp;
  170. var aProfessionalApp = aDesktopApp;
  171. var aServerApp = aServerApp;
  172. var aAdvancedServerApp = aServerApp;
  173. var aDataCenterApp = aServerApp;
  174. var UL_MODE_BACKGROUND = 0x00000000;
  175. var UL_MODE_FOREGROUND = 0x00000001;
  176. var DATASPEC_FILE = "\\pchealth\\helpctr\\config\\feedback.xml"
  177. var SAVE_FILE = "\\temp\\result.xml"
  178. function VerifyForm()
  179. {
  180. var ErrorString = "";
  181. //
  182. // Verify the first question
  183. //
  184. if (document.feedback.betaid.value == "")
  185. {
  186. ErrorString += "Please provide us with a Beta ID.\n";
  187. }
  188. //
  189. // Verify the second question
  190. //
  191. if (document.feedback.emailadd.value == "")
  192. {
  193. ErrorString += "Please provide us with an email.\n";
  194. }
  195. //
  196. // Verify the third question
  197. //
  198. if (!document.feedback.answer[0].checked &&
  199. !document.feedback.answer[1].checked &&
  200. !document.feedback.answer[2].checked)
  201. {
  202. ErrorString += "Please tell us if the information answered your question.\n";
  203. }
  204. //
  205. // Verify the fourth question
  206. //
  207. if (!document.feedback.find[0].checked &&
  208. !document.feedback.find[1].checked &&
  209. !document.feedback.find[2].checked)
  210. {
  211. ErrorString += "Please tell us if the information was easy to find.\n";
  212. }
  213. if (ErrorString == "")
  214. {
  215. return true;
  216. }
  217. else
  218. {
  219. alert("We are missing some information :\n\n" + ErrorString);
  220. return false;
  221. }
  222. }
  223. function DataUploadProgress(DataUploadPtr, done, total)
  224. {
  225. document.all.Progress.innerHTML = "Uploading data : " + (done / total) * 100 + "% done";
  226. }
  227. function DataUploadStatusChange(job, status)
  228. {
  229. var strStatus;
  230. switch(job.status)
  231. {
  232. case 0 : strStatus = "Not Active"; break;
  233. case 1 : strStatus = "Active"; break;
  234. case 2 : strStatus = "Suspended"; break;
  235. case 3 : strStatus = "Transmitting"; break;
  236. case 4 : strStatus = "Aborted"; break;
  237. case 5 : strStatus = "Failed"; break;
  238. case 6 : strStatus = "Completed"; break;
  239. case 7 : strStatus = "Deleted"; break;
  240. };
  241. document.all.Progress.innerHTML = "Status : " + strStatus;
  242. }
  243. function DataCollectionComplete(DataCollectionPtr, hresult)
  244. {
  245. var oFSO;
  246. var oIncident;
  247. var oDict;
  248. var folderWindir;
  249. var strDataspec;
  250. var oResultFile;
  251. var oUL;
  252. var oJob;
  253. //
  254. // check if there is an error
  255. //
  256. if ((hresult != 0) || (DataCollectionPtr.Status != 3))
  257. {
  258. var ErrMsg;
  259. ErrMsg = "Error while collecting data : " + hresult + "\n";
  260. switch (DataCollectionPtr.Status)
  261. {
  262. case 0 : ErrMsg += "Not Active"; break;
  263. case 1 : ErrMsg += "Collecting"; break;
  264. case 2 : ErrMsg += "Failed"; break;
  265. case 4 : ErrMsg += "No Delta"; break;
  266. case 5 : ErrMsg += "Comparing"; break;
  267. }
  268. alert(ErrMsg);
  269. return;
  270. }
  271. //
  272. // Create the incident object
  273. //
  274. oIncident = pchealth.CreateObject_Incident();
  275. //
  276. // Save the machine data
  277. //
  278. oIncident.MachineSnapshot = DataCollectionPtr.MachineData_GetStream();
  279. //
  280. // Save the session information
  281. //
  282. var temp = pchealth.HelpSession.VisitedHelpPages(0);
  283. oIncident.SelfHelpTrace = pchealth.HelpSession.VisitedHelpPages(0);
  284. //
  285. // Get the dictionary object
  286. //
  287. oDict = oIncident.Misc
  288. //
  289. // Save the beta id or email name
  290. //
  291. oDict.Add("BetaID", document.feedback.betaid.value);
  292. //
  293. // Save the answer question
  294. //
  295. if (document.feedback.answer[0].checked)
  296. oDict.Add("AnswerQuestion", "YES");
  297. else if (document.feedback.answer[1].checked)
  298. oDict.Add("AnswerQuestion", "NO");
  299. else if (document.feedback.answer[2].checked)
  300. oDict.Add("AnswerQuestion", "DOESNOTAPPLY");
  301. oDict.Add("AnswerQuestionComment", document.feedback.answercomment.value);
  302. //
  303. // Save the easy to find question
  304. //
  305. if (document.feedback.answer[0].checked)
  306. oDict.Add("FindQuestion", "YES");
  307. else if (document.feedback.answer[1].checked)
  308. oDict.Add("FindQuestion", "NO");
  309. else if (document.feedback.answer[2].checked)
  310. oDict.Add("FindQuestion", "IDONTKNOW");
  311. oDict.Add("FindQuestionComment", document.feedback.findcomment.value);
  312. //
  313. // Save the SKU
  314. //
  315. oDict.Add("MachineSKU", pchealth.UserSettings.MachineSKU);
  316. oDict.Add("CurrentSKU", pchealth.UserSettings.CurrentSKU);
  317. //
  318. // Save the language
  319. //
  320. oDict.Add("MachineLang", pchealth.UserSettings.MachineLanguage);
  321. oDict.Add("CurrentLang", pchealth.UserSettings.CurrentLanguage);
  322. //
  323. // Save the application
  324. //
  325. oDict.Add("Application", document.feedback.application.value);
  326. //
  327. // Save the HelpCtr build
  328. //
  329. oDict.Add("HCBUILDNUM", "Undefined");
  330. //
  331. // Save the blob
  332. //
  333. oFSO = new ActiveXObject("Scripting.FileSystemObject");
  334. folderWindir = oFSO.GetSpecialFolder(0);
  335. strDataspec = folderWindir.Path + SAVE_FILE;
  336. pchealth.CopyStreamToFile(strDataspec, oIncident.GetXMLAsStream());
  337. //
  338. // create the upload library
  339. //
  340. oUL = new ActiveXObject( "UploadManager.MPCUpload" );
  341. //
  342. // Create a job
  343. //
  344. oJob = oUL.CreateJob();
  345. oJob.Sig = ""; // Generate ID automatically.
  346. oJob.Server = "http://lameerror/hclame/uploadserver.dll";
  347. oJob.ProviderID = "hclame";
  348. oJob.Mode = UL_MODE_FOREGROUND;
  349. // oJob.Mode = UL_MODE_BACKGROUND;
  350. // oJob.History = 2; // 2 = Keep Log and Data
  351. oJob.Compressed = false;
  352. oJob.PersistToDisk = true;
  353. oJob.GetDataFromFile( strDataspec );
  354. oJob.onStatusChange = DataUploadStatusChange;
  355. oJob.onProgressChange = DataUploadProgress;
  356. //
  357. // Upload it
  358. //
  359. oJob.ActivateAsync();
  360. }
  361. function DataCollectionProgress(DataCollectionPtr, done, total)
  362. {
  363. document.all.Progress.innerHTML = "Collecting data : " + (done / total) * 100 + "% done";
  364. }
  365. function CollectSystemInfo()
  366. {
  367. var oFSO;
  368. var folderWindir;
  369. var strDataspec;
  370. var oDC;
  371. // Create the file system object
  372. oFSO = new ActiveXObject("Scripting.FileSystemObject");
  373. // Locate the dataspec file
  374. folderWindir = oFSO.GetSpecialFolder(0);
  375. strDataspec = folderWindir.Path + DATASPEC_FILE;
  376. // Create the data collection object and collect the data
  377. oDC = pchealth.CreateObject_DataCollection();
  378. oDC.MachineData_Dataspec = strDataspec;
  379. oDC.onComplete = DataCollectionComplete;
  380. oDC.onProgress = DataCollectionProgress;
  381. oDC.ExecuteASync();
  382. }
  383. function SubmitFeedback()
  384. {
  385. if (VerifyForm())
  386. {
  387. //
  388. // Save the email and beta id
  389. //
  390. WshShell.RegWrite("HKCU\\Software\\Microsoft\\PCHealth\\HelpCtr\\UserSettings\\HelpComments\\BetaID", document.feedback.betaid.value);
  391. WshShell.RegWrite("HKCU\\Software\\Microsoft\\PCHealth\\HelpCtr\\UserSettings\\HelpComments\\Email", document.feedback.emailadd.value);
  392. //
  393. // Collect the system information
  394. //
  395. CollectSystemInfo();
  396. }
  397. }
  398. function AddApps(aAppArray)
  399. {
  400. var iIndex;
  401. // Empty the list
  402. document.feedback.application.length = 0;
  403. // Add the new items
  404. for(iIndex = 0; aAppArray[iIndex] != "END"; iIndex++)
  405. {
  406. var newElem = document.createElement("OPTION");
  407. newElem.text = aAppArray[iIndex];
  408. newElem.value = aAppArray[iIndex];
  409. document.feedback.application.add(newElem);
  410. }
  411. }
  412. function Consumer()
  413. {
  414. AddApps(aConsumerApp);
  415. }
  416. function Professional()
  417. {
  418. AddApps(aProfessionalApp);
  419. }
  420. function Server()
  421. {
  422. AddApps(aServerApp);
  423. }
  424. function AdvancedServer()
  425. {
  426. AddApps(aAdvancedServerApp);
  427. }
  428. function DataCenter()
  429. {
  430. AddApps(aDataCenterApp);
  431. }
  432. </SCRIPT>
  433. <BODY>
  434. <FONT FACE="ARIAL" size=2 color=navy>
  435. <H2>Help Center Feedback</H2>
  436. <form NAME="feedback">
  437. <P>
  438. <STRONG>1. Beta ID</STRONG>
  439. <INPUT id=betaid name=betaid>
  440. </P>
  441. <P>
  442. <STRONG>2. Email Address </STRONG>
  443. <INPUT id=emailadd name=emailadd>
  444. </P>
  445. <P>
  446. <STRONG>3. Did the information in this article help answer your question?</STRONG><BR>
  447. <INPUT name="answer" type=radio>Yes
  448. <INPUT name="answer" type=radio>No
  449. <INPUT name="answer" type=radio>Does not apply<BR>
  450. Comments :<BR><TEXTAREA name=answercomment style="HEIGHT: 127px; WIDTH: 356px"></TEXTAREA>
  451. </P>
  452. <P>
  453. <STRONG>4. Was this topic easy to find?</STRONG><BR>
  454. <INPUT name="find" type=radio>Yes
  455. <INPUT name="find" type=radio>No
  456. <INPUT name="find" type=radio>I don't know<BR>
  457. Comments :<BR><TEXTAREA name=findcomment style="HEIGHT: 127px; WIDTH: 356px"></TEXTAREA>
  458. </P>
  459. <P>
  460. <STRONG>5. Which application does this feedback apply to?</STRONG>
  461. </P>
  462. <P>
  463. <STRONG><SELECT name=application style="HEIGHT: 22px; WIDTH: 211px">
  464. </SELECT>
  465. </P>
  466. <div id=Progress >
  467. <P>
  468. <INPUT id=submit1 name=submit1 type=button value="Submit Feedback" onclick="SubmitFeedback()">
  469. </P>
  470. </form></DIV></STRONG>
  471. <SCRIPT language=jscript>
  472. //
  473. // Populate the form with the previously saved betaid and email address
  474. //
  475. var WshShell = new ActiveXObject("WScript.Shell");
  476. try
  477. {
  478. document.feedback.betaid.value = WshShell.RegRead("HKCU\\Software\\Microsoft\\PCHealth\\HelpCtr\\UserSettings\\HelpComments\\BetaID");
  479. document.feedback.emailadd.value = WshShell.RegRead("HKCU\\Software\\Microsoft\\PCHealth\\HelpCtr\\UserSettings\\HelpComments\\Email");
  480. }
  481. catch(e)
  482. {
  483. WshShell.RegWrite("HKCU\\Software\\Microsoft\\PCHealth\\HelpCtr\\UserSettings\\HelpComments\\BetaID", "");
  484. WshShell.RegWrite("HKCU\\Software\\Microsoft\\PCHealth\\HelpCtr\\UserSettings\\HelpComments\\Email", "");
  485. }
  486. //
  487. // Populate the app drop down list based on the user's current SKU
  488. //
  489. if (pchealth.UserSettings.CurrentSKU == "Personal" || pchealth.UserSettings.CurrentSKU == "Personal_64")
  490. Consumer();
  491. else if (pchealth.UserSettings.CurrentSKU == "Professional" || pchealth.UserSettings.CurrentSKU == "Professional_64")
  492. Professional();
  493. else if (pchealth.UserSettings.CurrentSKU == "Server" || pchealth.UserSettings.CurrentSKU == "Server_64")
  494. Server();
  495. else if (pchealth.UserSettings.CurrentSKU == "AdvServer" || pchealth.UserSettings.CurrentSKU == "AdvServer_64")
  496. AdvancedServer();
  497. else if (pchealth.UserSettings.CurrentSKU == "DataCenter" || pchealth.UserSettings.CurrentSKU == "DataCenter_64")
  498. DataCenter();
  499. </SCRIPT>
  500. </BODY>
  501. </HTML>