Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wix: does INSTALLDIR always end in a slash?

I think the default dir gets a trailing slash.

But what if the user selects a different directory?

Is there a way for the INSTALLDIR to NOT have a trailing slash?

It's not that I want it to not have a trailing slash. I want to know if I can count on it, so that, for example,

[INSTALLDIR]Filter.dll 

...will always resolve to a real, valid filesystem path.

Currently I use

[INSTALLDIR]\Filter.dll

and I get a double-slash in there. It's valid and resolves, but I'd like to eliminate the double slash.

thanks.

like image 219
Cheeso Avatar asked Apr 28 '10 22:04

Cheeso


2 Answers

Windows Instaler directory table entries ( which become properties after costing ) are always formatted by MSI to contain a trailing backslash. Including extra slashes will not harm the resolution.

like image 143
Christopher Painter Avatar answered Oct 31 '22 14:10

Christopher Painter


It is my understanding that Windows Installer will add a backslash to any Directory table entry. Therefore, yes, you can eliminate your slash and not worry about things breaking.

In fact, this has even prompted InstallShield to create a KB article describing how to REMOVE the backslash...

http://kb.flexerasoftware.com/selfservice/viewContent.do?externalID=Q106587

like image 40
William Leara Avatar answered Oct 31 '22 14:10

William Leara