ghudson
Registered User.
- Local time
- Today, 07:09
- Joined
- Jun 8, 2002
- Messages
- 6,195
I am attempting to use a VB script for the first time. CyberCow has helped my so far with the script that will create a shortcut on the users desktop. I can get it to work for a simple database but not for a "secured" database shortcut.
My end result for the secured shortcut Target: field should look like this...
"C:\Program Files\Microsoft Office\Office\msaccess.exe" /runtime" /wrkgrp" "C:\Databases\dbSecured.mdw" "C:\Databases\TestDB.mdb"
BUt this is what I am getting with my feeble attempts below...
"C:\Program Files\Microsoft Office\Office\msaccess.exe" \runtime" \wrkgrp" "C:\Databases\dbSecured.mdw" "C:\Databases\TestDB.mdb"
Below are two attempts that should work but the forward slashes before the workgroup and runtime command line switches are being reversed into back slashes when I run the script. Do you know of a way that I can format the TargetPath string? Can you spot the error of my ways?
link.TargetPath = "C:\Program Files\Microsoft Office\Office\msaccess.exe" & Chr(34) & Chr(32) & "/runtime" & Chr(32) & "/wrkgrp" & Chr(32) & Chr(34) & "C:\Databases\dbSecured.mdw" & Chr(34) & " " & Chr(34) & "C:\Databases\TestDB.mdb"
link.TargetPath = "C:\Program Files\Microsoft Office\Office\msaccess.exe" & Chr(34) & Chr(32) & Chr(47) & "runtime" & Chr(32) & Chr(47) & "wrkgrp" & Chr(32) & Chr(34) & "C:\Databases\dbSecured.mdw" & Chr(34) & " " & Chr(34) & "C:\Databases\TestDB.mdb"
I am attaching my VB script file for the curious. Thanks in advance for your help and suggestions!
My end result for the secured shortcut Target: field should look like this...
"C:\Program Files\Microsoft Office\Office\msaccess.exe" /runtime" /wrkgrp" "C:\Databases\dbSecured.mdw" "C:\Databases\TestDB.mdb"
BUt this is what I am getting with my feeble attempts below...
"C:\Program Files\Microsoft Office\Office\msaccess.exe" \runtime" \wrkgrp" "C:\Databases\dbSecured.mdw" "C:\Databases\TestDB.mdb"
Below are two attempts that should work but the forward slashes before the workgroup and runtime command line switches are being reversed into back slashes when I run the script. Do you know of a way that I can format the TargetPath string? Can you spot the error of my ways?
link.TargetPath = "C:\Program Files\Microsoft Office\Office\msaccess.exe" & Chr(34) & Chr(32) & "/runtime" & Chr(32) & "/wrkgrp" & Chr(32) & Chr(34) & "C:\Databases\dbSecured.mdw" & Chr(34) & " " & Chr(34) & "C:\Databases\TestDB.mdb"
link.TargetPath = "C:\Program Files\Microsoft Office\Office\msaccess.exe" & Chr(34) & Chr(32) & Chr(47) & "runtime" & Chr(32) & Chr(47) & "wrkgrp" & Chr(32) & Chr(34) & "C:\Databases\dbSecured.mdw" & Chr(34) & " " & Chr(34) & "C:\Databases\TestDB.mdb"
I am attaching my VB script file for the curious. Thanks in advance for your help and suggestions!