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
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
'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
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
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)
'
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.
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.