Registry search strange behavior - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

vdupras
Posts: 3
Joined: Fri Feb 09, 2007 5:22 pm

Registry search strange behavior

I want to perform a custom action when a file that is pointed to by a registry key is present. Thus, I want the property to be null if either the reg key is not there, or the file that the key is pointing to is not present.

So I create a new registry search, enter my key path, and choose "The value contains a path to a file". However, when I test the search, I only get the file's directory's path ("C:\path\to" instead of "C:\path\to\file.exe")! Even worse: If I delete "file.exe", I still get "C:\path\to". And even stranger: If I delete the whole "to" directory, I get "C:\"

What's wrong?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Actually this is the Windows Installer behavior. Both "The value contains a path to a file" or "The value contains a path to a directory" options return a path.

The "The value contains a path to a file" option return the path to the parent folder of the file and the "The value contains a path to a directory" option returns the full path of a directory (if the directory does not exist the property is set to null).

http://msdn2.microsoft.com/en-us/library/aa371171.aspx

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
vdupras
Posts: 3
Joined: Fri Feb 09, 2007 5:22 pm

Thanks for clearing things up.

Return to “Common Problems”