Results 1 to 7 of 7

Thread: How Do You Make The Set Up Routine Create A Shortcut In The Menu Or Onto The Desktop

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    UK
    Posts
    300

    How Do You Make The Set Up Routine Create A Shortcut In The Menu Or Onto The Desktop

    Hi Guys
    Can you make the set up place a shortcut onto the users menu system or even a shortcut onto the desktop is either possible and if so how is this done

    thx
    Locutus
    Resistance is futile

  2. #2
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    UK
    Posts
    300

    thx for that link

    But can you tell me if set up can do this

    'NOTE: In Visual Basic 5.0, change Stkit432.dll in the following
    'statement to Vb5stkit.dll. Stkit432.dll is for Visual Basic 4.0

    Private Declare Function fCreateShellLink Lib "STKIT432.DLL" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long


    Dim lReturn As Long

    'Add to Desktop
    lReturn = fCreateShellLink("..\..\Desktop", _
    "Shortcut to Calculator", "c:\windows\calc.exe", "")

    'Add to Program Menu Group
    lReturn = fCreateShellLink("", "Shortcut to Calculator", _
    "c:\windows\calc.exe", "")


    or does this code have to be in the program and run from inside the program ie on form load from there it creates the shortcuts. But then there is still the problem of running the program for the first time as there will be no shortcuts until the code has been fired on the first run


    thx
    locutus
    Resistance is futile

  4. #4
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    Use this method:
    VB Code:
    1. Set Wsh = CreateObject("Wscript.Shell")
    2. Set MyShCut = Wsh.CreateShortCut(App.Path & "\example.lnk")
    3. MyShCut.TargetPath = App.Path & "\" & App.EXEName & ".exe"
    4. MyShCut.WorkingDirectory = App.Path
    5. MyShCut.WindowStyle = 4
    6. MyShCut.IconLocation = App.Path & "\" & App.EXEName & ".exe, 0"
    7. MyShCut.Save

    Hope it helps
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  5. #5
    Swatty
    Guest
    You have to recode the setup1 vbp that's delivered with access or visual studio.

    If you do so, be sure you keep a copy of the original somewhere before you manipulate it.

    Otherwise you can change the setup.lst file which is created with the setup and deployment wizard.

    'values in setup.lst
    'groups added in start menu
    [IconGroups]
    Group0=outlook_1
    'PrivateGroup0=True private menu
    PrivateGroup0=True
    'next sub where it resides under
    Parent0=$(Programs)

    [outlook_1]
    Icon1=""$(ProgramFiles)\_outlook\outlook_1.mdb""
    'icon and program to run
    Title1=outlook_1
    StartIn1=$(ProgramFiles)
    Icon2="$(ProgramFiles)\_outlook\uitlezen_lm_2000.mdb"
    Title2=uitlezen
    StartIn2=$(ProgramFiles)
    '


    this should do it

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    UK
    Posts
    300

    hi swatty

    I have edited the setup.lst file previously to create directories to install the exe into. I was hoping there would be a way to hack the setup file to make it create a shortcut.

    But I was not to clear about your instructions in your previous post of where to put the new lines in the setup.lst file.

    I have included my setup.lst file , could you show me where to insert the lines to create the shortcuts.

    Many thx for your help so far !

    Regards, Locutus
    Attached Files Attached Files
    Resistance is futile

  7. #7
    Swatty
    Guest
    In between the following Blue lines of your setup list add the following.

    File19=1,,login.in_,login.ini,$(AppPath),,,6/11/2002 15:04:47,174,,"","",""

    The lines in red are comment don't paste them in your lst file

    First you need to add an icongroup

    [IconGroups]
    Group0=logontool1 'logontool1 is the name of the group added will be used under this
    PrivateGroup0=False ' false indicates this can be seen by all users, if it has to be private to the user who install the setup set it to TRUE
    Parent0=$(Programs) ' Parent0= the path where it will be stored in the menu ie start-programs

    [logontool] 'name of the group you gave to Group0 , if needed more groups can be defined in IconGroups
    Icon1=""$(ProgramFiles)\Project1\logontool.exe""
    Title1=logontool
    StartIn1=$(ProgramFiles) 'Icon1 is the icon to use for your menu, title is the menu name to use for it, startin is where the program resides under to start when clilcked on the item
    Icon2="$(ProgramFiles)\Project1\logontool.exe"
    Title2=logontool
    StartIn2=$(ProgramFiles)
    'I made two the same menus just to show it is possible if you install more than one exe this could be helpfull

    [Setup]

    Paste in the added lines , and run your setup the icons should appear in your start menu.

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