Click to See Complete Forum and Search --> : PDWizard and Uninstall
bcyde
October 8th, 1999, 01:13 PM
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.
Aaron Young
October 8th, 1999, 03:30 PM
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
adyoung@win.bright.net
aarony@redwingsoftware.com
bcyde
October 11th, 1999, 01:03 PM
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.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.