ExclamationSolvedIdentifying Correct Path

Posts 1–11 of 11 · Page 1 of 1
Identifying Correct Path
Hello MPGH member. i really need your helpt to fix this.
i want this code
Code:
If Not Directory.Exists(GetFolderPath(SpecialFolder.ApplicationData) & "\MineCafe") Then
            Directory.CreateDirectory(GetFolderPath(SpecialFolder.ApplicationData) & "\MineCafe")
        End If
to this.
Code:
If Not Directory.Exists(GetFolderPath(Application.StartupPath) & "\Config") Then
            Directory.CreateDirectory(GetFolderPath(Application.StartupPath) & "\Config")
        End If
but when i cange the code the program crash? does some one know how to fix it?
Thanks if someone reply
Quote Originally Posted by maxkaxx View Post
Hello MPGH member. i really need your helpt to fix this.
i want this code
Code:
If Not Directory.Exists(GetFolderPath(SpecialFolder.ApplicationData) & "\MineCafe") Then
            Directory.CreateDirectory(GetFolderPath(SpecialFolder.ApplicationData) & "\MineCafe")
        End If
to this.
Code:
If Not Directory.Exists(GetFolderPath(Application.StartupPath) & "\Config") Then
            Directory.CreateDirectory(GetFolderPath(Application.StartupPath) & "\Config")
        End If
but when i cange the code the program crash? does some one know how to fix it?
Thanks if someone reply
B - Marked
Maybe that?

Code:
If Not Directory.Exists(GetFolderPath(Application.StartupPath) & "\Config") Then
Code:
            Directory.CreateDirectory(GetFolderPath(Application.StartupPath) & "\Config")
        End If


Code:
If Not Directory.Exists(GetFolderPath(SpecialFolder.ApplicationData) & "\MineCafe") Then
Code:
            Directory.CreateDirectory(GetFolderPath(SpecialFolder.ApplicationData) & "\MineCafe")
        End If


1:
Application.StartupPath
2:
SpecialFolder.ApplicationData

I don't know tho. (Since I don't code VB.Net)
Quote Originally Posted by Jorndel View Post


B - Marked
Maybe that?

Code:
If Not Directory.Exists(GetFolderPath(Application.StartupPath) & "\Config") Then
Code:
            Directory.CreateDirectory(GetFolderPath(Application.StartupPath) & "\Config")
        End If


Code:
If Not Directory.Exists(GetFolderPath(SpecialFolder.ApplicationData) & "\MineCafe") Then
Code:
            Directory.CreateDirectory(GetFolderPath(SpecialFolder.ApplicationData) & "\MineCafe")
        End If


1:
Application.StartupPath
2:
SpecialFolder.ApplicationData

I don't know tho. (Since I don't code VB.Net)
B marked ? o.O
i dont know enether :/
Quote Originally Posted by maxkaxx View Post
B marked ? o.O
i dont know enether :/
First is startup
Other is AppData :S
Quote Originally Posted by Jorndel View Post


First is startup
Other is AppData :S
yeh, but i want every thing to be on startup.
I think the first source is for minecraft (Installation directory is appdata)

The second source is the same directory where the user start the exe.
Quote Originally Posted by combat_arms_981 View Post
I think the first source is for minecraft (Installation directory is appdata)

The second source is the same directory where the user start the exe.
hehe thats true!
This is why people should learn to use Visual Studio's rich debugging features. One breakpoint and you'd realize that Application.StartupPath is already a fully qualified directory.

Code:
If Not IO.Directory.Exists(IO.Path.Combine(Application.StartupPath, "Config")) Then
    IO.Directory.Create(IO.Path.Combine(Application.StartupPath, "Config"))
End If
Simple.
[/code]
Quote Originally Posted by Broderick View Post
This is why people should learn to use Visual Studio's rich debugging features. One breakpoint and you'd realize that Application.StartupPath is already a fully qualified directory.

Code:
If Not IO.Directory.Exists(IO.Path.Combine(Application.StartupPath, "Config")) Then
    IO.Directory.Create(IO.Path.Combine(Application.StartupPath, "Config"))
End If
Simple.
[/code]
couldnt agree more.
Quote Originally Posted by Broderick View Post
This is why people should learn to use Visual Studio's rich debugging features. One breakpoint and you'd realize that Application.StartupPath is already a fully qualified directory.

Code:
If Not IO.Directory.Exists(IO.Path.Combine(Application.StartupPath, "Config")) Then
    IO.Directory.Create(IO.Path.Combine(Application.StartupPath, "Config"))
End If
Simple.
[/code]
Thanks ^^
*** To Short Message ***
GJ Broderick.

Marked Solved. No more posting !
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

Need help?