Hi
Here is an example:
'--------------------8<----------------------
' Create Lock Workstation shortcut in the All Users Desktop folder
Set oShell = CreateObject("WScript.Shell")
sAllUsersDesktopPath = oShell.SpecialFolders("AllUsersDesktop")
sWinSysDir = oShell.ExpandEnvironmentStrings("%SystemRoot%\System32")
Set oShortCut = oShell.CreateShortcut( _
sAllUsersDesktopPath & "\Lock Workstation.lnk")
oShortCut.TargetPath = sWinSysDir & "\Rundll32.exe"
oShortCut.Arguments = "User32.dll,LockWorkStation"
oShortCut.IconLocation = sWinSysDir & "\Shell32.dll,47"
oShortCut.Save
MsgBox "Lock Workstation shortcut is now created.", _
vbInformation + vbSystemModal, "Create shortcut"
'--------------------8<----------------------
WSH 5.6 documentation (local help file) can be downloaded from here
if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx