Share via


How to Correctly Pass TARGETDIR to A Custom Action?

If you have a custom action setup, passing TARGETDIR to the custom action, and suddenly you are experiencing weird error, you may have incorrectly passed the TARGETDIR. Sometimes the Event Viewer have this entry:

The description for Event ID ( 11001 ) in Source ( MsiInstaller ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Product: Your Product -- Error 1001. Error 1001. Exception occurred while initializing the installation:
System.IO.FileNotFoundException: Could not load file or assembly 'file:///some path' or one of its dependencies. The system cannot find the file specified.., (NULL),

The correct way to pass TARGETDIR is by enclosing it in double-quotes and added a backslash at the end. For example: /param="[TARGET]\". MSDN link here.