View Full Version : Predefined Variable - Incorrect Syntax CommonFilesFolder

10-06-2014, 10:49 AM

I've think I've tried every combination of syntax to get to a Pre-defined variable path and can't seem to find it, Im creating a basic MSI Project and have an install script within it, I'm attempting to use the CommonFilesFolder;

szDriversPath = [COMMONFILESFOLDER]"Test\\driver000";

So far I've tried loads of combinations and failed with a "[ is missing error", could someone help me get the right syntax for this please?

I've tried;

szDriversPath = <COMMONFILESFOLDER>"Test\\driver000";
szDriversPath = [CommonFilesFolder]"Test\\driver000";
szDriversPath = <CommonFilesFolder> ^ "Test\\driver000";
szDriversPath = @<CommonFilesFolder> ^ "Test\\driver000";

Anyhelp would be greatly appreciated.

10-07-2014, 01:47 PM
You can either use the Windows Installer Property by declaring szCommonFiles and calling MsiGetProperty(hInstall, "CommonFilesFolder", szCommonFiles, MAX_PATH), or use the InstallScript path variable COMMONFILES. Once you have that, you can concatenate it with your path using the caret operator: szCommonFiles ^ "Test\\driver000" or COMMONFILES ^ "Test\\driver000"

10-09-2014, 09:38 AM
Try this:

szDriversPath = [<COMMONFILESFOLDER>]"Test\\driver000";