Lans-ICT
asked on
VB Script to make a shortcut to access database
Hi,
I'm trying to make a VBScript that will generate a link to an access database so i can then deploy this to all machines by GPO. So far I have the following code:
The Shortcut target path works if I generate the shortcut manually by right clicking but the code wont run, I suspect because of quote marks. Help appreciated!
Lans-ICT
I'm trying to make a VBScript that will generate a link to an access database so i can then deploy this to all machines by GPO. So far I have the following code:
Dim FileName
FileName = "MyShortcut"
Set shortcut = CreateObject("WScript.Shell").CreateShortcut(CreateObject("WScript.Shell").SpecialFolders("Desktop") & + "\" + FileName + ".lnk")
shortcut.Description = "My shortcut"
shortcut.TargetPath = "C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" & "\\adminserver\data$\tt6\Register.mdb"
shortcut.Save
The Shortcut target path works if I generate the shortcut manually by right clicking but the code wont run, I suspect because of quote marks. Help appreciated!
Lans-ICT
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER