Solved

Create Icon on desktop during setup

Posted on 2006-06-10
9
216 Views
Last Modified: 2010-08-05
I just want setup to create an Icon on the desktop when my app installs on someone's computer.
How can I make it do this?  I am using VB6

Thanks,
Cheers!
ahammar
0
Comment
Question by:ahammar
  • 4
  • 3
  • 2
9 Comments
 
LVL 13

Expert Comment

by:Mark_FreeSoftware
ID: 16879273

which setup creator are you using?
0
 
LVL 23

Author Comment

by:ahammar
ID: 16880906
Package and Deployment wizard from VB6
0
 
LVL 13

Accepted Solution

by:
Mark_FreeSoftware earned 350 total points
ID: 16880924

with the p&d wizard this is not possible


what you could do,
is find the source of P&D wizard in your vb directory,
and edit it to create a shortcut on the desktop

how to create a shortcut from vb:

http://support.microsoft.com/kb/q155303/

0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 18

Assisted Solution

by:Sethi
Sethi earned 150 total points
ID: 16882905
I would suggest you to stop using PDW and shift to an extremely powerful yet free and easy installer named Innosetup available at www.innosetup.com

Spend some time reading FAQ's at the site and download other very useful yet free 3rd party tools along with Inno. IsTool & Inno Script are must have 3rd party tools with Inno if you ask me.

With Inno it is a matter of seconds to create a desktop icon.
0
 
LVL 23

Author Comment

by:ahammar
ID: 16891108
Thanks both of you...

Mark FreeSoftware:
With some help from someone else I was able to get it to work, but it still will only work if the user does not change the default installation path.  I think that's the best I'm gonna get though.

Sethi:
I have never used anything other than the P&D wizard because I have never wanted to take the time to learn how to use anything else.  I think I'll give it a shot though as I have wanted to do this quite a few times now so I guess it's worth the trouble.

Thanks to both of you for your help.....
I'll be back

Cheers!
ahammar
0
 
LVL 23

Author Comment

by:ahammar
ID: 16898238
Hello again,
I guess I am going to split the points.  I'm not going to be able to do what I want, but Mark_FreeSoftware was the closest so I'm gonna give him 350 points.
Sethi will get 150 points for the download site of inno.  I did download it but it's gonna take up too much time to try and figure out how it works right now.  I'll get by for now.

Thanks to both of you!

Cheers!
ahammar
0
 
LVL 13

Expert Comment

by:Mark_FreeSoftware
ID: 16898434

thanks for the points, and happy coding!
0
 
LVL 23

Author Comment

by:ahammar
ID: 16899481
Hi again...

Just wanted to let whoever mignt read this again that I did figure out an easy way.
All I did was open up Setup.vbp in C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Setup1 and added this to the end of the CreateShellLink sub: (had to declare msg as integer)
           
msg = MsgBox("Would you like setup to put a shortcut on the desktop?", vbYesNo)
            If msg = vbNo Then Exit Sub
           
            fSuccess = OSfCreateShellLink("..\..\Desktop", strLinkName, strLinkPath, strLinkArguments, fPrivate, sParent)

Then saved it and replaced Setup1.exe in the PDwizards folder with this new one.

Now any app I create a package with will ask if the user wants a shortcut on the desktop during setup, and if so, it will put one there.
I haven't done a lot of testing with it, but it works so far.
If either of you see why this might cause a problem down the road, please let me know.


Cheers!
ahammar
0
 
LVL 18

Expert Comment

by:Sethi
ID: 16926825
Thanks for the points.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

803 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