I have an NSIS installer that creates a registry key, such that when ActiveSync sees a device cradled, it automatically starts my application.
The creation of the key works fine (as does the ActiveSync function), but on Un-Install, the registry key is not removed.
All other registry entries created can be deleted without issue.
Any help much appreciated.
So from my "post" section:
Section "-post"
; Create the ActiveSync key so our app starts when the device is cradled
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows CE Services\AutoStartOnConnect" "${appname}" "$INSTDIR\${exe}"
And my Uninstall section:
Section "Uninstall"
; Delete the ActiveSync key so our app wont start when the device is cradled
DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows CE Services\AutoStartOnConnect\${appname}"
NSIS can't remove NSIS created registry key
10 posts
What happens if you try and delete it yourself through Regedit? What is ${appname} set to?
Stu
Stu
Originally posted by Afrow UKWith regedit it just deletes, no permission problems.
What happens if you try and delete it yourself through Regedit?
What is ${appname} set to?
${appname} = Device Integration Service
I just changed it to have no spaces, it made no difference.
What happens if you delete it from your install section after creating it?
Just to confirm, ${appname} is a constant and doesn't contain a variable with its value set to Device Integration Service.
Stu
Just to confirm, ${appname} is a constant and doesn't contain a variable with its value set to Device Integration Service.
Stu
Originally posted by Afrow UKIf I put the delete immeadiately after the create in the install section, the key is still not deleted.
What happens if you delete it from your install section after creating it?
Just to confirm, ${appname} is a constant and doesn't contain a variable with its value set to Device Integration Service.
Stu
${appname} is a constant -
!define appname "Device Integration Service"
Vista?
Originally posted by kichikXP Professional + SP2
Vista?
You're trying to delete a registry value as a key. Use DeleteRegValue.
Well spotted lol
Stu
Stu
Originally posted by kichikThat was it! Many thanks.
You're trying to delete a registry value as a key. Use DeleteRegValue.
FWIW: RegMon (http://www.microsoft.com/germany/tec...es/Regmon.mspx)
helped tracing the reads & writes.
I was just about to post a screen-shot of it creating the key,
then failing to find the key on the next command - the delete.
Thanks again!