Wrong output for CurentDirectory

Ok my app is deployed to C:/CompanyName/ProductName/

When I check curent dir on my developing machine by using My.Computer.FileSystem.CurentDirectory im getting path to corect location of my app

Now when I deploy app to Win XP POS, and same app outputs my curebt directory im getting this: C:\Documents and Settings\UserName\ well that basically MyDocumments any one knows what is going on and why it goes there

And mainly how to fix that


Thanks!

PS: Another thing to mention is that my app runs as alternated windows shell (I've seet it in admin template to run as alternative interace and not to load regular shell)




Answer this question

Wrong output for CurentDirectory

  • Jonathan Cran

    Take a look at My.Application.CurrentDirectory ... is that what you are looking for

  • Liu Hua

    no, but it worls with ports and BD, dono on other forum i wassudgested to use executable directory instead :-)

    will try it now



  • iq0

    My.app.curentDirectory is the same on that I was using just diferen path to it

    Any way I alredy solved, I will use assembly executable directory location



  • magicalclick

    Hi,

    Does your application open/save files

    When using a DialogBox to open/save a file, it changes the currentdirectory to the directory where you have opened the file.

    Greetz,

    Geert

    Geert Verhoeven
    Consultant @ Ausy Belgium

    My Personal Blog



  • TimMulholland

    tempgp,

    Except the My.Computer.FileSystem.CurrentDirectory, I suggest you to use the ClickOnce technology newly added in .NET Framework 2.0 and learn how to deployment your assembly. The followings steps shows the way:

    1. Copy Assembly_X to Server_A, Server_B, and Server_C. Place the assembly in a folder such as C:\My BizTalk Assemblies on each server.
    2. On Server_A, install Assembly_X into the common Configuration database using one of the deployment tools.
    3. On Server_B and Server_C, from the Visual Studio .NET 2003 command prompt, type the command:

      <path>gacutil.exe /if "<path to AssemblyX>"

      Note By default, the gacutil.exe is located in <drive>\ProgramFiles\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin.

    4. Additionally, you must run gacutil.exe on Server_A if you have not already installed in the GAC during deployment.



  • Wrong output for CurentDirectory