View Full Version : Forward slashes in [INSTALLDIR]?

07-17-2013, 07:00 PM

for a VSTO add-in installation on a Windows machine I need to be able to set a registry value like this:


The problem is that [INSTALLDIR] will use the backslash as a path separator which results in:

file:///C:\Program Files\MyAddInInstallDir\MyAddIn.vsto|vstolocal

What I really need is the forward slash (to comply with the file URI scheme):

file:///C:/Program Files/MyAddInInstallDir/MyAddIn.vsto|vstolocal

Any ideas?

Thank you.

07-18-2013, 03:40 AM
You needed to add "file:///" to the beginning of registry setting in Manifest key.
Manifest entry is now "file:///[INSTALLDIR]ADDINNAME.vsto|vstolocal".
Rebuilt setup project and reinstall addin.
It will work.

Read also this paper:

07-18-2013, 04:19 AM
Thank you for your suggestion. This is the exactly what I had in my original posting, and it definitely does not work the way I need it.
After rebuilding the setup and installing the add-in the result is still (please observe the backslashes):

file:///C:\Program Files\MyAddinInstalldir\MyAddIn.vsto|vstolocal

I don't have problems with VSTO, but with getting the forward slashes I need. Any other ideas (w/o custom actions and scripting)?

07-18-2013, 07:53 AM
I have checked our Word 2007 AddIn installation:

In the registry editor I can see as follow:

manifest REG_SZ file:///c:\AddIn\WordAddIn2007.vsto|vstolocal

It does work on all Windows OS. Perfect.

07-18-2013, 08:37 AM
Thank you again for trying this out. I wouldn't be posting here if it was only for how VSTO add-in loading works.

For some intricate reason however I need to be able to use *only forward slashes* with the Manifest-value. So - once again - my problem here is strictly InstallShield related, and has very little to do with VSTO.

Say I wanted to write this entry to the registry:


Now, I can't hardcode "c:/foo" because it's the user's choice at install time, neither can I use the more dynamic "[INSTALLDIR]" because this only gives me backslashes in Windows.
So how would you go about it (without scripting or custom actions)?

07-19-2013, 09:17 AM

07-19-2013, 03:21 PM

Given your link, I'll assume that there is no way to do what I need without scripting.
Thanks for your help anyway.