|
-
Aug 31st, 2003, 09:08 AM
#1
Thread Starter
Fanatic Member
App.Path & Temp Directory [RESOLVED]
Hi, I'm copying one of my apps to the Temporary directory, which I retrieve through Environ("TEMP"). The path is returned like this: C:\Docume~1\Userna~1\Temp. When I start the app from the Temp directory I want to check if it's in the right directory. Therefore I check if the App.Path is equal to the Temp path. The App.Path, however, is returned like this: C:\Documents and Settings\Username\Temp. So when I compare the two, they are not equal. Is there a way to retrieve the complete Temporary path or the DOS-path of the application (the GetTempPath API doesn't work either...)?
Thanks.
Last edited by TheVader; Aug 31st, 2003 at 10:22 AM.
Author for Visual Basic Web Magazine
-
Aug 31st, 2003, 09:38 AM
#2
Check for the number of files and directory's, if both match you are quite sure it is the same directory
-
Aug 31st, 2003, 10:04 AM
#3
Fanatic Member
This returns true on my computer:
VB Code:
MsgBox Dir(App.Path) = Dir(Environ("temp"))
while this returns False
VB Code:
MsgBox App.Path = Environ("temp")
- Use the thread tools to Mark your Thread as Resolved when your question is answered.
- Please Rate my answers if they where helpful.
-
Aug 31st, 2003, 10:09 AM
#4
Thread Starter
Fanatic Member
-
Aug 31st, 2003, 10:21 AM
#5
Thread Starter
Fanatic Member
Solved!
Finally found it! There's an API GetShortPathName that can convert the App.Path to a Short Path. Thanks folks.
Author for Visual Basic Web Magazine
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|