mydogbites
IS-IT--Management
Hi there
When trying to run the script:
SET oFSO = Wscript.CreateObject("Scripting.FileSystemObject")
strDsk = WshShell.SpecialFolders("Desktop")
' What is the label for the shortcut?
strshortcut = strDsk & "\CompanyShared.lnk"
If Not oFSO.FileExists(strshortcut) Then
SET oUrlLink = WshShell.CreateShortcut(strshortcut)
' What is the path to the shared folder?
oUrlLink.TargetPath = "\\server\CompanyShared\"
oUrlLink.Save
End If
I get an error
Line: 2
Char:5
Error: Wshshell required
Anyone know why?...Not too familar with Vb at all...
Cheers
James
When trying to run the script:
SET oFSO = Wscript.CreateObject("Scripting.FileSystemObject")
strDsk = WshShell.SpecialFolders("Desktop")
' What is the label for the shortcut?
strshortcut = strDsk & "\CompanyShared.lnk"
If Not oFSO.FileExists(strshortcut) Then
SET oUrlLink = WshShell.CreateShortcut(strshortcut)
' What is the path to the shared folder?
oUrlLink.TargetPath = "\\server\CompanyShared\"
oUrlLink.Save
End If
I get an error
Line: 2
Char:5
Error: Wshshell required
Anyone know why?...Not too familar with Vb at all...
Cheers
James