PDA

View Full Version : Forward slashes in [INSTALLDIR]?



marcel.roma
07-17-2013, 07:00 PM
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

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

marcel.roma
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)?

Roman1
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.

marcel.roma
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:

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)?

Roman1
07-19-2013, 09:17 AM
http://community.flexerasoftware.com/showthread.php?171235-Backslash-forward-slash-in-targetdir

marcel.roma
07-19-2013, 03:21 PM
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