Catrina
April 4th, 2001, 09:18 AM
I am using CreateShellLink in Setup1 to create a desktop icon. When the icon is created, it calls a Batch file to set the working directory of my program. (I must have the program in the main directory, and files in sub directories that will change with customer numbers)
I either need to be able to set the working directory when creating the icon and call my program directly (which uses the icon I need) or set the icon I want when creating the icon.
I'm just not sure how to do either of these if possible.
Here is the code I use to call the CreateShellLink Sub:
Dim strProgramPath as string
Dim strGroup as string
Dim strProgramIconTitle as string
Dim strProgramArgs as string
''Uses The correct icon, but wrong working directory
''strProgramPath = "c:\pdp\ipdpwin.exe"
''Use MSDOS icon and sets working directory
strProgramPath = "c:\pdp\Pay.bat"
strGroup = "..\..\DeskTop"
strProgramIconTitle = "PDP Payroll"
sParent = "$(Programs)"
CreateShellLink strProgramPath, strGroup, strProgramArgs, strProgramIconTitle, true, sParent
I either need to be able to set the working directory when creating the icon and call my program directly (which uses the icon I need) or set the icon I want when creating the icon.
I'm just not sure how to do either of these if possible.
Here is the code I use to call the CreateShellLink Sub:
Dim strProgramPath as string
Dim strGroup as string
Dim strProgramIconTitle as string
Dim strProgramArgs as string
''Uses The correct icon, but wrong working directory
''strProgramPath = "c:\pdp\ipdpwin.exe"
''Use MSDOS icon and sets working directory
strProgramPath = "c:\pdp\Pay.bat"
strGroup = "..\..\DeskTop"
strProgramIconTitle = "PDP Payroll"
sParent = "$(Programs)"
CreateShellLink strProgramPath, strGroup, strProgramArgs, strProgramIconTitle, true, sParent