cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
marcel_roma
Level 3

Forward slashes in [INSTALLDIR]?

Hi,

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

file:///[INSTALLDIR]MyAddIn.vsto|vstolocal

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.
Marcel
Labels (1)
0 Kudos
(6) Replies
Roman1
Level 9

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:
http://social.msdn.microsoft.com/Forums/vstudio/en-US/9972f335-2d92-4674-bb82-324da39e02ae/unable-to-install-own-exceladd-in-vsto-on-office64-win64
0 Kudos
marcel_roma
Level 3

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)?
0 Kudos
Roman1
Level 9

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.
0 Kudos
marcel_roma
Level 3

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:

file:///c:/foo/boo.txt

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)?
0 Kudos
marcel_roma
Level 3

Roman1 wrote:
http://community.flexerasoftware.com/showthread.php?171235-Backslash-forward-slash-in-targetdir


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

Marcel
0 Kudos