Hello,
I have a script that is working great posted below. I would like to add in the functionality of only running the script if the %computername% value ends with the letter "l". This indicates a laptop in our current naming scheme.
Any pointers would be appreciated.
Set objShell = WScript.CreateObject("WScript.Shell")
strDesktopFolder = objShell.SpecialFolders("AllUsersDesktop")
Set objShortCut = objShell.CreateShortcut(strDesktopFolder & _
"\Local Documents.lnk")
objShortCut.TargetPath = "c:\Documents and Settings\%username%\My Documents"
objShortCut.Description = "Run the Internet Information Services Manager."
objShortCut.Save
I have a script that is working great posted below. I would like to add in the functionality of only running the script if the %computername% value ends with the letter "l". This indicates a laptop in our current naming scheme.
Any pointers would be appreciated.
Set objShell = WScript.CreateObject("WScript.Shell")
strDesktopFolder = objShell.SpecialFolders("AllUsersDesktop")
Set objShortCut = objShell.CreateShortcut(strDesktopFolder & _
"\Local Documents.lnk")
objShortCut.TargetPath = "c:\Documents and Settings\%username%\My Documents"
objShortCut.Description = "Run the Internet Information Services Manager."
objShortCut.Save