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

Removing My App Reg Data from Other Users

0 views
Skip to first unread message

costa

unread,
Dec 11, 2003, 11:38:31 PM12/11/03
to
I'm writing an application that upon install writes some
information under HKEY_LOCAL_MACHINE, and then when some
user on that machine runs it, it stores some per user
information under HKEY_CURRENT_USER, and their local
application data . A user needs to have Administration
privileges to install or uninstall my app.

When my application is uninstalled, I want to remove the
registry keys and application data I previously added for
each user on that machine. Any one knows how to make it
happened??

Thanks in advance.

Arkady Frenkel

unread,
Dec 12, 2003, 5:54:44 AM12/12/03
to
Call RegDeleteKey()(single)/SHDeleteKey(for tree ) in uninstall app.
Arkady

"costa" <anon...@discussions.microsoft.com> wrote in message
news:05d601c3c069$cb6ec840$a401...@phx.gbl...

George Nentidis

unread,
Dec 12, 2003, 11:07:04 AM12/12/03
to

Costa, the HKEY_LOCAL_MACHINE is the computer's registry.
There is only one of it, but you need administrative priviliges in order to
access it,
as you already found out. This security mechanism was added on Win2K and on,
and it was the reason many application could not work correctly on Win2K.
HKEY_CURRENT_USER is the registry of the current user. Each user has its own
HKEY_CURRENT_USER which is saved in the user's profile file NTUSER.DAT.
This is normally placed under \Documetns and Settings\UserName and is a
hidden file.
The administrator of the network can choose to place it somewhere else, like
a file server
so that the user can have a "roaming" profile. So the OS locates the file
and loads HKEY_CURRENT_USER only when the user logs on.
All these make it, I think, impossible to remove a key from all the profiles
of all users loged
on to a specific computer.

"costa" <anon...@discussions.microsoft.com> wrote in message
news:05d601c3c069$cb6ec840$a401...@phx.gbl...

costa

unread,
Dec 12, 2003, 10:20:34 PM12/12/03
to
Hi George,
If it's impossible to remove other user's key, what about the
preference files I left in \Documents and Settings\UserName, is it my
obligation too to remove it when the Application is uninstalled?

Quoted from other newsgroup:
Microsoft wrote in the reguirements for the Windows XP logo:
"Your application is allowed to leave user preferences and setting
files and
registry entries, if it provides an option for the user to remove
them. "

Does this mean that it's possible for a good uninstaller to remove all
user preferences and setting files and registry?

Costa

"George Nentidis" <gne...@msn.com> wrote in message news:<ekWvYnMw...@TK2MSFTNGP09.phx.gbl>...

George Nentidis

unread,
Dec 15, 2003, 6:30:53 AM12/15/03
to

An uninstaller removes settings and files that where created during the
installation.
All files and settings created during the use of the application are left
alone
because the user might want to make a reinstallation. You should propably
ask
before deleting those files. But even then, you will be able of deleting the
files
and settings of the user that started the uninstall. Not other user files
and settings.
A normal user will not have permission of deleting files in another user's
account.
Also an administrator might choose to place those files on a server.
I think you should remove all settings in the HKEY_LOCAL_MACHINE
(if rights permitt it), all settings and files created during installation,
and ask
if you should remove settings and files created during use of the
application.

0 new messages