CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 1999
    Location
    CA
    Posts
    83

    PDWizard and Uninstall

    I want to create a registry key (during program installation) that will run my app at startup. I was wondering what form I should do this on and when would be the most optimal time to do this during the setup procedure. Also (and more importantly), since I am creating this key, what do I have to edit so that uninstalling the app will remove the registry entry as well? Thanks in advance.


  2. #2
    Join Date
    Sep 1999
    Location
    Red Wing, MN USA
    Posts
    312

    Re: PDWizard and Uninstall

    Make your modifications in frmSetup1, if you use the Registry Functions in the Setup1 Project, it will automatically add them to the Uninstall log for removal when the App is uninstalled. The best time to add them would be after the File copying and before the cleanup process.

    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Aaron Young
    Senior Programmer Analyst (Red Wing Software)
    Certified AllExperts Expert

  3. #3
    Join Date
    Sep 1999
    Location
    CA
    Posts
    83

    Re: PDWizard and Uninstall

    Thank you for your reply, it was exactly what I was looking for, however since I am kind of new to this I was wondering if you could expand on your response a little. I looked through the code of the frmSetup1.frm and the function I found was "RegisterFiles" which is a function in
    the basSetup1.bas that reads through setup1.lst to do what it has to. Since the P&D Wizard will copy the app I want to run on startup over I just want to be able add the registry key for my app in
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\

    I have found this function in the basSetup1.bas
    Private Declare Function OSRegCreateKey Lib "advapi32" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpszSubKey As String, phkResult As Long) As Long

    should I use this function in the frmsetup1.frm after the RegisterFiles is called?
    Thanks for your patience and assistance.



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