Red Prince
26th February 2003, 04:23
Hello, this is my first post here. First, I would like to express my gratitude for such a nice installer package! Second, I have searched for the answer to my question and did not find it. Here, then, is the question:
I am installing a server that always runs. So, when uninstalling, I use the /REBOOTOK option for the program executable. That works very well. However, I also need to delete the directory the executable is in and, optionally, its parent directory. So I do:
Delete /REBOOTOK $INSTDIR\program.exe
; MUST REMOVE UNINSTALLER, too
Delete $INSTDIR\uninstall.exe
; remove directories used.
RMDir /r "$INSTDIR"
RMDir "$PROGRAMFILES\Company Name"
(The "Company Name" is the parent directory of $INSTDIR). The problem is the directories do not get deleted because program.exe is still running, so it is deleted upon reboot. I tried to specify /REBOOTOK after the RMDir, but the compiler smote me.
If there is a way to have these directories removed on reboot (with the "Company Name" one only if nothing else is left inside it), please let me know.
Thanks,
Adam
I am installing a server that always runs. So, when uninstalling, I use the /REBOOTOK option for the program executable. That works very well. However, I also need to delete the directory the executable is in and, optionally, its parent directory. So I do:
Delete /REBOOTOK $INSTDIR\program.exe
; MUST REMOVE UNINSTALLER, too
Delete $INSTDIR\uninstall.exe
; remove directories used.
RMDir /r "$INSTDIR"
RMDir "$PROGRAMFILES\Company Name"
(The "Company Name" is the parent directory of $INSTDIR). The problem is the directories do not get deleted because program.exe is still running, so it is deleted upon reboot. I tried to specify /REBOOTOK after the RMDir, but the compiler smote me.
If there is a way to have these directories removed on reboot (with the "Company Name" one only if nothing else is left inside it), please let me know.
Thanks,
Adam