Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how to create a shortcut using vc4.0

Posted on 1999-07-15
4
Medium Priority
?
173 Views
Last Modified: 2013-11-20
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
0
Comment
Question by:Moth
[X]
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
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 120 total points
ID: 1310063
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
 
LVL 1

Expert Comment

by:TimB
ID: 1310064
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
 
LVL 86

Expert Comment

by:jkr
ID: 1310065
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
 
LVL 1

Author Comment

by:Moth
ID: 1310066
Thanks, - It works
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

722 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