Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A Delphi application and Vista.Problems

354 views
Skip to first unread message

FrancoJommi

unread,
May 23, 2007, 10:56:54 AM5/23/07
to
Using my normal installation procedure (Installshield 4 that came with
Delphi 6) i have moved a Delphi application to a new PC with WindowsVista
installed. It looks nicer, but it doesn't work. Not entirely of course. At
first I thought it was all right, but then I started getting the following
message:
"Network installation failed.
File or directory does not exist.
File C:\PDOXUSRS.NET
Permission denied.
Directory: C:\ "

I don't have Delphi installed on this machine, so I couldn't debug, but I
have the impression that I get this message when executing some SQL query. I
am not sure though.

My application works with the BDE and dBase files. Some of the functions
work well and I can see the content of the dbf files.
I am very worried about this. I don't know what to do. I have a week vacatin
ahead of me and I guess I have to bring back the application to where it
was, but then ?
Any experience ?


DB-1

unread,
May 23, 2007, 11:30:17 AM5/23/07
to
FrancoJommi wrote:
>
> "Network installation failed.
> File or directory does not exist.
> File C:\PDOXUSRS.NET
> Permission denied.
> Directory: C:\ "

Sounds like a typical Paradox NetDir problem. All BDE apps use Paradox
file format for it's temporary files when accessing _any_ database,
including dBase databases of course.

Using Queries needs storage for temporary data, and BDE tries to put
this data to the location where BDE's "NET DIR" setting points. If you
have not pointed it anywhewre, then BDE uses root directory of C:\ as
default (if I remember it correctly).

My quess is that just Vista does not like anyone writing anything to the
root.

So use your BDE Administrator app to set the NET DIR point to some other
directory for temporary files, and I quess this problem is gone.
DB-1

FrancoJommi

unread,
May 24, 2007, 9:49:10 AM5/24/07
to
I tried immediately, but I can't see where to set the location for
temporary data or anything else.
I only have today and tomorrow...

"DB-1" <d...@newsgroups.only.com> ha scritto nel messaggio
news:46545E09...@newsgroups.only.com...

DB-1

unread,
May 24, 2007, 12:53:12 PM5/24/07
to
FrancoJommi wrote:
>
> I tried immediately, but I can't see where to set the location for
> temporary data or anything else.

In BDE Administrator check this:

Configuration -> Drivers -> Native -> Paradox -> NET DIR

> I only have today and tomorrow...

That's plenty:) Use the second of them by having a nice day-off.

FrancoJommi

unread,
May 24, 2007, 6:47:02 PM5/24/07
to
Sorry, I just couldn't see this path! I swear I spent quite some time trying
to detect where to set this path. Thanks.
In the meantime, I tried executing the application with administrator
privileges, and, at least at first site, it looks like the error I was
receiving didn't occurr. Is relocating the NET DIR still necessary ?

"DB-1" <d...@newsgroups.only.com> ha scritto nel messaggio

news:4655C2F8...@newsgroups.only.com...

Maarten Wiltink

unread,
May 25, 2007, 4:39:47 AM5/25/07
to
"FrancoJommi" <franco...@tin.it> wrote in message
news:465615e8$0$4787$4faf...@reader4.news.tin.it...

> In the meantime, I tried executing the application with administrator
> privileges, and, at least at first site, it looks like the error I was
> receiving didn't occurr. Is relocating the NET DIR still necessary ?

YES!

Do you want your application to not work for normal users?

Groetjes,
Maarten Wiltink


DB-1

unread,
May 25, 2007, 7:27:13 AM5/25/07
to
FrancoJommi wrote:
>
> Sorry, I just couldn't see this path! I swear I spent quite some time trying
> to detect where to set this path. Thanks.

Instead of usin BDE Adminstrator application, you can set both the BDE
NetDir and PrivateDir paths inside your app.

This example assumes that your app has a TDatabase component, and then
all your TTables and TQueries are pointing to this TDatabase. The code
*may* work and be valid even if your app is not built in that way.

In MainForm's or Datamoule's OnCreate, or in some other early event in
your app try adding this code:

Database.Connected := False; // I'm not sure if closing this is
mandatory.
Session.NetFileDir := ExtractFilePath(Paramstr(0));
Session.PrivateDir := ExtractFilePath(Paramstr(0));
Database.Connected := True;

That should make both the NetDir and PrivateDir point to the same
directory where your executable lies. The "session" is an invisible BDE
session that gets created automatically by BDE.

These lines are ancient, so you can be pretty sure that this code is not
tested under Vista and maybe not even under XP, at least not by myself.
DB-1

FrancoJommi

unread,
May 25, 2007, 8:11:40 AM5/25/07
to
Thanks. I will surely try.

"DB-1" <d...@newsgroups.only.com> ha scritto nel messaggio

news:4656C811...@newsgroups.only.com...

Jamie

unread,
May 25, 2007, 8:34:21 PM5/25/07
to
DB-1 wrote:

don't think that will work in Vista since it does not allow data to be
written with out changes to the security for it's own EXE path folder.


--
"I'm never wrong, once i thought i was, but was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5

DB-1

unread,
May 26, 2007, 7:46:01 AM5/26/07
to
Jamie wrote:
>
> don't think that will work in Vista since it does not allow data to be
> written with out changes to the security for it's own EXE path folder.

Without having any Vista machine in my possession, I think it will
allow. You'll just have to avoid installing your app to \Program Files
folder.

What I have heard the Vista 'security' logic goes that way, the
application can write anything anywhere, if the app is NOT installed in
to any of those special Windows folders (including Program Files). And
it also does not try to write to those special folders.

This all is my quessing only, I'll get a Vista LapTop sometime in the
next few months maybe.
DB-1

Markus Zwygart

unread,
May 29, 2007, 7:55:04 PM5/29/07
to
On Wed, 23 May 2007 16:56:54 +0200, "FrancoJommi"
<franco...@tin.it> wrote:

>"Network installation failed.
>File or directory does not exist.
>File C:\PDOXUSRS.NET
>Permission denied.
>Directory: C:\ "

Have a look at the blog from Frederik Haglund (Codegear):
http://blogs.codegear.com/fhaglund/archive/2007/05/09/34459.aspx

Regards,
Markus

Laurie Boshell

unread,
May 30, 2007, 9:27:05 AM5/30/07
to

"FrancoJommi" <franco...@tin.it> wrote in message
news:465456fe$0$17953$4faf...@reader1.news.tin.it...

> Using my normal installation procedure (Installshield 4 that came with
> Delphi 6) i have moved a Delphi application to a new PC with WindowsVista
> installed. It looks nicer, but it doesn't work. Not entirely of course. At
> first I thought it was all right, but then I started getting the following
> message:
> "Network installation failed.
> File or directory does not exist.
> File C:\PDOXUSRS.NET
> Permission denied.
> Directory: C:\ "

I had virtually the same problem.
Vista does not like any program reading or writing files to the root (c:\).
Change the property of your program (IIRC: right click on program file and
select properties for you vista explorer) to run as an administrator...that
solved
it for me.
Hope that helps.
Laurie


0 new messages