I try to install a service unless it is already installed. If there is a service with the same name then I delete the component so a user can't choose to install it. I check to see if the service exists by getting the image path from the registry. That returns a string starting with a double quote (") and ending with a double quote-space (" ). In between those delimiters is the path of the service executable.
I've been wracking my brain for the past couple hours trying to figure out why comparing the registry value to "$TARGETDIR$\\myservice.exe" (including quotes) wasn't working (stupid space at the end) and was about to post here for help when I figured it out. If others are having similar problems, look for extra spaces.
Note to others about paths from the registry
-
- Posts: 15
- Joined: Tue Nov 21, 2006 5:16 pm
Who is online
Users browsing this forum: No registered users and 89 guests