Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to remove quotes from shortcut parameter

Status
Not open for further replies.

Count430

Programmer
Apr 26, 2002
127
US
Hello:

I'm trying to massage a script in order to place a lnk to
lotus notes on the desktop and copy to program files
as well.

The problem is the target parameters keep appearing with
quotes.

This makes the target info invalid and the shortcut can't
launch notes.

Here's the code which produces these target params

MyShortcut.TargetPath = WSHShell.ExpandEnvironmentStrings
("C:\Notes\Notes.exe" & " " & "=m:\notes\data\notes.ini")

Note: I added the & " " & to include the space before "=m
but this only pulls the qoutes and places them at
both ends which is what I'm trying to avoid.

"C:\Notes\notes.exe =m:\notes\data\notes.ini" without
quotes is the goal here.

At the same time, I need the space in the shortcut
properties.
Heeellllpppp! :)

Thanks for any assistance or info...





 
Give this a try

ExPath="C:\Notes\Notes.exe =m:\notes\data\notes.ini"

Then when you create the shortcut use the variable ExPath. That should replace it with just the string value.
 
I'm confused too.

Not only is that not an environment variable needing expansion via ExpandEnvironmentStrings, it seems to contain arguments as well.

Maybe:

MyShortCut.TargetPath = "C:\Notes\Notes.exe"
MyShortCut.Arguments = "m:\notes\data\notes.ini"

?
 
Thank you sooo, much!

This fixed the problem for me, I was able to update the Icon
properties and re-create it in other places.




MyShortCut.TargetPath = "C:\Notes\Notes.exe"
MyShortCut.Arguments = "m:\notes\data\notes.ini"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top