3

I have a client application in C++. For that I want to create a shortcut on the desktop and an entry in the start menu while installing. Is there any C++ windows api for that? I tried searching for it but couldn't find it. Can anyone tell me how it can be done?

5
  • Typically your install script takes care of that. What installer are you using? Commented Jul 18, 2011 at 18:03
  • Don't write your install program in C++. Use a tool to build an install program. Commented Jul 18, 2011 at 18:12
  • 1
    @DavidHeffernan:: Any particular reason for that? Commented Nov 14, 2014 at 13:15
  • 1
    @Abhineet same reason you use an existing compiler instead of writing your own. Commented Nov 14, 2014 at 14:08
  • @DavidHeffernan:: :-) Understood Commented Nov 15, 2014 at 6:12

1 Answer 1

3

You'll have to get your hands a bit dirty, and use COM to access the Shell. You can read here about Shell Links. Also, this project might provide you the code you need.

To get the location of the desktop and the start menu folders, you can use the appropriate System Variables.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.