Last post Jun 24, 2011 11:09 AM by codeaholic
Jun 23, 2011 05:29 PM|codeaholic|LINK
I have a Com addin written in vb.net. I need to shell out to a couple of external programs. The problem is "finding" those programs. I don't have any control of "WHERE" they will be installed...the application decides where it will put them.
It puts them in
C:\Documents and Settings\"USER"\Application Data\Microsoft\Expression\Web 4\Addins\"Name of Addin"
So each time the path will be different on different computers and users.
If I call
C:\Program Files\Microsoft Expression\Web 4
That is NOT where my application is. However, that is where the calling application to be COM dll is.
How do I solve this problem? Anybody got any advice?
Thanks in advance.
Jun 23, 2011 10:35 PM|atconway|LINK
The only way I can think is to create environmental variables on the machine ahead of time that specify the application's path. You could possibly script the varibales creation on install, and then later reference the varibale in the shell command from VB.NET.
So maybe you create an environmental variable named %myaddinpath% or whatever. Each machine would have the same variable name, but point to the unique directory where installed on that machine. Take a look to the following link:
Create your own environment variables for quick folder navigation:
If this does work for you, it is more of a scripting and install action and outside this ASP.NET forum so you might want to check out the
http://social.msdn.microsoft.com/Forums/en/categories/ for this type of help.
Jun 24, 2011 11:09 AM|codeaholic|LINK
I can't. The add-in is for Expression web4. They handle the whole install and have developed their own way to support external programs. This is the best that I could come up with.
'This is the path where Add-ins
Public AddinPath As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\Microsoft\Expression\Web 4\Addins\MyAddin\"