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.

41 lines
1.2 KiB

  1. function PageInit()
  2. {
  3. var szName = top.window.GetUserDisplayName(top.window.g_oSelectedUser);
  4. idPageTitle.innerHTML = idPageTitle.innerHTML.replace(/%1/g, szName);
  5. var szTaskTitle = idTaskTitle.innerHTML;
  6. if (top.window.g_bDeleteFiles)
  7. {
  8. idPageSubtitle.style.display = 'none';
  9. szTaskTitle = idAltTaskTitle.innerHTML;
  10. }
  11. idTaskTitle.innerHTML = szTaskTitle.replace(/%1/g, szName);
  12. // Set initial default to "No, keep account"
  13. idCancel.focus();
  14. }
  15. function DeleteUser()
  16. {
  17. var szBackupFolder = null;
  18. var oUser = top.window.g_oSelectedUser;
  19. if (oUser)
  20. {
  21. if (!top.window.g_bDeleteFiles)
  22. {
  23. // Build the destination folder path for saving files
  24. szBackupFolder = top.window.GetShell().Namespace(16).Self.path; // CSIDL_DESKTOPDIRECTORY
  25. }
  26. // Delete the user account
  27. top.window.g_oUserList.remove(oUser.setting("LoginName"), szBackupFolder);
  28. }
  29. top.window.g_oSelectedUser = null;
  30. top.window.g_bDeleteFiles = false;
  31. // Go all the way back to the start page, and cut the nav history.
  32. top.window.g_Navigator.navigate("mainpage2.htm", true);
  33. }