problem with app.path
problem with app.path
problem with app.path
problem with app.path
problem with app.path
problem with app.path problem with app.path problem with app.path problem with app.path problem with app.path problem with app.path problem with app.path problem with app.path
problem with app.path problem with app.path
problem with app.path
Go Back  Xtreme Visual Basic Talk > > > problem with app.path


Reply
 
Thread Tools Display Modes
  #1  
Old 08-21-2017, 09:02 AM
starmanMike starmanMike is offline
Junior Contributor
 
Join Date: Oct 2005
Location: near Norwich, UK
Posts: 286
Default problem with app.path


Having compiled, and packaged everything with the P&DW, I installed my app, but when I actually ran it, I had an error message saying that "...VB98... is not a valid path". That was indeed equal to app.path on the PC I wrote it on, but I thought that app.path related to the installed path (otherwise obviously nothing would work other than on the coder's machine). I did a global search throughout all the project files for "VB98" and none was found (as I hoped!) so why is the version I installed looking for the VB98 folder at all? Help!
Reply With Quote
  #2  
Old 08-22-2017, 07:54 AM
Flyguy's Avatar
Flyguyproblem with app.path Flyguy is offline
Lost Soul

Super Moderator
* Guru *
 
Join Date: May 2001
Location: Vorlon
Posts: 19,160
Default

App.Path is indeed the path of where the EXE resides.

So something else must be wrong in your project.
You say you scanned all the project files, but do you also have something like INI files where a path might be stored from you runs/tests from within the IDE?
Reply With Quote
  #3  
Old 08-22-2017, 01:53 PM
starmanMike starmanMike is offline
Junior Contributor
 
Join Date: Oct 2005
Location: near Norwich, UK
Posts: 286
Default

Thanks - I think you have pointed me in the right direction. No, no ini files but... When the app is first run, if there is no "starcharts.mdb" file present, it creates it under app.path. But I just realised that there was a file with that name on the PC that I installed the app on, so that could well be why it threw the error. But I still don't see why it's looking for the /VB98 folder. That was indeed the app.path on the development machine however, so in some way that folder was 'registering' I suppose. Just wonder if anyone else has had parallel problems of this sort!
Reply With Quote
  #4  
Old 08-25-2017, 01:06 AM
loquin's Avatar
loquinproblem with app.path loquin is offline
Google Hound

Retired Moderator
* Guru *
 
Join Date: Nov 2001
Location: Arizona, USA
Posts: 12,400
Default

There is an issue with app.path returning a \ character appended to the path, if the path folder is the root folder on the drive, but not otherwise. (and that may be reversed...) I always use a function to return the path, appending a trailing \ if it's not present.
__________________
Lou
"I have my standards. They may be low, but I have them!" ~ Bette Middler
"It's a book about a Spanish guy called Manual. You should read it." ~ Dilbert
"To understand recursion, you must first understand recursion." ~ unknown
Reply With Quote
  #5  
Old 08-25-2017, 09:53 AM
starmanMike starmanMike is offline
Junior Contributor
 
Join Date: Oct 2005
Location: near Norwich, UK
Posts: 286
Default

Cheers Loquin - I knew about that, and there is an if...else that takes care of it as you mentioned (tested and works). Obviously somewhere in the various files that the PDW creates there must be a reference to where the files originally were (in this case, indeed in the /VB98 folder) otherwise there could be no other source for that reference, since the /vb98 folder exists only on the development PC.
Reply With Quote
Reply

Tags
installed, vb98, app.path, path, global, coders, search, machine, folder, files, found, project, version, hoped, equal, app, ran, p&dw, compiled, packaged, error, wrote, related, message, valid


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
problem with app.path
problem with app.path
problem with app.path problem with app.path
problem with app.path
problem with app.path
problem with app.path problem with app.path problem with app.path problem with app.path problem with app.path problem with app.path problem with app.path
problem with app.path
problem with app.path
 
problem with app.path
problem with app.path
 
-->