how to create a shortcut using vc4.0

how can I create a shortcut to an .exe file using visual c++ 4.0.
This is for an install program to create the shortcut.

I need to place the shortcut in:
C:\WINNT\profiles\All Users\Start Menu\Programs\Myprogram

Thanks,

M
LVL 1
MothAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
Point your browser to 'http://users.southeast.net/~rhwarner/software/software.html'

There you can download 'cshortcut.zip', which contains a complete sample on how to create a shortcut...

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TimBCommented:
Grat - this looks hopefull,
Do you know what the parameters are or mean?
If I call the create function from this class, I need to pass in the following:

Create(LPCTSTR lpszPath,     LPCTSTR lpszTarget,
                       LPCTSTR lpszStartDir, LPCTSTR lpszDescription,
                       LPCTSTR lpszArgs,     LPCTSTR lpszIconLocation,
                       int nIconIndex,       WORD    wHotkey,
                       int nShowCmd)

Some of these args I can guess, but I don't know what  lpszArgs,  szIconLocation, nIconIndex, wHotkey, and nShowCmd are....(and what they should be set to...)


any ideas?
0
jkrCommented:
lpszArgs: Command line arguments passed to the app when the shortcut is double clicked
szIconLocation: path to the DLL/EXE where the icon for the shortcut is contained
nIconIndex: index of that icon in the binary image
wHotkey: Keycode for the hotkey
nShowCmd: Whether to start minimized, maximized or hidden

(just see the properties dialog of a shortcut ;-)
0
MothAuthor Commented:
Thanks, - It works
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.