Archive for category Scripts
XP: Remove unwanted icons from the Start Menu
Posted by Lars Krogh in Scripts, VBScript on 07/08/2009
I install Windows XP in English and 2 other languages – Danish and German.

I use this script to remove unwanted icons from the Start Menu.

zCFG-DelStartMenuLnk.vbs
—code—
‘ Lars Krogh ’09
Set shell = CreateObject(“WScript.Shell”)
Set fso = CreateObject(“Scripting.FileSystemObject”)
path = shell.SpecialFolders(“AllUsersStartMenu”) & “\Angiv programadgang og -standarder.lnk”
If fso.FileExists(path) then
fso.DeleteFile path, 1
End If
path = shell.SpecialFolders(“AllUsersStartMenu”) & “\Programmzugriff und -standards.lnk”
If fso.FileExists(path) then
fso.DeleteFile path, 1
End If
path = shell.SpecialFolders(“AllUsersStartMenu”) & “\Set Program Access and Defaults.lnk”
If fso.FileExists(path) then
fso.DeleteFile path, 1
End If
path = shell.SpecialFolders(“AllUsersStartMenu”) & “\Windows Catalog.lnk”
If fso.FileExists(path) then
fso.DeleteFile path, 1
End If
path = shell.SpecialFolders(“AllUsersStartMenu”) & “\Windows-Katalog.lnk”
If fso.FileExists(path) then
fso.DeleteFile path, 1
End If
path = shell.SpecialFolders(“AllUsersStartMenu”) & “\Windows Update.lnk”
If fso.FileExists(path) then
fso.DeleteFile path, 1
End If
—code—
I only use it when building the base images.
Scripting: Lock WorkStation shortcut
Posted by Lars Krogh in Scripts, VBScript on 05/08/2009
I always create a shortcut on the Desktop, that can lock the Workstation.
It’s great when users are in a hurry and needs to lock their Workstation quickly.
zCFG-UrlShortCuts.vbs
—code—
‘ Lars Krogh ’09
Option Explicit
Dim WshShell
Dim DesktopFolder
Dim UrlShortCut
Set WshShell = WScript.CreateObject(“WScript.Shell”)
CreateUrlShortCut1()
WScript.Quit()
Sub CreateUrlShortCut1()
DesktopFolder = WshShell.SpecialFolders(“AllUsersDesktop”)
Set UrlShortCut = WshShell.CreateShortcut(desktopFolder + “\Lock Workstation.lnk”)
UrlShortcut.Description = “Lock Workstation”
UrlShortcut.HotKey = “”
UrlShortcut.IconLocation = “%SystemRoot%\system32\SHELL32.dll,47″
UrlShortcut.TargetPath = “%SystemRoot%\system32\rundll32.exe”
UrlShortcut.Arguments = “user32.dll, LockWorkStation”
UrlShortcut.WindowStyle = 3
UrlShortcut.Save
end Sub
—code—
This is how is looks:

