[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Desktop shortcut logon script space in string

Posted on 2007-10-18
3
Medium Priority
?
360 Views
Last Modified: 2013-12-04
Can someone please tell me what the problem is.
This script is to put a shorcut on the desktop.
But the targetpath has a space in it...  It's causeing the shortcut result to be invalid.

I tried all of these...
Shortcut.TargetPath = "P:\IDPMS.exe" + " " + "CAR"
Shortcut.TargetPath = "P:\IDPMS.exe" & " " & "CAR"
Shortcut.TargetPath = "P:\IDPMS.exe" +  " CAR"
Shortcut.TargetPath = "P:\IDPMS.exe" & " CAR"
Shortcut.TargetPath = "P:\IDPMS.exe CAR"

The result is "P:\IDPMS.exe CAR" with the quotes!!  I do not want the quotes...
I just want it to say P:\IDPMS.exe CAR

Please help going nuts...


Logon Script
0
Comment
Question by:kleyba
3 Comments
 
LVL 19

Expert Comment

by:Andrew Davis
ID: 20106529
why not just create a working shortcut, then in the logon script have it copy that shortcut to the desktop?
0
 
LVL 5

Accepted Solution

by:
discon0 earned 1000 total points
ID: 20106541
Use the 'Arguments' property (see http://msdn2.microsoft.com/en-us/library/yf7kaky2.aspx).

Example:

Shortcut.TargetPath = "P:\IDPMS.exe"
Shortcut.Arguments = "CAR"
0
 

Author Comment

by:kleyba
ID: 20106561
Thank you so much...  spend way to much time trying to figure this out...
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip Migration Tip #1 – Source Server Health can be found listed in my profile here: http:…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question