Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Any idea as to why the Shortcut.exe no longer works

1,190 views
Skip to first unread message

justaguy

unread,
Aug 18, 2012, 7:46:27 PM8/18/12
to
Hi,

One of you guys helped me out in creating a Desktop icon for my
program during its installation over a year ago. It was working. But
now, recently I found it no longer works (tested with Windows 7
Professional Edition). Following is its code, do you have any idea
why it's not working and how could we debug it? Btw, referenced
files are all there.

Many thanks in advance.


rem add desktop icon
"C:\Program Files\shortcut.exe"
/f:"%userprofile%\desktop\Knowledge NoteBook.lnk"
/a:c
/t:"C:\Program Files\Mozilla Firefox\firefox.exe"
/p:"http://127.0.0.1:8600/knb2/index.cfm?more=1"
/i:"C:\Program Files\kn12.ico"
/r:1
/d:"Knowledge NoteBook"

foxidrive

unread,
Aug 18, 2012, 8:04:21 PM8/18/12
to
How come it is corrupted like that?



--
Mic

justaguy

unread,
Aug 18, 2012, 9:33:59 PM8/18/12
to
Well, I moved the options on a separate lines for readability.
This time, I'm copying/pasting the code below:
rem add desktop icon
"C:\Program Files\shortcut.exe" /f:"%userprofile%\desktop\Knowledge NoteBook.lnk" /a:c /t:"C:\Program Files\Internet Explorer\iexplore.exe" /p:"http://127.0.0.1:8600/knb2/index.cfm?more=1" /i:"C:\Program Files\kn12.ico" /r:1 /d:"Knowledge NoteBook"

Thanks.

justaguy

unread,
Aug 24, 2012, 4:13:45 PM8/24/12
to
Hello? Anyone have any idea?

foxidrive

unread,
Aug 24, 2012, 8:08:09 PM8/24/12
to
On Sunday 19/08/2012 11:33, justaguy wrote:
> On Saturday, August 18, 2012 8:04:21 PM UTC-4, foxidrive wrote:
>> On Sunday 19/08/2012 09:46, justaguy wrote:
>>
>>> Hi,
>>
>>>
>>
>>> One of you guys helped me out in creating a Desktop icon for my
>>
>>> program during its installation over a year ago. It was working. But
>>
>>> now, recently I found it no longer works (tested with Windows 7
>>
>>> Professional Edition). Following is its code, do you have any idea
>>
>>> why it's not working and how could we debug it? Btw, referenced
>>
>>> files are all there.

>>> Many thanks in advance.

> Well, I moved the options on a separate lines for readability.
> This time, I'm copying/pasting the code below:
> rem add desktop icon
> "C:\Program Files\shortcut.exe" /f:"%userprofile%\desktop\Knowledge NoteBook.lnk" /a:c /t:"C:\Program Files\Internet Explorer\iexplore.exe" /p:"http://127.0.0.1:8600/knb2/index.cfm?more=1" /i:"C:\Program Files\kn12.ico" /r:1 /d:"Knowledge NoteBook"
>
> Thanks.

Does whichever shortcut.exe you are using support win7? Is it 32 bit or 64 bit windows?

type shortcut /?
and paste the info here so we know which tool it is.


--
Mic

justaguy

unread,
Aug 25, 2012, 12:01:27 PM8/25/12
to
Here we go, Mic, btw, does Windows OS including XP, Vista and 7 have
its own shortcut.exe?

----------------------------------------------------

Shortcut [Version 1.11]

Creates, modifies or queries Windows shell links (shortcuts)


The syntax of this command is:

shortcut.exe /F:filename /A:C|E|Q [/T:target] [/P:parameters] [/
W:workingdir]
[/R:runstyle] [/I:icon,index] [/H:hotkey] [/D:description]

/F:filename : Specifies the .LNK shortcut file.
/A:action : Defines the action to take (C=Create, E=Edit or Q=Query).
/T:target : Defines the target path and file name the shortcut points
to.
/P:parameters : Defines the command-line parameters to pass to the
target.
/W:working dir : Defines the working directory the target starts
with.
/R:run style : Defines the window state (1=Normal, 3=Max, 7=Min).
/I:icon,index : Defines the icon and optional index (file.exe or
file.exe,0).
/H:hotkey : Defines the hotkey, a numeric value of the keyboard
shortcut.
/D:description : Defines the description (or comment) for the
shortcut.

Notes:
- Any argument that contains spaces must be enclosed in "double
quotes".
- If Query is specified (/A:Q), all arguments except /F: are ignored.
- To find the numeric hotkey value, use Explorer to set a hotkey and
then /A:Q
- To prevent an environment variable from being expanded until the
shortcut
is launched, use the ^ carat escape character like this: ^%WINDIR^%

Examples:
/f:"%ALLUSERSPROFILE%\Start Menu\Programs\My App.lnk" /a:q
/f:"%USERPROFILE%\Desktop\Notepad.lnk" /a:c /t:^%WINDIR^%
\Notepad.exe /h:846
/f:"%USERPROFILE%\Desktop\Notepad.lnk" /a:e /p:C:\Setup.log /r:3

An argument of /? or -? displays this syntax and returns 1.
A successful completion will return 0.


Copyright 2000-2005 Marty List, www.OptimumX.com

-------------------------------------

Many thanks.

John Gray

unread,
Aug 25, 2012, 12:32:36 PM8/25/12
to
If you click on the OptimumX.com link at the bottom of your post, then on the Popular Utilities "More info" button, and scroll down the resulting Downloads page, you will find Shortcut.exe second to bottom. The text shows that it was last updated in July 2005 and the last two operating systems supported are Windows Server 2003 and Windows XP.

justaguy

unread,
Aug 25, 2012, 4:34:00 PM8/25/12
to
But I believe I've used it for XP, Visa and 7 successfully in the
past. Now, a new question, does XP, Vista and 7 have its own
shortcut.exe equivalent? Or another similar free exe out there there?

Thanks.

frank.w...@gmail.com

unread,
Aug 27, 2012, 6:30:37 AM8/27/12
to
From justaguy :
>...does Windows OS including XP,
>Vista and 7 have its own shortcut.exe?

W7, and perhaps also Windows Vista, has MKLINK.EXE which
will make shell links by default (hard links by choice),
but I haven't been reading this thread do I don't know
if it will do what you want.

Frank

justaguy

unread,
Aug 28, 2012, 12:17:45 PM8/28/12
to
Frank,

I ran a directories and all subdirectoris search for it starting at c:
\
and couldn't find it on my win7 prof 64bit computer. Any idea as to
why not?

Thanks.

ten.n...@virgin.net

unread,
Aug 28, 2012, 1:02:56 PM8/28/12
to
You dont need to search for it, just type into a console window and you'll
see it!
:: - - - - - CONSOLE - - - - -
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\TenNigriv>mklink /?
Creates a symbolic link.

MKLINK [[/D] | [/H] | [/J]] Link Target

/D Creates a directory symbolic link. Default is a file
symbolic link.
/H Creates a hard link instead of a symbolic link.
/J Creates a Directory Junction.
Link specifies the new symbolic link name.
Target specifies the path (relative or absolute) that the new link
refers to.
:: - - - - - - END - - - - - -
To be fair though it will not really replace like for like what you need.

Have you tried using an inf file or vbs instead?

Zaphod Beeblebrox

unread,
Aug 28, 2012, 2:01:18 PM8/28/12
to
On Tue, 28 Aug 2012 09:17:45 -0700 (PDT), "justaguy" <do...@yahoo.com>
wrote in article <7771de13-f055-445e-8184-7790713b6373
@b10g2000yqc.googlegroups.com>...
That is because it isn't an .exe file, it is an internal command - that
is, cmd.exe contains the command MKLINK, no external program file
required.

--
Zaphod

Arthur: All my life I've had this strange feeling that there's
something big and sinister going on in the world.
Slartibartfast: No, that's perfectly normal paranoia. Everyone in the
universe gets that.

justaguy

unread,
Aug 28, 2012, 4:19:56 PM8/28/12
to
I see.

But I issued the following command I received an err msg of "You don't
have the permission to perform such an operation", wtf (sorry for the
language); secondly even it does would it add a desktop icon for this
guy and if so what icon does it use for this?
mklink "http://127.0.0.1:8600/knb2/index.cfm" "C:\Program Files
(x86)\Mozilla Firefox\firefox.exe"


justaguy

unread,
Aug 28, 2012, 4:20:08 PM8/28/12
to
On Aug 28, 2:01 pm, Zaphod Beeblebrox
Thanks.

justaguy

unread,
Aug 28, 2012, 4:23:19 PM8/28/12
to
On Aug 28, 1:02 pm, ten.nig...@virgin.net wrote:
> On Tue, 28 Aug 2012 17:17:45 +0100, justaguy <do...@yahoo.com> wrote:
> > On Aug 27, 6:30 am, frank.westl...@gmail.com wrote:
> >> From justaguy :
>
> >> >...does Windows OS including XP,
> >> >Vista and 7 have its own shortcut.exe?
>
> >> W7, and perhaps also Windows Vista, has MKLINK.EXE which
> >> will make shell links by default (hard links by choice),
> >> but I haven't been reading this thread do I don't know
> >> if it will do what you want.
>
> >> Frank
>
> > Frank,
>
> > I ran a directories and all subdirectoris search for it starting at c:
> > \
> > and couldn't find it on my win7 prof 64bit computer.  Any idea as to
> > why not?
>
> > Thanks.
>
>
> Have you tried using an inf file or vbs instead?

Yep, a kind soul created a vbs for adding a desktop icon for the
program for me, which works when I ran it on its own but when I
incorporate it into WinRar to create the installation (exe) file the
cmd file does not add a desktop icon at the software installation.

ten.n...@virgin.net

unread,
Aug 28, 2012, 5:39:14 PM8/28/12
to
You don't need to go through this if all you need is an icon for an
installation from WinRAR SFX.

Take a look at WinRAR's built in options
e.g. Shortcut=D, "PATHTOPROGRAM", "SUBMENU", "DESCRIPTION", "SHORTCUTNAME"

justaguy

unread,
Aug 28, 2012, 6:08:32 PM8/28/12
to
Using WinRAR SFX's built-in function for adding a desktop icon is an
interesting idea, however, here's the challenge, the "source program,
the executable" can't be predetermined prior to installation, that is,
the installer would find out if the user has Firefox browser installed
already, if yes, the desktop icon for my software program would launch
with FF otherwise it would launch with IE since all Windows OS has IE
pre-installed. Now, I'm not certain if WinRAR SFX's Shortcut feature
supports a variable for its respective parameters, if it does it
solves the problem. Any idea? Thanks.

ten.n...@virgin.net

unread,
Aug 29, 2012, 4:28:05 AM8/29/12
to
On Tue, 28 Aug 2012 23:08:32 +0100, justaguy <do...@yahoo.com> wrote:

> Using WinRAR SFX's built-in function for adding a desktop icon is an
> interesting idea, however, here's the challenge, the "source program,
> the executable" can't be predetermined prior to installation, that is,
> the installer would find out if the user has Firefox browser installed
> already, if yes, the desktop icon for my software program would launch
> with FF otherwise it would launch with IE since all Windows OS has IE
> pre-installed. Now, I'm not certain if WinRAR SFX's Shortcut feature
> supports a variable for its respective parameters, if it does it
> solves the problem. Any idea? Thanks.

Don84, why are you specifying the end users browser by name? if you create
a URL instead of a LNK it will be run by whatever browser is associated to
do so. You were told this and provided with solutions almost three years
ago in this group.
https://groups.google.com/forum/?fromgroups=#!topic/alt.msdos.batch.nt/Qls71FOcEr0

justaguy

unread,
Aug 29, 2012, 8:37:42 AM8/29/12
to
> ago in this group.https://groups.google.com/forum/?fromgroups=#!topic/alt.msdos.batch.n...

We're a little guy and don't have resources to support all the
browsers for best results at this time, hence, currently Firefox is
THE browser that works best with the software, and that's why we want
to add a desktop icon that launches our program in FF but if the user
does not have FF already installed it would add an icon for IE. And
when a new user begins to dig about our program he/she would soon find
out from our website that FF is THE browser to work best with our
program, so, if the user is sensible he/she would download and install
FF and change/add a new icon for FF for it.

foxidrive

unread,
Aug 29, 2012, 9:17:03 AM8/29/12
to
If the user has FF installed then it is quick likely that it will be the default browser.

If you launch your program in FF when it is *not* the default browser then you will alienate your potential customer straight away.
Just include a message somewhere that they should try FF for optimal results.


--
Mic

Frank P. Westlake

unread,
Aug 29, 2012, 10:18:27 AM8/29/12
to
On 2012-08-28 11:01, Zaphod Beeblebrox claimed:
>>> W7, and perhaps also Windows Vista, has MKLINK.EXE ...

>> ... couldn't find it on my win7 prof 64bit computer.


> That is because it isn't an .exe file, it is an internal command ...

Yes, my statement was erroneous; it appears that MKLINK is not a single
executable.

Frank

ten.n...@virgin.net

unread,
Aug 29, 2012, 10:23:27 AM8/29/12
to
On Wed, 29 Aug 2012 13:37:42 +0100, justaguy <do...@yahoo.com> wrote:

> We're a little guy and don't have resources to support all the
> browsers for best results at this time, hence, currently Firefox is
> THE browser that works best with the software, and that's why we want
> to add a desktop icon that launches our program in FF but if the user
> does not have FF already installed it would add an icon for IE.

Have you thought of determining the existence of a Firefox install or the
reading the default browser as part of your installation routine?

Additionally note that the Chrome browser has the largest market share,
(currently close to 45%), and as such your development should be either
looking at moving to that or ideally looking at improving compatibility
with other browsers.

justaguy

unread,
Aug 29, 2012, 9:14:09 PM8/29/12
to
Exactly my thought as well.

justaguy

unread,
Aug 29, 2012, 9:14:24 PM8/29/12
to
On Aug 29, 10:18 am, "Frank P. Westlake" <frank.westl...@gmail.com>
wrote:
No prob, Frank.

justaguy

unread,
Aug 29, 2012, 9:16:43 PM8/29/12
to
Yes, the installer will determine if the user's Windows OS -based
computer would have Firefox (64bit) or (32bit) installed and then
decide which browser to launch.

With regard to more/better support for Chrome, yes, it works well with
it for essential functions but not advanced functions while Firefox is
able to support all of them.

Todd Vargo

unread,
Aug 29, 2012, 10:56:17 PM8/29/12
to
Agreed, also, I rarely install apps to their default folder
location/names. That includes FF.

--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)

ten.n...@virgin.net

unread,
Aug 30, 2012, 10:04:06 AM8/30/12
to
On Thu, 30 Aug 2012 03:56:17 +0100, Todd Vargo <tlv...@sbcglobal.netz>
wrote:
So you've decided to make guesses in a technical group!

The machine I'm typing this on has the Firefox browser installed, however
Opera is the default browser.

One suggestion may be to query the registry for the key:
HKLM\SOFTWARE\Classes\http\shell\open\command

Then parsing result for the system browser (including path).
0 new messages