Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / September 2005

Tip: Looking for answers? Try searching our database.

JUst a Programming Question about creating a shortcut

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nigel - 17 Sep 2005 00:43 GMT
First off I apologise because this is not a true access question, BUT I know
with all the experts here someone can help, if not oh well

I am trying to run a vbs script to place a shortcut on the desktop. the
problem is that the script blows up.

Here is the line that blows up

MyShortcut.TargetPath = ""C:\Program Files\Symantec\pcAnywhere\awhost32.exe"
"C:\Documents and Settings\All Users\Application
Data\Symantec\pcAnywhere\Remotes\Cable.CHF" /C /D"

 The problem is that the script does not like multiple ""  if I manually
enter the shortcut on the desktop it will read like this and work

"C:\Program Files\Symantec\pcAnywhere\awhost32.exe" "C:\Documents and
Settings\All Users\Application Data\Symantec\pcAnywhere\Hosts\Network, Cable,
DSL.BHF" /C /D

for the vbs script to at least work I have to modify the line in the script
to look like this

C:\Program Files\Symantec\pcAnywhere\awhost32.exe C:\Documents and
Settings\All Users\Application Data\Symantec\pcAnywhere\Hosts\Network, Cable,
DSL.BHF /C /D

that places an icon on the desktop but the line reads like this

"C:\Program Files\Symantec\pcAnywhere\awhost32.exe C:\Documents and
Settings\All Users\Application Data\Symantec\pcAnywhere\hosts\Nigel.CHF \C \D"

it has reversed the  / to a \ and doesnt work

I understand if I don't get an answer but at hopefully someone can at least
point me to somewhere where I can resolve this

Thanks
Jesper - 17 Sep 2005 01:13 GMT
> I am trying to run a vbs script to place a shortcut on the desktop. the
> problem is that the script blows up.
[quoted text clipped - 5 lines]
> "C:\Documents and Settings\All Users\Application
> Data\Symantec\pcAnywhere\Remotes\Cable.CHF" /C /D"

Would substituting your inner " with chr(34) where you have "" work?
Just a suggestion.

Jesper Fjølner, Denmark
Dave Patrick - 17 Sep 2005 01:26 GMT
Try;

oShellLink.TargetPath = """C:\Program
Files\Symantec\pcAnywhere\awhost32.exe""" & " " & """C:\Documents and
Settings\All Users\Application Data\Symantec\pcAnywhere\Hosts\Network,
Cable, DSL.BHF"""
oShellLink.Arguments = "/C /D"

Signature

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

| First off I apologise because this is not a true access question, BUT I know
| with all the experts here someone can help, if not oh well
[quoted text clipped - 33 lines]
|
| Thanks
'69 Camaro - 17 Sep 2005 02:05 GMT
Hi, Nigel.

> Here is the line that blows up

Try (watch out for word wrap as this should be two lines):

MyShortcut.TargetPath = """C:\Program
Files\Symantec\pcAnywhere\awhost32.exe"""
MyShortcut.Arguments = """C:\Documents and Settings\All Users\Application
Data\Symantec\pcAnywhere\Hosts\Network, Cable, DSL.BHF""" & " /C /D"

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers.  Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.

> First off I apologise because this is not a true access question, BUT I know
> with all the experts here someone can help, if not oh well
[quoted text clipped - 33 lines]
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.