Hi Guys,
I'm still very new to scripting so need some plain language advice on a solution.
Below is a script i'm using to send shortcuts to desktops around the network. Works great however on the Line strAppPath = i want to add a np switch, this stops students printing a forrest. However whenever i add the switch the shortcut no longer works and when i click on short cut properities on the client pc, the "" are added to the start and end of the Target path line.
If i manually go in and remove the "" then it all works correctly.
Any ideas on how to add the np switch and not have the commas show at the start and end of the line
' --------------------------------------------------
' Here are the variables that to change if you are making a 'real' script
strWorkDir ="\\studentserver\CMEplus"
strAppPath ="\\studentserver\cmeplus\Cmeplus.exe"
strIconPath ="\\studentserver\CMEplus\CMEplus.exe"
Set objShell = CreateObject("WScript.Shell")
objDesktop = objShell.SpecialFolders("Desktop")
Set objLink = objShell.CreateShortcut(objDesktop & "\Library Search.lnk")
This is not the full Script of course i can post the full script if needed.
Regards
Max
Never argue with an idiot, they drag you down to their level and beat you with experience
I'm still very new to scripting so need some plain language advice on a solution.
Below is a script i'm using to send shortcuts to desktops around the network. Works great however on the Line strAppPath = i want to add a np switch, this stops students printing a forrest. However whenever i add the switch the shortcut no longer works and when i click on short cut properities on the client pc, the "" are added to the start and end of the Target path line.
If i manually go in and remove the "" then it all works correctly.
Any ideas on how to add the np switch and not have the commas show at the start and end of the line
' --------------------------------------------------
' Here are the variables that to change if you are making a 'real' script
strWorkDir ="\\studentserver\CMEplus"
strAppPath ="\\studentserver\cmeplus\Cmeplus.exe"
strIconPath ="\\studentserver\CMEplus\CMEplus.exe"
Set objShell = CreateObject("WScript.Shell")
objDesktop = objShell.SpecialFolders("Desktop")
Set objLink = objShell.CreateShortcut(objDesktop & "\Library Search.lnk")
This is not the full Script of course i can post the full script if needed.
Regards
Max
Never argue with an idiot, they drag you down to their level and beat you with experience