Target Line of Desktop Icon

Microsoft Windows operating system, and software for Windows platform, including QuickTime Player and iTunes for Windows. We also discuss topics about Microsoft Corp.

Moderators: Josh, Don_HH2K, Mandrake

Target Line of Desktop Icon

Postby Ramona » Mon 04 Jun, 2007 5:21 pm

I need Windows guru help again.

I have no Desktop shortcuts, but use my Quick Launch Tray for my frequently used programs. The Target path of the shortcuts are always enclosed in quotation marks, whether or not there is a space after the end of the line. This is true of both Mozilla programs, and others( not Mozilla). Isn't this true of all Desktop shortcuts, e.g.,

"C:\Program Files\Mozilla Firefox\firefox.exe"
"C:\Program Files\mozilla.org\SeaMonkey\seamonkey.exe" -p monkey

I ask because I was challenged on another Forum after making the above statement that the Target path of the shortcuts are always enclosed in quotation marks. I actually have nothing to back up my statement. If I'm wrong, I certainly want to say so, but what I'm looking for is documentation. Anyone care to help?

Thanks!
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
User avatar
Ramona
Moderator
Moderator
 
Posts: 2376
Joined: Wed 19 Jun, 2002 3:50 pm
Location: Midwest USA

Postby Don_HH2K » Mon 04 Jun, 2007 5:50 pm

The quotation marks on a shortcut are Windows' way of referencing an entire path, with spaces in it. Consider the following two examples:

1 - [tt]c:\Program Files\Mozilla Firefox\firefox.exe[/tt]
2 - [tt]"c:\Program Files\Mozilla Firefox\firefox.exe"[/tt]

In the first example, since there aren't any quotes, Windows will interpret the path to the application as simply [tt]c:\Program[/tt]. It will then attempt to call [tt]c:\Program[/tt] with the arguments [tt]Files\Mozilla[/tt] and [tt]Firefox\firefox.exe[/tt], which actually creates the following target:

[tt]"c:\Program" Files\Mozilla Firefox\firefox.exe[/tt]

Meanwhile, the second example treats everything in quotation marks as the path it's looking for. Arguments would be outside of the quotations; for example, to launch Profile Manager, [tt]"c:\Program Files\Mozilla Firefox\firefox.exe" -p[/tt] would suffice. Meanwhile, [tt]"c:\Program Files\Mozilla Firefox\firefox.exe -p"[/tt] would look for a program called "firefox.exe -p".

Quotations aren't necessary if you're using older DOS 8.3-style filenames or paths without spaces; for example, [tt]c:\PROGRA~1\MOZILL~1\firefox.exe[/tt] and [tt]"c:\PROGRA~1\MOZILL~1\firefox.exe[/tt] refer to the same location.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.2 x64; en-US; rv:1.8.1.4) Gecko/20070603 BonEcho/2.0.0.4 (mmoy CE K8N-X02)
Laptop: HP Compaq nx6325 - Turion 64 X2 @ 2GHz, 2GB DDR2, 100GB HD, ATI Radeon X300, 15" LCD, Seven Pro
Handheld: Palm Treo 650 - Intel PXA270 @ 312MHz, 10MB RAM, 32MB flash, 2.7" LCD, Palm OS 5.4
User avatar
Don_HH2K
Moderator
Moderator
 
Posts: 5112
Joined: Sun 09 May, 2004 3:59 pm

Postby Ramona » Mon 04 Jun, 2007 5:58 pm

Don,

You are the best, and thank you for the easy to comprehend explanation. I see now, that the space within the command line is the key... I have copied your reply for future reference!
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
User avatar
Ramona
Moderator
Moderator
 
Posts: 2376
Joined: Wed 19 Jun, 2002 3:50 pm
Location: Midwest USA

Postby Don_HH2K » Mon 04 Jun, 2007 5:59 pm

No problem, glad to help. :)
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.2 x64; en-US; rv:1.8.1.4) Gecko/20070603 BonEcho/2.0.0.4 (mmoy CE K8N-X02)
Laptop: HP Compaq nx6325 - Turion 64 X2 @ 2GHz, 2GB DDR2, 100GB HD, ATI Radeon X300, 15" LCD, Seven Pro
Handheld: Palm Treo 650 - Intel PXA270 @ 312MHz, 10MB RAM, 32MB flash, 2.7" LCD, Palm OS 5.4
User avatar
Don_HH2K
Moderator
Moderator
 
Posts: 5112
Joined: Sun 09 May, 2004 3:59 pm


Return to Windows (and Microsoft talk)

Who is online

Registered users: Google [Bot], Yahoo [Bot]