I'm having trouble using macros in my .inf file that I'm using to create my cab, specifically when setting the InstallDir
string. If I do something like this:
InstallDir=\<PathToProgramFiles>\MyAppName
then everything works fine. However, if I do this:
InstallDir=%CE1%\MyAppName
then I get the following error when trying to install the cab (double tapping it on my device): "MyAppName was not installed successfully. Please run Setup again."
This only seems to apply to the built-in macro strings. I can use %AppName%
without any problems. Maybe there is some registry setting that isn't properly set that would normally resolve the %CE1%
macro?
Any ideas about what is going on?
Edit: My device doesn't have a \Program Files
directory. It seems the %CE1%
macro always resolves to that path and if the InstallDir
specified in the inf file doesn't exist (with the exception of the last directory portion then the install fails. Manually creating \Program Files
fixed the issue. Since a lot of the devices I'm working with have different paths for their Program Files directory, is there a generic way to get the installer to default to the actual Program Files dir? I guess my only other option is to not specify a path and force the user to choose one?