From Newz, 1 Year ago, written in Text.
Embed
  1. 'MAP FOLDERS TO SIDEBAR AS SUBSTITUTED DIRECTORIES:
  2. Set oShell = WScript.CreateObject ("WScript.Shell")
  3. oShell.run "cmd.exe /c subst T: ""C:\Users\User\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch"""
  4. oShell.run "cmd.exe /c subst U: ""C:\Users\User\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\Taskbar"""
  5. oShell.run "cmd.exe /c subst V: C:\Users\User"
  6. oShell.run "cmd.exe /c subst W: C:\Users\User\Documents"
  7. oShell.run "cmd.exe /c subst X: C:\Users\User\Downloads"
  8. oShell.run "cmd.exe /c subst Y: C:\"
  9.  
  10. 'Rename Drive Letters:
  11. Set oShell = WScript.CreateObject("Shell.Application")
  12. oShell.NameSpace("T:\").Self.Name = "System Pinned"
  13. oShell.NameSpace("U:\").Self.Name = "User Pinned"
  14. oShell.NameSpace("V:\").Self.Name = "User (Home)"
  15. oShell.NameSpace("W:\").Self.Name = "Documents"
  16. oShell.NameSpace("X:\").Self.Name = "Downloads"
  17.  
  18. 'Special Code For Local Drive (C) (Mounted As Y:):
  19. Set oShell = WScript.CreateObject ("WScript.Shell")
  20. oShell.run "cmd.exe /c subst Y: C:\Users\User\Downloads"
  21.  
  22. Set oShell = WScript.CreateObject("Shell.Application")
  23. oShell.NameSpace("Y:\").Self.Name = "Local Drive (C)"
  24.  
  25. Set oShell = WScript.CreateObject ("WScript.Shell")
  26. oShell.run "cmd.exe /c subst /d Y:"
  27. oShell.run "cmd.exe /c subst Y: C:\"
  28.  
  29. '- - -
  30.  
  31. 'PIN PROGRAMS TO TASKBAR:
  32. Set wsc = WScript.CreateObject("WScript.Shell")
  33. Set lnk = wsc.CreateShortcut("C:\Users\User\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\Taskbar\Command Prompt.lnk")
  34. lnk.targetpath = "C:\Windows\System32\cmd.exe"
  35. lnk.workingdirectory = "C:\Windows\System32"
  36. lnk.save
  37.  
  38. 'Relaunch "Explorer.exe":
  39. Set oShell = WScript.CreateObject ("WScript.Shell")
  40. oShell.run "cmd.exe /c taskkill /f /im explorer.exe"\
  41. oShell.run "cmd.exe /c explorer"

Replies to VBScript Upon Logon rss

Title Name Language When
Re: VBScript Upon Logon Whipped Panda text 1 Year ago.