Discussion:
Vista familly edition
(too old to reply)
4m
2008-11-27 20:56:11 UTC
Permalink
My question is too complicated for my English...

Une de mes applications est installée chez un client sur VISTA Edition
Familiale.
Deux PC forment un petit réseau local et la database se trouve dans l'un des
2 postes de travail.
J'utilise un alias pour faire le lien programme-BDE.
Dans le programme j'utilise BEGINTRANS, COMMIT et ROLLBACK lors des
écritures, et les procédures sont insérées dans TRY et CATCH.

Lorsque mon client travaille sur les 2 postes en même temps il se produit
des pertes de données sans affichage d'erreur.

Celà pourrait-il venir d'une mauvaise gestion du réseau de VISTA Edition
Familiale?

Merci d'avance

Etienne Gounon
Geoff Wass [dBVIPS]
2008-11-28 06:30:10 UTC
Permalink
Post by 4m
My question is too complicated for my English...
Une de mes applications est installée chez un client sur VISTA Edition
Familiale.
Deux PC forment un petit réseau local et la database se trouve dans l'un des
2 postes de travail.
J'utilise un alias pour faire le lien programme-BDE.
Dans le programme j'utilise BEGINTRANS, COMMIT et ROLLBACK lors des
écritures, et les procédures sont insérées dans TRY et CATCH.
Lorsque mon client travaille sur les 2 postes en même temps il se produit
des pertes de données sans affichage d'erreur.
Celà pourrait-il venir d'une mauvaise gestion du réseau de VISTA Edition
Familiale?
Merci d'avance
Etienne Gounon
This is a *rough* translation of Etienne's question:


One of my applications is installed on a client's PC on Windows Vista
Home Edition.

Two PCs form a small local area network and the database is found on one
of the workstations.

I used a BDE alias in the program.

In the program I used BEGINTRANS, COMMIT and ROLLBACK when there is
writing of data and the procedures are inserted between a TRY and CATCH.

When my client works on the two workstations at the same time he
produces data loss without causing an error.

What would cause such bad network management in Vista Home Edition?
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
Lysander
2008-11-28 09:20:01 UTC
Permalink
Post by Geoff Wass [dBVIPS]
When my client works on the two workstations at the same time he
produces data loss without causing an error.
What would cause such bad network management in Vista Home Edition?
I would bet a lot of good wine that it's got NOTHING to do with Vista
Home, but with either a bad conception of shared network access, or with
a wrong setting in the BDE.

You do not just install Vista over a an existing XP, usually.
Usually you do a clean install of vista and then later install dBase and
BDE, and that is probably done with standard values which might not be
appropriate.
If you are using TRANSACTION/ROLLBACK/COMMIT with DBFs (generally a bad
idea in modern windows systems!!!) it means that the BDE is holding back
"written" data. BDE needs a place to keep that data temporarily, doesn't it?
Check out if this location is one of the protected or virtualized
directories in Vista.

All editions of Vista are inflicting a big penalty on
developers/applications who are writing data into windows-folders that
are not designed for this.

Etienne should check if his application is writing into any of the
"special folders", and if it is probably using hard coded paths.

If his application does not, probably the BDE is.
www.sysinternals.com, get FileMon.exe and see what is going on.
Andrew Shimmin
2008-11-28 10:49:13 UTC
Permalink
I agree ... and if the application is run from the data server, rather than each individual client, the application may be colliding on BDE temporary objects in the default dBase startup folder.

The $64K question is:

Has the application been designed, at the outset, for multi-user?

regards, andrew
Post by Lysander
Post by Geoff Wass [dBVIPS]
When my client works on the two workstations at the same time he
produces data loss without causing an error.
What would cause such bad network management in Vista Home Edition?
I would bet a lot of good wine that it's got NOTHING to do with Vista
Home, but with either a bad conception of shared network access, or with
a wrong setting in the BDE.
You do not just install Vista over a an existing XP, usually.
Usually you do a clean install of vista and then later install dBase and
BDE, and that is probably done with standard values which might not be
appropriate.
If you are using TRANSACTION/ROLLBACK/COMMIT with DBFs (generally a bad
idea in modern windows systems!!!) it means that the BDE is holding back
"written" data. BDE needs a place to keep that data temporarily, doesn't it?
Check out if this location is one of the protected or virtualized
directories in Vista.
All editions of Vista are inflicting a big penalty on
developers/applications who are writing data into windows-folders that
are not designed for this.
Etienne should check if his application is writing into any of the
"special folders", and if it is probably using hard coded paths.
If his application does not, probably the BDE is.
www.sysinternals.com, get FileMon.exe and see what is going on.
4m
2008-11-28 18:01:25 UTC
Permalink
Post by Andrew Shimmin
Has the application been designed, at the outset, for multi-user?
SET PROCEDURE TO "registry.prg" ADDITIVE
reg = new Registry(HKEY_LOCAL_MACHINE,"SOFTWARE\Borland\Database
Engine\Settings\System\init")
reg.setValue("DEFAULT DRIVER","DBASE")
reg.setValue("LANGDRIVER","DBWINWE0")
reg.setValue("LOCAL SHARE","TRUE")
reg.setValue("MAXFILEHANDLES","4096")
close procedure "registry.prg"

Does LOCAL SHARE value = TRUE enough to declare the application for
multi-user?

Etienne
Post by Andrew Shimmin
I agree ... and if the application is run from the data server, rather than
each individual client, the application may be colliding on BDE temporary
objects in the default dBase startup folder.
Has the application been designed, at the outset, for multi-user?
regards, andrew
Post by Lysander
Post by Geoff Wass [dBVIPS]
When my client works on the two workstations at the same time he
produces data loss without causing an error.
What would cause such bad network management in Vista Home Edition?
I would bet a lot of good wine that it's got NOTHING to do with Vista
Home, but with either a bad conception of shared network access, or with
a wrong setting in the BDE.
You do not just install Vista over a an existing XP, usually.
Usually you do a clean install of vista and then later install dBase and
BDE, and that is probably done with standard values which might not be
appropriate.
If you are using TRANSACTION/ROLLBACK/COMMIT with DBFs (generally a bad
idea in modern windows systems!!!) it means that the BDE is holding back
"written" data. BDE needs a place to keep that data temporarily, doesn't it?
Check out if this location is one of the protected or virtualized
directories in Vista.
All editions of Vista are inflicting a big penalty on
developers/applications who are writing data into windows-folders that
are not designed for this.
Etienne should check if his application is writing into any of the
"special folders", and if it is probably using hard coded paths.
If his application does not, probably the BDE is.
www.sysinternals.com, get FileMon.exe and see what is going on.
Andrew Shimmin
2008-11-28 22:22:29 UTC
Permalink
Etienne,
Post by 4m
Does LOCAL SHARE value = TRUE enough to declare the application for
multi-user?
No.

For an application to be multi-user it MUST separate non-table data for each user. If this does not occur each user's non-table data will collide and may produce unpredictable application results.

dBase has some serious flaws for multi-user applications and the application design needs to ensure these flaws are eliminated. These flaws are:

BDE temporary obects:

The BDE creates temporary objects like the _QSQL*.* files and it creates them in the default application startup folder. The default application startup folder is wherever the application is installed and run. So a multi-user application will be creating these BDE temporary objects in the same folder. Each instance of a multi-user application needs to ensure its BDE temporary objects are created in a unique location.

Application ini file:

dBase uses the application ini file to hold information. The "set directory to" command is an example. There may be other dBase commands that modify the application ini file as well. Each instance of a multi-user application needs to ensure its dBase startup ini file is in a unique location.

The above flaws will surface whether the application is run from a client system location or a network location.

I do not support any OS before w2K so the following is only applicable to W2K, XP and Vista.

Windows has the user profile folders specifically for multi-user applications and these need to be used for dBase multi-user applications.

The critical success factor is to set the BDE temporary objects and the dBase starup ini file in the user's profile folders so each user's instance of the application does not collide with others because each user's non-table data is separated from other users.

Deploying onto terminal server or fast user switching systems will eventually produce problems unless the application is designed to address the above.

I went down this painful path months ago, almost went insane, but managed to find a solution. I have Vista multi-user applications installing and running without any need to change any settings on the user's systems, with the exception of changing the default PLUSrun.exe manifest file to [requestedExecutionLevel level="AsInvoker"] privilege.

Hopefully dBI have learned from the effort and will provide the necessary fixes to dBase and MORE detailed documentation on developing multi-user applications on Vista, W2k and WXP.

You can read my posts in the "Bug reports", "CTO-wants-to-know" and "Deployment" newsgroups if you want more detailed information.

Hope this helps.

regards, andrew
Post by 4m
Post by Andrew Shimmin
Has the application been designed, at the outset, for multi-user?
SET PROCEDURE TO "registry.prg" ADDITIVE
reg = new Registry(HKEY_LOCAL_MACHINE,"SOFTWARE\Borland\Database
Engine\Settings\System\init")
reg.setValue("DEFAULT DRIVER","DBASE")
reg.setValue("LANGDRIVER","DBWINWE0")
reg.setValue("LOCAL SHARE","TRUE")
reg.setValue("MAXFILEHANDLES","4096")
close procedure "registry.prg"
Does LOCAL SHARE value = TRUE enough to declare the application for
multi-user?
Etienne
4m
2008-11-29 13:18:03 UTC
Permalink
Thanks Andrew

I'm translating your message and trying to understand it, but I must tell
you that the application is installed on each workstation and the database
is on one of these workstations and each application is linked with the
database with a BDE alias.

Etienne
Post by Andrew Shimmin
Etienne,
Post by 4m
Does LOCAL SHARE value = TRUE enough to declare the application for
multi-user?
No.
For an application to be multi-user it MUST separate non-table data for
each user. If this does not occur each user's non-table data will collide
and may produce unpredictable application results.
dBase has some serious flaws for multi-user applications and the
application design needs to ensure these flaws are eliminated. These flaws
The BDE creates temporary objects like the _QSQL*.* files and it creates
them in the default application startup folder. The default application
startup folder is wherever the application is installed and run. So a
multi-user application will be creating these BDE temporary objects in the
same folder. Each instance of a multi-user application needs to ensure its
BDE temporary objects are created in a unique location.
dBase uses the application ini file to hold information. The "set
directory to" command is an example. There may be other dBase commands
that modify the application ini file as well. Each instance of a
multi-user application needs to ensure its dBase startup ini file is in a
unique location.
The above flaws will surface whether the application is run from a client
system location or a network location.
I do not support any OS before w2K so the following is only applicable to
W2K, XP and Vista.
Windows has the user profile folders specifically for multi-user
applications and these need to be used for dBase multi-user applications.
The critical success factor is to set the BDE temporary objects and the
dBase starup ini file in the user's profile folders so each user's
instance of the application does not collide with others because each
user's non-table data is separated from other users.
Deploying onto terminal server or fast user switching systems will
eventually produce problems unless the application is designed to address
the above.
I went down this painful path months ago, almost went insane, but managed
to find a solution. I have Vista multi-user applications installing and
running without any need to change any settings on the user's systems,
with the exception of changing the default PLUSrun.exe manifest file to
[requestedExecutionLevel level="AsInvoker"] privilege.
Hopefully dBI have learned from the effort and will provide the necessary
fixes to dBase and MORE detailed documentation on developing multi-user
applications on Vista, W2k and WXP.
You can read my posts in the "Bug reports", "CTO-wants-to-know" and
"Deployment" newsgroups if you want more detailed information.
Hope this helps.
regards, andrew
Post by 4m
Post by Andrew Shimmin
Has the application been designed, at the outset, for multi-user?
SET PROCEDURE TO "registry.prg" ADDITIVE
reg = new Registry(HKEY_LOCAL_MACHINE,"SOFTWARE\Borland\Database
Engine\Settings\System\init")
reg.setValue("DEFAULT DRIVER","DBASE")
reg.setValue("LANGDRIVER","DBWINWE0")
reg.setValue("LOCAL SHARE","TRUE")
reg.setValue("MAXFILEHANDLES","4096")
close procedure "registry.prg"
Does LOCAL SHARE value = TRUE enough to declare the application for
multi-user?
Etienne
Andrew Shimmin
2008-11-29 22:08:31 UTC
Permalink
Etienne,
Post by 4m
the application is installed on each workstation and the database
is on one of these workstations and each application is linked with the
database with a BDE alias.
Given the above, you should not be having difficulties with any of the dBase flaws I identified. The problem is somewhere else.

You could disable all disk caching and use the rowset.flush() method to ensure modified data is always written to disk rather than buffered and then see if your client still loses data.

This approach will decrease the application's performance but it will eliminate any data buffering issues from the problem.

regards, andrew
Post by 4m
Thanks Andrew
I'm translating your message and trying to understand it, but I must tell
you that the application is installed on each workstation and the database
is on one of these workstations and each application is linked with the
database with a BDE alias.
Etienne
Geoff Wass [dBVIPS]
2008-11-30 07:18:25 UTC
Permalink
Post by 4m
Thanks Andrew
I'm translating your message and trying to understand it, but I must tell
you that the application is installed on each workstation and the database
is on one of these workstations and each application is linked with the
database with a BDE alias.
Etienne
Etienne,

This may be related to OpLocks.
Post by 4m
http://groups.google.com/groups/search?safe=off&q=oplocks+group%3Adbase*.*&btnG=Search&sitesearch=groups.google.com
If you read the long article "moved from talk to dbase", the last few
paragraphs give some interesting suggestions.


You will also find it useful to read the *entire* threads which contain
these messages. I know the titles do not seem to relate to your issue
nor opLocks, but they do end up discussing opLocks.

Subject: Re: dBase vs McAfee AVD
From: *Lysander* <***@nowhere.com>
Date: Wed, 26 Apr 2006 17:15:05 +0200
Newsgroups: dbase.programming
Message-ID: <ARj$***@news-server>


Subject: Re: Multi User Speed Degradation
From: Lysander <***@nowhere.de>
Date: Thu, 15 Mar 2007 18:16:50 +0100
Newsgroups: dbase.programming
Message-ID: <***@news-server>

Subject: Re: Multi User issues
From: "Rick Gearardo" <***@NO_SPAMsecuritycorp.com>
Date: Thu, 7 Jun 2007 09:29:56 -0400
Newsgroups: dbase.programming
Message-ID: <***@news-server>

Greg,

Attached is a registry update file. Copy to the host and client machine
and
double-click on it. It will turn off oplocks.

Rick



Subject: Re: Temp files
From: Lysander <***@nowhere.de>
Date: Fri, 13 Jul 2007 13:13:45 +0200
Newsgroups: dbase.programming
Message-ID: <***@news-server>
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
4m
2008-11-30 16:23:47 UTC
Permalink
Thank you, I make it with registry.prg

Etienne
Geoff Wass [dBVIPS]
2008-12-01 05:45:39 UTC
Permalink
Post by 4m
Thank you, I make it with registry.prg
Etienne
Etienne,

Good luck with it.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
4m
2008-11-30 16:03:04 UTC
Permalink
How to find Rick Gearardo registry update file turning off oplocks?
I cannot find newsgroup messages between 2005 and 2008...

Etienne Gounon
Post by Andrew Shimmin
Post by 4m
Thanks Andrew
I'm translating your message and trying to understand it, but I must tell
you that the application is installed on each workstation and the database
is on one of these workstations and each application is linked with the
database with a BDE alias.
Etienne
Etienne,
This may be related to OpLocks.
Post by 4m
http://groups.google.com/groups/search?safe=off&q=oplocks+group%3Adbase*.*&btnG=Search&sitesearch=groups.google.com
If you read the long article "moved from talk to dbase", the last few
paragraphs give some interesting suggestions.
You will also find it useful to read the *entire* threads which contain
these messages. I know the titles do not seem to relate to your issue
nor opLocks, but they do end up discussing opLocks.
Subject: Re: dBase vs McAfee AVD
Date: Wed, 26 Apr 2006 17:15:05 +0200
Newsgroups: dbase.programming
Subject: Re: Multi User Speed Degradation
Date: Thu, 15 Mar 2007 18:16:50 +0100
Newsgroups: dbase.programming
Subject: Re: Multi User issues
Date: Thu, 7 Jun 2007 09:29:56 -0400
Newsgroups: dbase.programming
Greg,
Attached is a registry update file. Copy to the host and client machine
and
double-click on it. It will turn off oplocks.
Rick
Subject: Re: Temp files
Date: Fri, 13 Jul 2007 13:13:45 +0200
Newsgroups: dbase.programming
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada
.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
Rainald
2008-11-30 17:16:42 UTC
Permalink
Post by 4m
How to find Rick Gearardo registry update file turning off oplocks?
I cannot find newsgroup messages between 2005 and 2008...
Strange. You are using Outlook Express. I you load the old stuff you'll
find the message with the attachment and could read through the whole
therad which is really interesting for your issue.
Under options set the number of message to be downloaded to mx. of 1000.
Then click repeatedly on "load threads". This way you can catch up the
old things and create a complete archive.
IMO it is important to have the old things present.

Salu
Rainald
Post by 4m
Post by 4m
Thanks Andrew
I'm translating your message and trying to understand it, but I must tell
you that the application is installed on each workstation and the database
is on one of these workstations and each application is linked with the
database with a BDE alias.
Etienne
Etienne Gounon
Post by 4m
This may be related to OpLocks.
http://groups.google.com/groups/search?safe=off&q=oplocks+group%3Adbase*.*&btnG=Search&sitesearch=groups.google.com
Post by 4m
Post by 4m
If you read the long article "moved from talk to dbase", the last
few paragraphs give some interesting suggestions.
You will also find it useful to read the *entire* threads which
contain these messages. I know the titles do not seem to relate to
your issue nor opLocks, but they do end up discussing opLocks.
Subject: Re: dBase vs McAfee AVD
Date: Wed, 26 Apr 2006 17:15:05 +0200
Newsgroups: dbase.programming
Subject: Re: Multi User Speed Degradation
Date: Thu, 15 Mar 2007 18:16:50 +0100
Newsgroups: dbase.programming
Subject: Re: Multi User issues
Date: Thu, 7 Jun 2007 09:29:56 -0400
Newsgroups: dbase.programming
Greg,
Attached is a registry update file. Copy to the host and client
machine and
double-click on it. It will turn off oplocks.
Rick
Subject: Re: Temp files
Date: Fri, 13 Jul 2007 13:13:45 +0200
Newsgroups: dbase.programming
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada
.|.|.| dBASE info at http://geocities.com/geoff_wass
|.|.|. .|.|.|
---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com
|.|.|.
Lysander
2008-12-01 10:14:39 UTC
Permalink
Post by Geoff Wass [dBVIPS]
This may be related to OpLocks.
Post by 4m
http://groups.google.com/groups/search?safe=off&q=oplocks+group%3Adbase*.*&btnG=Search&sitesearch=groups.google.com
One thing should stay in mind, though...

[quote]
Oplocks are a significant performance enhancement,
[/quote]


I did some experiments with OpLocks (turning on and off). The horrible
outcome of those experiments helped me greatly to hurry up and use an
SQL server instead of DBFs :)

What is quoted above from Dan's posting is vital: OpLocks _ARE_ a
significant performance enhancement. If you turn them off, be ready to
encounter a considerable slowdown in your network.

OpLocks canNOT be turned off for only some applications or file formats,
unfortunately. They will be effecting ALL File-IO in the net

ciao,
André
Geoff Wass [dBVIPS]
2008-12-02 05:46:14 UTC
Permalink
Post by Lysander
Post by Geoff Wass [dBVIPS]
This may be related to OpLocks.
Post by 4m
http://groups.google.com/groups/search?safe=off&q=oplocks+group%3Adbase*.*&btnG=Search&sitesearch=groups.google.com
One thing should stay in mind, though...
[quote]
Oplocks are a significant performance enhancement,
[/quote]
I did some experiments with OpLocks (turning on and off). The horrible
outcome of those experiments helped me greatly to hurry up and use an
SQL server instead of DBFs :)
What is quoted above from Dan's posting is vital: OpLocks _ARE_ a
significant performance enhancement. If you turn them off, be ready to
encounter a considerable slowdown in your network.
OpLocks canNOT be turned off for only some applications or file formats,
unfortunately. They will be effecting ALL File-IO in the net
ciao,
André
André,

Thank-you for stressing this very important point. It is indeed
something that one has to consider seriously.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
Lysander
2008-12-01 09:43:23 UTC
Permalink
Post by 4m
SET PROCEDURE TO "registry.prg" ADDITIVE
reg = new Registry(HKEY_LOCAL_MACHINE,"SOFTWARE\Borland\Database
Engine\Settings\System\init")
Etienne,

in addition to what others already wrote, the above code is _VERY_
problematic under Vista.

Vista is the first OS which has been designed according to the latest
Microsoft guidelines for "more secure" software, called SD³+C

These guidelines do exist more or less since 2000 and they have been one
major reason, by the way, for Borland to discontinue the BDE.

While Vista still has security breaches, they are far less than the OSs
before, and your software should also apply to SD³+C to run as smooth as
possible under Vista and future versions.

SD³+C stands for basic requirements to be fulfilled by software
developers. I won't go into too many details :)
But one of the 3 SDs stands for "security by default".

This means a software MUST be able to run without administrator
privileges. The code you gave above does not.

While this was nothing more than a breach of standard with XP, it turns
out to be a potential desaster under Vista. As you may already have
found out by now, there is not a "full-power" administrator in Vista
anymore.

By default, the system requires your agreement even if you are logged on
as so called administrator.

The above code is trying to write into the registry, which is not
allowed by default when you are not administrator, and which must be
agreed on by the user if you are. Depending on your settings of Vista,
one of the following can happen:
- the application will crush
- the values are not written to registry but to a virtual copy
- the values ARE correctly written, but this is only possible with a
setting in Vista that will cause massive other problems.

That said, it shows that you still have at least some code in your
application that requires administrative privileges, and which probably
is writing data to "virtual folders" instead of writing data to the
folders you specified.

You should check ALL your code for such things.
Look for any hardcoded paths, and for anything that probably requires
administrative privileges.

go to www.sysinternals.com.
get filemon to check which DBFs are written when and where
get regmon to check which registry entries are done when and where

And never ever do turn off UAC. While it seems to be a nuisance, turning
it off will only increase your problems.

ciao,
André
Andrew Shimmin
2008-12-01 21:46:08 UTC
Permalink
I agree with your comments.

However, even if his registry modifications are virtualised, his code should still work. Also, maybe he has turned the UAC off and his code is running with a full admin access token. I do not know if this is the case.

I feel his data loss is being caused by something other than the normal dBase Vista security model compliance issues.

I have never turned op locks off BUT i do use my own record locking and make sure there is no disk write caching.

regards, andrew
Post by Andrew Shimmin
Post by 4m
SET PROCEDURE TO "registry.prg" ADDITIVE
reg = new
Registry(HKEY_LOCAL_MACHINE,"SOFTWARE\Borland\Database
Engine\Settings\System\init")
Etienne,
in addition to what others already wrote, the above code is _VERY_
problematic under Vista.
Vista is the first OS which has been designed according to the latest
Microsoft guidelines for "more secure" software, called SD³+C
These guidelines do exist more or less since 2000 and they have been one
major reason, by the way, for Borland to discontinue the BDE.
While Vista still has security breaches, they are far less than the OSs
before, and your software should also apply to SD³+C to run as smooth as
possible under Vista and future versions.
SD³+C stands for basic requirements to be fulfilled by software
developers. I won't go into too many details :)
But one of the 3 SDs stands for "security by default".
This means a software MUST be able to run without administrator
privileges. The code you gave above does not.
While this was nothing more than a breach of standard with XP, it turns
out to be a potential desaster under Vista. As you may already have
found out by now, there is not a "full-power" administrator in Vista
anymore.
By default, the system requires your agreement even if you are logged on
as so called administrator.
The above code is trying to write into the registry, which is not
allowed by default when you are not administrator, and which must be
agreed on by the user if you are. Depending on your settings of Vista,
- the application will crush
- the values are not written to registry but to a virtual copy
- the values ARE correctly written, but this is only possible with a
setting in Vista that will cause massive other problems.
That said, it shows that you still have at least some code in your
application that requires administrative privileges, and which probably
is writing data to "virtual folders" instead of writing data to the
folders you specified.
You should check ALL your code for such things.
Look for any hardcoded paths, and for anything that probably requires
administrative privileges.
go to www.sysinternals.com.
get filemon to check which DBFs are written when and where
get regmon to check which registry entries are done when and where
And never ever do turn off UAC. While it seems to be a nuisance, turning
it off will only increase your problems.
ciao,
André
Lysander
2008-12-02 09:21:58 UTC
Permalink
Post by Andrew Shimmin
However, even if his registry modifications are virtualised, his code
should still work. Also, maybe he has turned the UAC off and his code is
running with a full admin access token. I do not know if this is the case.
I feel his data loss is being caused by something other than the normal
dBase Vista security model compliance issues.
Missing data which just has been there a minute ago looks exactly like
it was somehow written into a virtual folder, and only has been "blended
into" the folder you expected it to be.
Andrew Shimmin
2008-12-02 11:23:58 UTC
Permalink
Post by Lysander
Missing data which just has been there a minute ago looks exactly like
it was somehow written into a virtual folder, and only has been "blended
into" the folder you expected it to be.
Possible, but we do not know enough of about the application design Until he lays it out we may as well p*ss into the wind.

regards, andrew
Post by Lysander
Post by Andrew Shimmin
However, even if his registry modifications are virtualised, his code
should still work. Also, maybe he has turned the UAC off and his code
is running with a full admin access token. I do not know if this is
the case.
I feel his data loss is being caused by something other than the
normal dBase Vista security model compliance issues.
Missing data which just has been there a minute ago looks exactly like
it was somehow written into a virtual folder, and only has been "blended
into" the folder you expected it to be.
Rainald
2008-12-03 03:27:07 UTC
Permalink
Post by Andrew Shimmin
Post by Lysander
Post by Andrew Shimmin
However, even if his registry modifications are virtualised, his
code should still work. Also, maybe he has turned the UAC off and
his code is running with a full admin access token. I do not know
if this is the case.
I feel his data loss is being caused by something other than the
normal dBase Vista security model compliance issues.
Missing data which just has been there a minute ago looks exactly
like it was somehow written into a virtual folder, and only has
been "blended into" the folder you expected it to be.
Possible, but we do not know enough of about the application design
Until he lays it out we may as well p*ss into the wind.
Only too true! {siiiigh}

Rainald
4m
2008-12-04 08:14:37 UTC
Permalink
Is it a good idea creating a witness query that ensure me (after requery())
datas have been really written?
I think this warning can show me where my code fail.
Etienne
Post by Andrew Shimmin
However, even if his registry modifications are virtualised, his code
should still work. Also, maybe he has turned the UAC off and his code is
running with a full admin access token. I do not know if this is the case.
I feel his data loss is being caused by something other than the normal
dBase Vista security model compliance issues.
Missing data which just has been there a minute ago looks exactly like it
was somehow written into a virtual folder, and only has been "blended
into" the folder you expected it to be.
Lysander
2008-12-04 09:30:29 UTC
Permalink
Post by 4m
Is it a good idea creating a witness query that ensure me (after requery())
datas have been really written?
I think this warning can show me where my code fail.
Etienne
You can do this - but only for testing. It would be too much overhead if
it would be normal part of your application.

But until know we can still not know, what the real reason is.
The assumption that it has to do with a virtual folder can as well be
wrong as it can be correct.

The virtual folder will keep it's data until the user logs off again
from Vista. And it will not "show" that data to other users in the
network, when they are accessing the application.

... most likely it is indeed something else...

The _BEST_ you can do is to get a Filemonitor.
As I wrote already earlier, I very much do like FileMon.exe for this.
(www.sysinternals.com) And I think it also works with Vista.
Andrew Shimmin
2008-12-04 11:52:08 UTC
Permalink
Does the Vista system have the database on it?
Is the Vista UAC turned off?
Are you relying on all users to have administrator privilege?
What is the path where the application is installed?
What is the path to the database?

regards, andrew
Post by Lysander
Post by 4m
Is it a good idea creating a witness query that ensure me (after
requery()) datas have been really written?
I think this warning can show me where my code fail.
Etienne
You can do this - but only for testing. It would be too much overhead if
it would be normal part of your application.
But until know we can still not know, what the real reason is.
The assumption that it has to do with a virtual folder can as well be
wrong as it can be correct.
The virtual folder will keep it's data until the user logs off again
from Vista. And it will not "show" that data to other users in the
network, when they are accessing the application.
... most likely it is indeed something else...
The _BEST_ you can do is to get a Filemonitor.
As I wrote already earlier, I very much do like FileMon.exe for this.
(www.sysinternals.com) And I think it also works with Vista.
4m
2008-12-04 15:52:49 UTC
Permalink
What do you mean with "UAC"?

Database is on one of the workstations hard drive.
The users privilèges are marely manage into the program (with personal
password and acces level on menu enters)
The application is installed on each workstation. The network is never large
(2 or 3 workstations)

Etienne
Post by Andrew Shimmin
Does the Vista system have the database on it?
Is the Vista UAC turned off?
Are you relying on all users to have administrator privilege?
What is the path where the application is installed?
What is the path to the database?
regards, andrew
Andrew Shimmin
2008-12-05 03:52:15 UTC
Permalink
Post by 4m
What do you mean with "UAC"?
If you are going to deploy your application to Vista systems you need to learn about Vista.

http://en.wikipedia.org/wiki/User_Account_Control

The UAC (User Account Control) is enabled by default and will significantly effect your application if your application wants to do anything requiring administrator privilege.
Post by 4m
Post by Andrew Shimmin
Does the Vista system have the database on it?
Is the Vista UAC turned off?
Are you relying on all users to have administrator privilege?
What is the path where the application is installed?
What is the path to the database?
I cannot help you if you choose not to answer the above questions.

regards, andrew
Post by 4m
What do you mean with "UAC"?
Database is on one of the workstations hard drive.
The users privilèges are marely manage into the program (with personal
password and acces level on menu enters)
The application is installed on each workstation. The network is never large
(2 or 3 workstations)
Etienne
Post by Andrew Shimmin
Does the Vista system have the database on it?
Is the Vista UAC turned off?
Are you relying on all users to have administrator privilege?
What is the path where the application is installed?
What is the path to the database?
regards, andrew
4m
2008-12-05 10:22:37 UTC
Permalink
I was not well-informed from Vista security and then I'll do thanks to you.
I can easily delete a single write to the registry appearing to pose a
problem.
Post by Andrew Shimmin
Post by 4m
Post by Andrew Shimmin
Does the Vista system have the database on it?
The database is a simple folder containing tables and is located in one of
workstations hard drive under Vista system
Post by Andrew Shimmin
Post by 4m
Post by Andrew Shimmin
Is the Vista UAC turned off?
No, not yet
Post by Andrew Shimmin
Post by 4m
Post by Andrew Shimmin
Are you relying on all users to have administrator privilege?
The only privilege I ask for my application is all the users enabled to read
and write on database.
I do not know if this requires administrator privilege.
Post by Andrew Shimmin
Post by 4m
Post by Andrew Shimmin
What is the path where the application is installed?
One instance of the application is installed on each workstation. The
network is never large
(2 or 3 workstations).
Post by Andrew Shimmin
Post by 4m
Post by Andrew Shimmin
What is the path to the database?
Each instance of the application use BDE alias to locate database
The database is a simple folder containing tables and is located in one of
workstations hard drive under Vista system.

Etienne
Post by Andrew Shimmin
Post by 4m
What do you mean with "UAC"?
If you are going to deploy your application to Vista systems you need to learn about Vista.
http://en.wikipedia.org/wiki/User_Account_Control
The UAC (User Account Control) is enabled by default and will
significantly effect your application if your application wants to do
anything requiring administrator privilege.
Post by 4m
Post by Andrew Shimmin
Does the Vista system have the database on it?
Is the Vista UAC turned off?
Are you relying on all users to have administrator privilege?
What is the path where the application is installed?
What is the path to the database?
I cannot help you if you choose not to answer the above questions.
regards, andrew
Post by 4m
What do you mean with "UAC"?
Database is on one of the workstations hard drive.
The users privilèges are marely manage into the program (with personal
password and acces level on menu enters)
The application is installed on each workstation. The network is never
large (2 or 3 workstations)
Etienne
Post by Andrew Shimmin
Does the Vista system have the database on it?
Is the Vista UAC turned off?
Are you relying on all users to have administrator privilege?
What is the path where the application is installed?
What is the path to the database?
regards, andrew
Andrew Shimmin
2008-12-05 12:12:24 UTC
Permalink
Ok.
Post by 4m
The database is a simple folder containing tables and is located in one of
workstations hard drive under Vista system
What is the BDE alias path on EACH workstation?
Post by 4m
Post by Andrew Shimmin
Post by 4m
Post by Andrew Shimmin
Is the Vista UAC turned off?
No, not yet
Do not turn it off.
Post by 4m
The only privilege I ask for my application is all the users enabled to read
and write on database.
I do not know if this requires administrator privilege.
You need to find out if the user accounts being used have administrator privilege.
Post by 4m
Post by Andrew Shimmin
Post by 4m
Post by Andrew Shimmin
What is the path where the application is installed?
What directory is your application installed to on EACH workstation?

What is the requestedExecutionLevel in your application manifest file on the Vista system?

regards, andrew
Post by 4m
I was not well-informed from Vista security and then I'll do thanks to you.
I can easily delete a single write to the registry appearing to pose a
problem.
Post by Andrew Shimmin
Post by 4m
Post by Andrew Shimmin
Does the Vista system have the database on it?
The database is a simple folder containing tables and is located in one of
workstations hard drive under Vista system
Post by Andrew Shimmin
Post by 4m
Post by Andrew Shimmin
Is the Vista UAC turned off?
No, not yet
Post by Andrew Shimmin
Post by 4m
Post by Andrew Shimmin
Are you relying on all users to have administrator privilege?
The only privilege I ask for my application is all the users enabled to read
and write on database.
I do not know if this requires administrator privilege.
Post by Andrew Shimmin
Post by 4m
Post by Andrew Shimmin
What is the path where the application is installed?
One instance of the application is installed on each workstation. The
network is never large
(2 or 3 workstations).
Post by Andrew Shimmin
Post by 4m
Post by Andrew Shimmin
What is the path to the database?
Each instance of the application use BDE alias to locate database
The database is a simple folder containing tables and is located in one of
workstations hard drive under Vista system.
Etienne
Post by Andrew Shimmin
Post by 4m
What do you mean with "UAC"?
If you are going to deploy your application to Vista systems you need to
learn about Vista.
http://en.wikipedia.org/wiki/User_Account_Control
The UAC (User Account Control) is enabled by default and will
significantly effect your application if your application wants to do
anything requiring administrator privilege.
Post by 4m
Post by Andrew Shimmin
Does the Vista system have the database on it?
Is the Vista UAC turned off?
Are you relying on all users to have administrator privilege?
What is the path where the application is installed?
What is the path to the database?
I cannot help you if you choose not to answer the above questions.
regards, andrew
Post by 4m
What do you mean with "UAC"?
Database is on one of the workstations hard drive.
The users privilèges are marely manage into the program (with personal
password and acces level on menu enters)
The application is installed on each workstation. The network is never
large (2 or 3 workstations)
Etienne
Post by Andrew Shimmin
Does the Vista system have the database on it?
Is the Vista UAC turned off?
Are you relying on all users to have administrator privilege?
What is the path where the application is installed?
What is the path to the database?
regards, andrew
4m
2008-12-08 16:37:25 UTC
Permalink
I spent my WE to explore various Internet documents dealing with the issue
and I am a little less in the dark.
Post by Andrew Shimmin
What is the BDE alias path on EACH workstation?
The BDE administrator dialog box cannot edit a "direct" path through the
network
and Vista disconnect a created drive after restarting. Certainly because
there was no manifest file beside BDE administrator.
Then I put in my program a GET DIRECTORY function for creating BDE alias
"direct path" which was accepted by Vista. (Temporarily !!)
Now I added manifest file installed by Inno with requestedExecutionLevel =
runAsAdmin
Post by Andrew Shimmin
You need to find out if the user accounts being used have administrator privilege.
do runAsAdmin not be enough to open administrator rights?
Post by Andrew Shimmin
What directory is your application installed to on EACH workstation?
In c:\Program Files\4m
The application has olso a manifest file (requestedExecutionLevel =
runAsAdmin)

I think that the application should work fine now

Etienne
Andrew Shimmin
2008-12-09 13:50:25 UTC
Permalink
Etienne
Post by 4m
I spent my WE to explore various Internet documents dealing with the issue
and I am a little less in the dark.
Progress ... yes vista is a steep learning curve.
Post by 4m
The BDE administrator dialog box cannot edit a "direct" path through the
network
and Vista disconnect a created drive after restarting. Certainly because
there was no manifest file beside BDE administrator.
Then I put in my program a GET DIRECTORY function for creating BDE alias
"direct path" which was accepted by Vista. (Temporarily !!)
Now I added manifest file installed by Inno with requestedExecutionLevel =
runAsAdmin
Yes any BDE alias created in Vista without a full admin access token will be temporary. The best way to do it is to create the BDE alias during deployment with INNO and leave the user running with a filtered access token.
Post by 4m
Now I added manifest file installed by Inno with requestedExecutionLevel =
runAsAdmin
I suggest you make the requestedExecutionLevel = "AsInvoker" otherwise every user will have to provide administrator privileged credentials every time the application is started. It will also not run successfully if a shortcut is placed in the startup folder.
Post by 4m
do runAsAdmin not be enough to open administrator rights?
Yes .. as long as the user knows an administrator account password.
Post by 4m
In c:\Program Files\4m
The application has olso a manifest file (requestedExecutionLevel =
runAsAdmin)
See note on "AsInvoker".
Post by 4m
I think that the application should work fine now
Maybe ... try it.

Is this application used by a single user with an administrator privilege account on each system?

regards, andrew
Post by 4m
I spent my WE to explore various Internet documents dealing with the issue
and I am a little less in the dark.
Post by Andrew Shimmin
What is the BDE alias path on EACH workstation?
The BDE administrator dialog box cannot edit a "direct" path through the
network
and Vista disconnect a created drive after restarting. Certainly because
there was no manifest file beside BDE administrator.
Then I put in my program a GET DIRECTORY function for creating BDE alias
"direct path" which was accepted by Vista. (Temporarily !!)
Now I added manifest file installed by Inno with requestedExecutionLevel =
runAsAdmin
Post by Andrew Shimmin
You need to find out if the user accounts being used have administrator privilege.
do runAsAdmin not be enough to open administrator rights?
Post by Andrew Shimmin
What directory is your application installed to on EACH workstation?
In c:\Program Files\4m
The application has olso a manifest file (requestedExecutionLevel =
runAsAdmin)
I think that the application should work fine now
Etienne
4m
2008-12-08 16:52:13 UTC
Permalink
Can I rename Plus.exe.manifest to MyApp.exe.manifest ?

Etienne
Andrew Shimmin
2008-12-09 21:37:00 UTC
Permalink
Yes ... but make sure you change any reference to PLUS.exe to YourApplicationName.exe in the manifest file.

regards, andrew
Post by 4m
Can I rename Plus.exe.manifest to MyApp.exe.manifest ?
Etienne
4m
2008-12-04 16:06:45 UTC
Permalink
I downloaded FileMon but I don't understand how to use this tool at my very
distant customer's.

Etienne
Post by Lysander
Post by 4m
Is it a good idea creating a witness query that ensure me (after
requery()) datas have been really written?
I think this warning can show me where my code fail.
Etienne
You can do this - but only for testing. It would be too much overhead if
it would be normal part of your application.
But until know we can still not know, what the real reason is.
The assumption that it has to do with a virtual folder can as well be
wrong as it can be correct.
The virtual folder will keep it's data until the user logs off again from
Vista. And it will not "show" that data to other users in the network,
when they are accessing the application.
... most likely it is indeed something else...
The _BEST_ you can do is to get a Filemonitor.
As I wrote already earlier, I very much do like FileMon.exe for this.
(www.sysinternals.com) And I think it also works with Vista.
Lysander
2008-12-04 16:40:45 UTC
Permalink
Post by 4m
I downloaded FileMon but I don't understand how to use this tool at my very
distant customer's.
Sorry, that was a misunderstanding from my side, then.
I thought you could log onto the workstation of your customer to do a
protocol.

But nevertheless you can use it to make a complete check of what your
application is writing WHERE. Remember that BDE and dBase are writing a
lot of things without that you explicitely told them so.

It would be good, if you could run that under Vista.
4m
2008-12-05 10:30:38 UTC
Permalink
I'll do it
But...are you taking me suggest that I should not use Borland BDE?

Etienne
Post by Lysander
Post by 4m
I downloaded FileMon but I don't understand how to use this tool at my
very distant customer's.
Sorry, that was a misunderstanding from my side, then.
I thought you could log onto the workstation of your customer to do a
protocol.
But nevertheless you can use it to make a complete check of what your
application is writing WHERE. Remember that BDE and dBase are writing a
lot of things without that you explicitely told them so.
It would be good, if you could run that under Vista.
Lysander
2008-12-08 09:33:02 UTC
Permalink
Post by 4m
I'll do it
But...are you taking me suggest that I should not use Borland BDE?
The problem is that you do not have a choice, as long as you are using
DBFs with Level 7 and/or dBase programming language.

A "BDE-less" version of dBase is promised, but I think it will probably
take another year or longer until you can use that efficiently.
Loading...