2

I am makeing add-in application in vb.net and also making setup for that, but i need some help in instller.vb class file

i want to copy TestAddIn.addin file to client location,and this is added with setup file how can i do code in installer file that it copy to client machine?

target path :

Dim addinTargetPath As String = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Visual Studio 2008\Addins")

source path:

dim addinsourcePath As String =....................???????????

what to write in source path that give me current working directory?

Preet Sangha
  • 64,563
  • 18
  • 145
  • 216
jeegnesh
  • 328
  • 1
  • 6
  • 15

2 Answers2

1

This is similar to the question executable directory where application is running from; the answer provided by Justin Niessner is a very good solution and will return the path of the currently executing application

The returned string will have the format "Path:\Directory" so you will have to trim the first 6 characters to use it as a path string in your program. This is how I used it in one of my programs

strPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase)
i = strPath.Count
strPath = strPath.Substring(6, i - 6)
Community
  • 1
  • 1
Wayne
  • 477
  • 9
  • 16
-2

To get the current working directory: http://msdn.microsoft.com/en-us/library/system.io.directory.getcurrentdirectory.aspx

jason
  • 3,821
  • 10
  • 63
  • 120