home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 May / PCWorld_2001-05_cd.bin / Software / Vyzkuste / tiptrik / tiptrik.exe / AltDesktop.vbs < prev    next >
Text File  |  2001-03-04  |  2KB  |  33 lines

  1. set WSHShell = CreateObject("Wscript.Shell")
  2. set env = WSHShell.Environment("PROCESS")
  3. winverz=lcase(env("windir"))
  4. desk1=winverz & "\desktop"
  5. desk2=winverz & "\desktop1"
  6. Color2="032 047 106"
  7. Wallpaper2=winverz & "\WEB\Wallpaper\Paradies.jpg"
  8.  
  9. Wert = WSHShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Desktop")
  10. wert=lcase(wert)
  11.  
  12.  
  13. If Wert = winverz & "\desktop" Then 
  14.     msgbox "Nastavenφ pro alternativnφ pracovnφ plochu..."
  15.     Color1=WSHShell.RegRead("HKCU\Control Panel\Colors\Background")
  16.     WSHShell.RegWrite "HKCU\Control Panel\Colors\Backorg", Color1
  17.     Wallpaper1=WSHShell.RegRead("HKCU\Control Panel\Desktop\wallpaper")
  18.     WSHShell.RegWrite "HKCU\Control Panel\Desktop\wallorg", Wallpaper1
  19.     WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Desktop", desk2
  20.     WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Desktop", desk2
  21.     WSHShell.RegWrite "HKCU\Control Panel\Colors\Background", Color2
  22.     WSHShell.RegWrite "HKCU\Control Panel\Desktop\wallpaper", Wallpaper2
  23. Else 
  24.     msgbox "Nastavenφ pro normßlnφ pracovnφ plochu..."
  25.     WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Desktop", desk1
  26.     WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Desktop", desk1
  27.     Color1=WSHShell.RegRead("HKCU\Control Panel\Colors\Backorg")
  28.     WSHShell.RegWrite "HKCU\Control Panel\Colors\Background", Color1
  29.     Wallpaper1=WSHShell.RegRead("HKCU\Control Panel\Desktop\wallorg")
  30.     WSHShell.RegWrite "HKCU\Control Panel\Desktop\wallpaper", Wallpaper1
  31. End IF
  32.     WSHShell.Run("rundll32.exe shell32.dll,SHExitWindowsEx -1")
  33.