Execute Shortcut

Posted on 2003-02-22
Medium Priority
Last Modified: 2008-02-01
I posted this problem earlier with 20 points and no-one answered.  If someone can find a solution than I will give both points to them.

What I need to know is how to execute the microsoft office (word, excel, etc) shortcuts you can find in the start menu, there are other application similar but this is the best way I can refer to my problem.  
They aren't the same as normal shortcuts, if you right click on them they don't have any shortcut properties.  If you run them with shell or shellexec nothing happens, or they return an error.

Any help would be appreciated.

Comment from AKbor75
i really don't know what you mean...
what are 'not normal shortcuts' ?

i tested a shotcut with shellexecute, and that works fine.
let's say i have a shortcut in c:\ called test (which e.g. pints to c:\test.txt). shellexecute "c:\test" works fine.

shell doesn't work, cos that only works with executables.

so what exactly is your problem?

Comment from Drizzt95
 02/21/2003 08:33PM PST
If you go into your start menu, click on programs, then right click on something like microsoft word and go to properties you will see that it is defined as a shortcut, but actually has not shortcut destination.

Then if you try to execute that shortcut file using shellexec then you will receive an error message.  For some reason it cannot be executed.  I've tried it on many different pc's and i get the same result.

Question by:Drizzt95
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3

Accepted Solution

WarLord earned 400 total points
ID: 8000762
it's true what you say about the office shortcut
you could execute them with the

shell "start shortcut.lnk" the start.exe is an external file almost located on any computer with this it is possible to open other files then executables hope this is what you need... if you need anything else ask me and ill see if i can answer it

Greetings Erik

Author Comment

ID: 8000935
I tried that command but it came up path not found.
It didn't like the start path, I also tried start.exe.

I'm using win xp if that is any reason for it not working.

Expert Comment

ID: 8001413
I'm using WinXP and VB6

This works...

Dim x As Integer
Dim FileName As String
FileName = "c:\documents and settings\all users\start menu\programs\home\microsoft office\ms access.lnk"

Shell "c:\windows\explorer.exe " & FileName
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 8002125
That works for me and at worst case I will use it, but is there a way to stop the downloading box from popping up.  Did you get the same box?

There has to be a better way of doing this?

Expert Comment

ID: 8002318
you should place the start.exe in the same place as your project i assure you it will work!

Expert Comment

ID: 8005680
Yeah...I got the Dowload/Open option dialog.  Yuk...

Warlord is trying to say that START.EXE will work.  I would think he is right...I couldn't get it to work in place of EXPLORER.EXE

I searched for START.EXE and entered the entire path for START.EXE.  No matter hoiw I use START.EXE, I still get the "File Not Found" error dialog.  I gave up on trying to make that work.

Author Comment

ID: 8006055
I've done a bit of research and apparently xp doesn't support Start.exe anymore.  You now only have the option of using Explorer.exe.
Not the best option but it looks to me as if its the only one.

I'll leave the question open a little longer and if i get nothing else I'll award the points.

Expert Comment

ID: 8007057
if u want i could send you start.exe and a little code to proof it works

Expert Comment

ID: 8013202
We (XP users) have the file 'START.EXE'

It's in ..\Windows\SMINST\

It just won't launch another program.

Expert Comment

ID: 8024360
to proof i am right make a map on C: called shortcut and place the files from this zip file in there

compile the program and see for yourself

(download this file)


Author Comment

ID: 8029512
Geez, I'd just have to give warlord points for effort, you don't give up, I lke that!!

I tried the file you sent, it worked no probs opening the calc but did nothing when i tried to open the word document.

I did manage to get it to work when i renamed the file (Microsoft Word.lnk) to have no spaces, if there are any spaces then it doesn't work.  The way I may be able to get around this is by calling the shortcuts short name version (DOS Name) and executing it that way.  I'm pretty sure it will work then.

Bloody XP, its more trouble than its worth.

Thanks for both your help.
I think I'll close this off as I don't think there's going to be any easier way.
I'll give these points to WarLord and I'll give the other 20 points to CareyJ.


Thanks for both your help

Expert Comment

ID: 8032371
i think when you need a a space you need to put in %20 for a space maybe it works

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month8 days, 6 hours left to enroll

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question