home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 October / Chip_2004-10_cd1.bin / chplus / guide / AppCompat-XPSP2.msi / _8A20A82799263F2E2F7D3C7DEA618834 / _DF1627A6A88042D285439BE609BC71F2 < prev    next >
Encoding:
Text File  |  2004-08-23  |  2.4 KB  |  60 lines

  1. '=================================================================================
  2. 'This script is part of the appendix to the Application Compatibility Testing and 
  3. 'Mitigation Guide for Windows XP Service Pack 2. Before using these scripts you 
  4. 'must read the appendix and all Readme.txt files provided with the scripts. The 
  5. 'scripts are designed as functional samples and will require extensive testing and
  6. 'some modification for use in a production environment.
  7. '
  8. 'For information on additional functionality to incorporate into the script, such 
  9. 'as error checking, go to:
  10. '
  11. 'http://msdn.microsoft.com/library/default.asp?url=/nhp/default.asp?contentid=28001169
  12. '
  13. 'or
  14. '
  15. 'http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rmscpt/html/rmscpt.asp
  16. '
  17. 'As some of the scripts edit the registry it is important that their functionality and 
  18. 'impact on the machine environment is thoroughly tested before they are used in a 
  19. 'production environment.
  20. '==================================================================================
  21. ' AutoAdmin.vbs
  22. '
  23. ' Author: Jim Captainino, Terry Tull (Content Master)
  24. ' Date:   08/20/04
  25. ' Revision History:
  26. '    Date    Comment
  27. '    08/20/04    Initial version started
  28.  
  29. 'This script configures AutoAdmin logon and places RunOnce.cmd into the RunOnce area 
  30. 'of the registry.
  31.  
  32. 'Edit the value of DefUsrNme to configure the DefaultUserName
  33. DefUsrNme = "Administrator"
  34.  
  35. 'Edit the value of DefUsrPsswd to configure the DefaultPassword
  36. DefUsrPsswd = "password"
  37.  
  38. 'Edit the value of DefDomNme to configure the DefaultDomainName
  39. DefDomNme = "Contoso"
  40.  
  41. Set WshShell = CreateObject("Wscript.Shell")
  42.  
  43. WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Currentversion\winlogon\" _ 
  44. & "DefaultUserName", DefUsrNme, "REG_SZ"
  45.  
  46. WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Currentversion\winlogon\" _
  47. & "DefaultPassword", DefUsrPsswd, "REG_SZ"
  48.  
  49. WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Currentversion\winlogon\" _
  50. & "DefaultDomainName", DefUsrNme, "REG_SZ"
  51.  
  52. 'This line configures AutoAdminLogon
  53. WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Currentversion\winlogon\" _
  54. & "AutoAdminLogon", "1", "REG_SZ"
  55.  
  56. 'Edit this line to configure the required path for RunOnce.cmd
  57. WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\currentversion\RunOnce\" _
  58. & "MyScript", "C:\scripts\scenario1\Runonce.cmd", "REG_SZ"
  59.