home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 May / PCWorld_2005-05_cd.bin / software / vyzkuste / zastupci / zastupci.exe / pcwRegedit.VBS < prev    next >
Text File  |  2005-03-13  |  5KB  |  145 lines

  1. dim regkey
  2. Set MyShell = CreateObject("Wscript.Shell")
  3. lastkey = MyShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\LastKey")
  4.  
  5. text="Appear Applets Class DeskIcons Desktop Dir Explorer Folder IE Last Metrics Logon Netlogon Office Outlook Path PC Policies Run-M Run-U Setup Sytem Uninstall Windows"
  6.  
  7. regkey=inputbox("Zadejte nßzev klφΦe nebo zkratku ze seznamu:" & chr(13) & chr(13) & text,"Regedit",lastkey)
  8.  
  9. if regkey="" then
  10.     MyShell.RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\LastKey"),regkey
  11.     myshell.run "regedit.exe"
  12.     wscript.quit
  13. end if
  14.  
  15. if regkey=lastkey then 
  16.     myshell.run "regedit.exe"
  17.     wscript.quit
  18. end if
  19.  
  20. if regkey <> "" then
  21.     regkey = ucase(regkey)
  22.     regkey = trim(regkey)
  23.     if regkey="CLASS" then Classes regkey
  24.     regkey = replace(regkey,chr(34),"")
  25.     regkey = replace(regkey,"\\","\")
  26.     regkey = replace(regkey,"ARBEITSPLATZ\","")
  27.     regkey = replace(regkey,"[","")
  28.     regkey = replace(regkey,"]","")
  29.     if right(regkey,1) = "\" then
  30.         L=len(regkey)
  31.         regkey=left(regkey,L-1)
  32.     end if
  33.  
  34.     Andere regkey
  35. end if
  36.     
  37. regkey="Arbeitsplatz\" & regkey
  38. MyShell.RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\LastKey"),regkey
  39. myshell.run "regedit.exe"
  40.  
  41. Sub Andere (regkey)
  42. select case regkey
  43.  
  44. case "APPEAR"
  45. regkey="Hkey_Current_User\Control Panel\Appearance"
  46. case "APPLETS"
  47. regkey="Hkey_Current_User\Software\Microsoft\Windows\Currentversion\Applets"
  48. case "DESKTOP"
  49. regkey="HKEY_Current_USER\Control Panel\desktop"
  50. case "DIR"
  51. regkey="Hkey_Classes_Root\Directory"
  52. case "EXPLORER"
  53. regkey="Hkey_Current_User\Software\Microsoft\Windows\CurrentVersion\Explorer"
  54. case "FOLDER"
  55. regkey="Hkey_Classes_Root\Folder"
  56. case "DESKICONS"
  57. regkey="Hkey_Local_Machine\Software\Microsoft\Windows\CurrentVersion\explorer\Desktop\NameSpace"
  58. case "IE"
  59. regkey="HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer"
  60. case "LAST"
  61. regkey="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit"
  62. case "METRICS"
  63. regkey="HKEY_CURRENT_USER\Control Panel\desktop\WindowMetrics"
  64. case "LOGON"
  65. regkey="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
  66. case "NETLOGON"
  67. regkey="Hkey_Local_Machine\System\CurrentControlSet\Services\Netlogon"
  68. case "OFFICE"
  69. regkey="Hkey_Current_User\Software\Microsoft\Office\"
  70. case "OUTLOOK"
  71. regkey="Hkey_Current_User\Software\Microsoft\Outlook"
  72. case "PATH"
  73. regkey="Hkey_Local_Machine\Software\Microsoft\Windows\CurrentVersion\App Paths"
  74. case "PC"
  75. regkey="Hkey_Local_Machine\Software\Microsoft\Windows\CurrentVersion\Explorer\mycomputer"
  76. case "POLICIES"
  77. regkey="Hkey_Current_User\Software\Microsoft\Windows\CurrentVersion\Policies"
  78. case "RUN-M"
  79. regkey="Hkey_Local_Machine\Software\Microsoft\Windows\CurrentVersion\Run"
  80. case "RUN-U"
  81. regkey="Hkey_Current_User\Software\Microsoft\Windows\CurrentVersion\Run"
  82. case "SETUP"
  83. regkey="Hkey_Local_Machine\Software\Microsoft\Windows\CurrentVersion\Setup"
  84. case "SYSTEM"
  85. regkey="Hkey_Local_Machine\System\CurrentControlSet"
  86. case "UNINSTALL"
  87. regkey="Hkey_Local_Machine\Software\Microsoft\Windows\Currentversion\Uninstall"
  88. case "WINDOWS"
  89. regkey="HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion"
  90.  
  91. case else
  92. end select
  93.  
  94. end sub
  95.  
  96. sub Classes (regkey)
  97. n=inputbox("(1) Tento poΦφtaΦ" & chr(13) & "(2) KoÜ" & chr(13) & "(3) Mφsta v sφti" & chr(13) & "(4) Internet Explorer" & chr(13) & "(5) DoruΦenß poÜta" & chr(13) & "(6) TelefonickΘ p°ipojenφ sφt∞" & chr(13) & "(7) Tiskßrny" & chr(13) & "(8) Ovlßdacφ panely" & chr(13) & "(9) Aktovka" & chr(13) & "(10) Internet Cache" & chr(13) & "(11) Hlavnφ panel a nabφdka Start" & chr(13) & "(12) Pφsma","Regedit")
  98. if n="" then n=0
  99.  
  100. select case n
  101.  
  102. case 1
  103. regkey="Hkey_Classes_Root\Clsid\{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
  104. 'Tento poΦφtaΦ
  105. case 2
  106. regkey="Hkey_Classes_Root\Clsid\{645FF040-5081-101B-9F08-00AA002F954E}"
  107. 'KoÜ
  108. case 3
  109. regkey="Hkey_Classes_Root\Clsid\{208D2C60-3AEA-1069-A2D7-08002B30309D}"
  110. 'Mφsta v sφti
  111. case 4 
  112. regkey="Hkey_Classes_Root\Clsid\{871C5380-42A0-1069-A2EA-08002B30309D}"
  113. 'Internet Explorer
  114. case 5
  115. regkey="Hkey_Classes_Root\Clsid\{00020D76-0000-0000-C000-000000000046}"
  116. 'DoruΦenß poÜta
  117. case 6
  118. regkey="Hkey_Classes_Root\Clsid\{992CFFA0-F557-101A-88EC-00DD010CCC48}"
  119. 'TelefonickΘ p°ipojenφ sφt∞
  120. case 7
  121. regkey="Hkey_Classes_Root\Clsid\{2227A280-3AEA-1069-A2DE-08002B30309D}"
  122. 'Tiskßrny
  123. case 8
  124. regkey="Hkey_Classes_Root\Clsid\{21EC2020-3AEA-1069-A2DD-08002B30309D}"
  125. 'Ovlßdacφ panely
  126. case 9
  127. regkey="Hkey_Classes_Root\Clsid\{85BBD920-42A0-1069-A2E4-08002B30309D}"
  128. 'Aktovka
  129. case 10
  130. regkey="Hkey_Classes_Root\Clsid\{7BD29E00-76C1-11CF-9DD0-00A0C9034933}"
  131. 'Internet Cache Folder
  132. case 11
  133. regkey="Hkey_Classes_Root\Clsid\{0DF44EAA-FF21-4412-828E-260A8728E7F1}"
  134. 'Hlavnφ panel & nabφdka Start
  135. case 12
  136. regkey="Hkey_Classes_Root\Clsid\{BD84B380-8CA2-1069-AB1D-08000948F534}"
  137. edit target    'Pφsma
  138.  
  139. case else
  140. regkey="Hkey_Classes_Root\Clsid"
  141.  
  142. end select
  143.  
  144. end sub
  145.