Creating Desktop Shortcuts Using Specific Browser

User avatar
hlewton
PlatinumLounger
Posts: 3788
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Creating Desktop Shortcuts Using Specific Browser

Post by hlewton »

“C:\Program Files (x86)\Mozilla Firefox\firefox.exe” http://www.eileenslounge.com/index.php" onclick="window.open(this.href);return false;

"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" http://www.eileenslounge.com/index.php" onclick="window.open(this.href);return false;

"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" http://www.eileenslounge.com/index.php" onclick="window.open(this.href);return false;


I have come across a need to create a desktop shortcut using a specific browser to open the shortcut. I have done it successfully but not without some problems. I have identified the problem but have no idea why it exists and am looking for a possible explanation. All I am talking about here is the path to the browser itself and not the other part which is a link to this forum. I will post the error message I get when trying to use the first example above. It was typed in Word 2010 and as you can see the quote marks are what Word calls "smart quotes." The second example worked perfectly but I had to copy the path from an example I found on the WEB. The only difference I see there between the two are the shape of the quote marks but I didn't trust that to be the cause. I then changed Word to stop using smart quotes, retyped the shortcut as you see in example 3 and it again worked perfectly. I am now convince that the quotes make the difference but don't know why. What does the shape of the quotes have to do with creating a functioning shortcut?

NOTE: What I see above that is showing up as a link was not supposed to. I will retype it and put in extra spaces in hopes it does not form a link. It should have read h t t p: \\ w w w . eileenslounge.com/i n d e x. p h p in all three examples.
Shortcut.jpg
You do not have the required permissions to view the files attached to this post.
Regards,
hlewton

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Creating Desktop Shortcuts Using Specific Browser

Post by HansV »

Curly quotes, aka smart quotes, are only intended to be used in text documents, such as a Word document.

Neither Windows, nor programming languages such as VBA or JavaScript recognize curly quotes as valid string delimiters - you must use straight quotes there. They don't see “ and ” as the beginning and end of a string, but as ordinary characters such as w or 6.
Best wishes,
Hans

User avatar
hlewton
PlatinumLounger
Posts: 3788
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Creating Desktop Shortcuts Using Specific Browser

Post by hlewton »

Thanks Hans. It is little things like that which can drive a person to drink.
Regards,
hlewton