Howdy!
I'm working with my login script and need to add several new shortcuts to my users desktops. That in and of itself is simple enough. I'm using the following code:
My problem is that I need to create a desktop shortcut with a command line argument. The [red]target pat[/red] would need to end up looking like the following
I've done the following.
And several variants of those codes therein. The target path is put into the shortcut with the "" at the start and finish or no space is put between my path and my command line argument.
For the shortcuts to work the path must display as
\\Fnhc_adlsrv\adl2\ADLOptClinicals.exe -upCNA (with the space).
What am I missing?
Thanks for taking the time to read and for any help
I'm working with my login script and need to add several new shortcuts to my users desktops. That in and of itself is simple enough. I'm using the following code:
Code:
SET oFSO = Wscript.CreateObject("Scripting.FileSystemObject")
strDsk = WshShell.SpecialFolders("Desktop")
strshortcut = strDsk & "\Optimum Clinicals.lnk"
If Not oFSO.FileExists(strshortcut) Then
SET oUrlLink = WshShell.CreateShortcut(strshortcut)
oUrlLink.TargetPath = "\\Fnhc_adlsrv\adl2\ADLOptClinicals.exe"
oUrlLink.WorkingDirectory = "\\Fnhc_adlsrv\adl2"
oUrlLink.Save
End If
My problem is that I need to create a desktop shortcut with a command line argument. The [red]target pat[/red] would need to end up looking like the following
Code:
\\Fnhc_adlsrv\adl2\ADLOptClinicals.exe -upCNA
I've done the following.
Code:
oUrlLink.TargetPath = "\\Fnhc_adlsrv\adl2\ADLOptClinicals.exe" & "-upCNA"
[red]oUrlLink.TargetPath = "\\Fnhc_adlsrv\adl2\ADLOptClinicals.exe" & " -upCNA"[/red]
And several variants of those codes therein. The target path is put into the shortcut with the "" at the start and finish or no space is put between my path and my command line argument.
For the shortcuts to work the path must display as
\\Fnhc_adlsrv\adl2\ADLOptClinicals.exe -upCNA (with the space).
What am I missing?
Thanks for taking the time to read and for any help