CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2006
    Posts
    3

    ShortCut Creation While installing

    While installing package now exe is coming in program list only.I want To create a shortcut to desktop also automatically while time package installing.Help me [lease

  2. #2
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: ShortCut Creation While installing

    What Package and deploment app are you using ???
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  3. #3
    Join Date
    May 2005
    Posts
    26

    Re: ShortCut Creation While installing

    There are 2 ways.
    1st - Using third party application to create the Setup Package. Like Inno Setup for example. Search for this software & download it.

    2nd - Updating the Setup1.vbp to create desktop shortcut & recompile it. Before attempting this modification, make sure you backup the Setup1.vbp files. By the way, you can find the Setup1.vbp in the Visual Studio Path. In my machine it is located at C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Setup1. The steps to update this project are as follows:
    1. In frmSetup1, find the Form_Load, look for the line:
      Code:
      If (GetGroup(gsICONGROUP, iLoop) = gsSTARTMENUKEY) Or (GetGroup(gsICONGROUP, iLoop) = gsPROGMENUKEY) Then
      and modify it to be:
      Code:
      If (GetGroup(gsICONGROUP, iLoop) = gsSTARTMENUKEY) Or (GetGroup(gsICONGROUP, iLoop) = gsPROGMENUKEY) Or (GetGroup(gsICONGROUP, iLoop) = "DESKTOP") Then
    2. In basSetup1 find the CreateIcons Sub & look for the lines:
      Code:
      Loop
      CreateOSLink frmSetup1, strGroup, strProgramPath, strProgramArgs, strProgramIconTitle, fPrivate, sParent
      and update them to be:
      Code:
      Loop
      If UCase(strGroup) = "DESKTOP" Then
          strGroup = "..\..\Desktop"
      End If
      CreateOSLink frmSetup1, strGroup, strProgramPath, strProgramArgs, strProgramIconTitle, fPrivate, sParent
    3. Now compile the Setup1.vbp & make an EXE file in the PDWizard folder.

    You can use P&D Wizard to create your Package. After Creating your Package you have to modify the Setup.lst file as follows:
    • Look for section [IconGroups], if it is not found just add it.
    • At the bottom of this section add the following:
      Groupn=Desktop
      PrivateGroupn=True
      Parentn=$(Programs)

      where n is 0,1,...etc depending on the number that you found in your file.
    • Next, after the IconGroups, add a new section [Desktop], as follow:
      [Desktop]
      Icon1="Your Application.exe"
      Title1=Your Application
      StartIn1=$(AppPath)

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: ShortCut Creation While installing

    You can get Inno Setup (free) and Inno Script from the site of one of the VBF members site, randem, who wrote Innos Script in VB. www.randem.com Inno Script now costs $15, but gives you a GUI that writes all the options that you may want for you. The new version is noticeably faster than previous versions, which is the reason for the slight charge. I decided that I didn't want to mess around with the setup.vbp to start changing things, and at the time Inno Script was free. It took a while to search for dependencies, but still solved the problems that I had with the P&D Wizard, plus allowed desktop and quicklaunch icons. Plus, it automatically runs your app after it is installed.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: ShortCut Creation While installing

    Quote Originally Posted by GodsOwnNative
    While installing package now exe is coming in program list only.I want To create a shortcut to desktop also automatically while time package installing.Help me [lease
    You could even use Package & Deployment Wizard to create the Desktop Shortcut for your application during setup. Take a look at the following:

    http://www.vbcity.com/forums/faq.asp...grade#TID10518


    Also take a look at this post for creating the Shortcut using API
    http://www.codeguru.com/forum/showpo...67&postcount=2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured