P&D Wizard desktop shortcut problem-VBForums
Results 1 to 5 of 5

Thread: P&D Wizard desktop shortcut problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    206

    P&D Wizard desktop shortcut problem

    Hi,

    I have tried to solve this problem myself, I am here as last resort.

    My VB6 application can create a desktop icon during setup which is great, but the P&D wizard doesn't create the program's .exe file in the folder the user selected. My program creates the desktop shortcut in XP but an error was created in Vista that said "unable to create desktop shortcut"....

    I have read tutorials on editing the P&D wizard setup code, and it seems correct. Maybe I haven't edited the setup.lst file properly. The Group1=DESKTOP and [DESKTOP] headings is text I have added myself from tutorials.

    Also, my program's icon image is not "linked" to the desktop shortcut, perhaps this will work once my
    program's .exe file is saved in the installation folder.

    Here is my Setup.lst code:

    [IconGroups]
    Group0=Client_Master
    PrivateGroup0=-1
    Parent0=$(Programs)

    Group1=DESKTOP
    PrivateGroup1=-1
    Parent1=$(Programs)

    [Client Master]
    Icon1="Client_Master.exe"
    Title1=Client Master
    StartIn1=$(AppPath)

    [DESKTOP]
    Icon1="Client_Master.exe"
    Title1=Client Master
    StartIn1=$(AppPath)

    [Setup]
    Title=Client Master
    DefaultDir=$(ProgramFiles)\Client Master
    AppExe=Client_Master.exe
    AppToUninstall=Client_Master.exe
    Last edited by batman321; Dec 27th, 2012 at 05:03 PM.

  2. #2
    Web developer Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    12,437

    Re: P&D Wizard desktop shortcut problem

    Where does the setup create the executable file?
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    206

    P&D Wizard desktop shortcut problem

    The setup doesn't create an executable file in the installation folder. The only executable file I can see is the desktop shortcut. It seems the desktop shortcut is looking for the .exe file in the installation folder, (because the file path to the main .exe file is correct)...

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    206

    Re: P&D Wizard desktop shortcut problem

    I followed this website: http://www.planetsourcecode.com/vb/s...43727&lngWId=1

    The last comment on this page says ""..\..\Desktop" and fCreateShellLink no longer okay on some systems like Vista. Instead, one should create desktop shortcut using other means, e.g. Windows Script Host Object Model.
    And, in order to automatically have the shortcut removed on program uninstall, write the shortcut link file to ST6UNINST."

    That is why I have trouble creating a desktop shortcut in Vista.

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Posts
    11,011

    Re: P&D Wizard desktop shortcut problem

    Windows Application Guidelines have long suggested you avoid creating desktop shortcuts anyway. This is the most likely reason the PDW doesn't support them. I find them annoying myself when DivX, Acrobat Reader, etc. dump them on there and almost always immediately remove them.


    If you come up with a working technique in code to create one, you might look at the Project in:

    C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Setup1

    Copy that project and alter it to create a custom setup1.exe to use when packaging with the PDW.


    If you have Visual Studio 6.0 Installer 1.1 (the free 1999 replacement for the PDW, no longer available from Microsoft Downloads) you can probably do what you want with that. Quality 3rd party packagers can also do such things, being based on Windows Installer technology themselves.

    I'd avoid looking at additional 3rd party legacy scriptable installers though. Many of them can be fairly hazardous to the health of your target systems. I am quite tired of cleaning up after bad and broken "Inno Setup" installs and uninstalls - they can easily break other applications. That can be a powerful tool but it can also be like a chainsaw that has no safety devices on it. You have to be hypervigilant to create a safe package with it.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.