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?
-
Typically your install script takes care of that. What installer are you using?DanTheMan– DanTheMan2011-07-18 18:03:04 +00:00Commented Jul 18, 2011 at 18:03
-
Don't write your install program in C++. Use a tool to build an install program.David Heffernan– David Heffernan2011-07-18 18:12:08 +00:00Commented Jul 18, 2011 at 18:12
-
1@DavidHeffernan:: Any particular reason for that?Abhineet– Abhineet2014-11-14 13:15:32 +00:00Commented Nov 14, 2014 at 13:15
-
1@Abhineet same reason you use an existing compiler instead of writing your own.David Heffernan– David Heffernan2014-11-14 14:08:23 +00:00Commented Nov 14, 2014 at 14:08
-
@DavidHeffernan:: :-) UnderstoodAbhineet– Abhineet2014-11-15 06:12:18 +00:00Commented Nov 15, 2014 at 6:12
Add a comment
|
1 Answer
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.