re: Question about 'Run a Shortcut from the Command Prompt'
Sunday, March 28, 2010 at 4:14 pm Windows XP Annoyances Discussion Forum
Posted by bobby boy
(1 messages posted)
This is an old thread, but i had the same problem.And for others ,this may help them.
If you created the short cut ,by say right clicking the original file and dragging
it to a new folder,or desktop and creating the shortcut that way,then you renamed
the file with the.lnk extension and then you batch file to that shortcut fails,it's
because the file now has 2 .ink extensions.One is completely hidden from normal view(very
strange),leaving the other on view!
Even if you right click the shortcut file and choose properties,you will still be
shown a name with only 1 .ink extension,but you have to click the details tab and
then you will see the real file name and it will end in .ink.ink !
This is why your bat files are failing to load your shortcuts,as it is looking for
a file which is named e.g runme.lnk ,but it's actually named runme.lnk.lnk !
Why the Os hides it like this is baffling .
But i hope that helps anyone coming here in the future.
But do remember,if you remove one of the .lnk's ,making the shortcut look as if it
now has no .lnk extension,just right click it and look at the details tab,and then
just make your bat file as you normally would .
On Wednesday, October 21, 2009 at 6:30 am, Johny Johnson wrote:
>Wow... Hope you all know if you use the code
>cmd /c "c:\shortcut.lnk"
>it works fine.. and continues with the batch file....
>
>
>
|
All messages in this thread [show all]
 |  |  |  |  |  |  | re: Question about 'Run a Shortcut from the Command Prompt' (bobby boy: Sun, Mar 28, 2010, 4:14 pm) |
| |
| |
| |
Return to the Windows XP Discussion Forum
|
|