A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » General XP issues or comments
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

General XP Access Question



 
 
Thread Tools Display Modes
  #1  
Old December 22nd 08, 11:45 PM posted to microsoft.public.vb.general.discussion,microsoft.public.windowsxp.general
Alastair MacFarlane[_2_]
external usenet poster
 
Posts: 4
Default General XP Access Question

Dear All,

I have been asked to create an application that reads some data from the
registry and also from ini files stored in the application data folder. The
program the user runs would need to look in all the profiles on that pc,
search for ini files in the profiles and store it in a central database.
Ideally I would like to create the program, save it on a central server and
send an e-mail out for all the relevant staff to run the program. The user
wouldn't have any special rights on the windows XP pc environment.

The mechanics of the process are straightforward. I just wondered if it is
possible? I have also posted this on the WindowsXP General forum and VB
General as well as I am unsure which forum to post it on.

Thanks again.

Alastair MacFarlane

Ads
  #2  
Old December 22nd 08, 11:59 PM posted to microsoft.public.vb.general.discussion,microsoft.public.windowsxp.general
Pegasus \(MVP\)[_2743_]
external usenet poster
 
Posts: 1
Default General XP Access Question


"Alastair MacFarlane" wrote in message
...
Dear All,

I have been asked to create an application that reads some data from the
registry and also from ini files stored in the application data folder.
The program the user runs would need to look in all the profiles on that
pc, search for ini files in the profiles and store it in a central
database. Ideally I would like to create the program, save it on a central
server and send an e-mail out for all the relevant staff to run the
program. The user wouldn't have any special rights on the windows XP pc
environment.

The mechanics of the process are straightforward. I just wondered if it is
possible? I have also posted this on the WindowsXP General forum and VB
General as well as I am unsure which forum to post it on.

Thanks again.

Alastair MacFarlane


Ini files are only rarely used these days so you probably have to
concentrate of the registry.

VB Scripts can read any registry location and write the data to a central
database. If you run your script during the startup phase when nobody is
logged on, using an administrator's, account then it is possible to access
all of the user registry hives kept on that machine.


  #3  
Old December 23rd 08, 12:00 AM posted to microsoft.public.vb.general.discussion,microsoft.public.windowsxp.general
MikeD
external usenet poster
 
Posts: 1
Default General XP Access Question


"Alastair MacFarlane" wrote in message
...
Dear All,

I have been asked to create an application that reads some data from the
registry and also from ini files stored in the application data folder.
The program the user runs would need to look in all the profiles on that
pc, search for ini files in the profiles and store it in a central
database. Ideally I would like to create the program, save it on a central
server and send an e-mail out for all the relevant staff to run the
program. The user wouldn't have any special rights on the windows XP pc
environment.

The mechanics of the process are straightforward. I just wondered if it is
possible? I have also posted this on the WindowsXP General forum and VB
General as well as I am unsure which forum to post it on.


Only question I saw there was "is it possible?". Sure. Practically
anything is possible. It's just a matter of difficulty in doing it. For the
Registry, enumerate through HKEY_USERS. That's probably the easier of the 2.
For INI files, search for them under Documents and Settings (for XP or
under, Vista's a different story).

For a better answer, you need to be more specific about what exactly you're
having difficulty with.

--
Mike

  #4  
Old December 23rd 08, 01:42 AM posted to microsoft.public.vb.general.discussion,microsoft.public.windowsxp.general
Alastair MacFarlane[_2_]
external usenet poster
 
Posts: 4
Default General XP Access Question

Thanks MikeD and Pegasus,

I have been asked to read a value from the Registry which is not a problem.
The main issue I think is with reading the value from an ini file in all the
profiles on that PC, for example, there could be three profiles on this pc
and on two of the profiles there is a file in the application data folder
called pn.ini that I want to read a value from. I want to be able to loop
through the profiles, find the ini file, read a value and write it to a
database. From what I think Pegasus is saying, I would have to execute the
code before the user logs on. The software would run with an administrator's
account. Is there anyway the code can be executed by the general user
without admin rights to the local machine to achieve the same result? Are
the profiles only accessible by users of the admin group or if the software
is running under an admin account? At the time of writing if I have to do it
before logging on, I will need to get a list of all the relavant pcs and
also I will need the help of my IT department. I am trying to avoid this.

If this is the only way then this is the way it will need to be.

Thanks again for both your replies.

Alastair



"MikeD" wrote in message
...

"Alastair MacFarlane" wrote in message
...
Dear All,

I have been asked to create an application that reads some data from the
registry and also from ini files stored in the application data folder.
The program the user runs would need to look in all the profiles on that
pc, search for ini files in the profiles and store it in a central
database. Ideally I would like to create the program, save it on a
central server and send an e-mail out for all the relevant staff to run
the program. The user wouldn't have any special rights on the windows XP
pc environment.

The mechanics of the process are straightforward. I just wondered if it
is possible? I have also posted this on the WindowsXP General forum and
VB General as well as I am unsure which forum to post it on.


Only question I saw there was "is it possible?". Sure. Practically
anything is possible. It's just a matter of difficulty in doing it. For
the Registry, enumerate through HKEY_USERS. That's probably the easier of
the 2. For INI files, search for them under Documents and Settings (for XP
or under, Vista's a different story).

For a better answer, you need to be more specific about what exactly
you're having difficulty with.

--
Mike


  #5  
Old December 23rd 08, 02:18 AM posted to microsoft.public.vb.general.discussion,microsoft.public.windowsxp.general
Bill McCarthy
external usenet poster
 
Posts: 1
Default General XP Access Question

Hi Alastair,

To read from the other profiles the user will need to be logged in with
administrator rights.


"Alastair MacFarlane" wrote in message
...
Dear All,

I have been asked to create an application that reads some data from the
registry and also from ini files stored in the application data folder.
The program the user runs would need to look in all the profiles on that
pc, search for ini files in the profiles and store it in a central
database. Ideally I would like to create the program, save it on a central
server and send an e-mail out for all the relevant staff to run the
program. The user wouldn't have any special rights on the windows XP pc
environment.

The mechanics of the process are straightforward. I just wondered if it is
possible? I have also posted this on the WindowsXP General forum and VB
General as well as I am unsure which forum to post it on.

Thanks again.

Alastair MacFarlane


  #6  
Old December 23rd 08, 04:30 AM posted to microsoft.public.vb.general.discussion,microsoft.public.windowsxp.general
expvb
external usenet poster
 
Posts: 3
Default General XP Access Question

"Alastair MacFarlane" wrote in message
...
Dear All,

I have been asked to create an application that reads some data from the
registry and also from ini files stored in the application data folder.
The program the user runs would need to look in all the profiles on that
pc, search for ini files in the profiles and store it in a central
database. Ideally I would like to create the program, save it on a central
server and send an e-mail out for all the relevant staff to run the
program. The user wouldn't have any special rights on the windows XP pc
environment.

The mechanics of the process are straightforward. I just wondered if it is
possible? I have also posted this on the WindowsXP General forum and VB
General as well as I am unsure which forum to post it on.

Thanks again.


If your objective is to make the per user configuration the same for the
logged on user regardless of which workstation they use, check Roaming user
profiles he

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

If you want to do something in your own, see this VB6 sample which enumerate
the users in the local computer:

http://vbnet.mvps.org/code/network/netuserenum.htm

Also check NetUserEnum(USER_INFO_3 or USER_INFO_4), and the resultant
usriX_home_dir and usriX_profile variables.

For the registry, see LoadUserProfile(), or enumerate HKEY_USERS. To get the
user's SID, use LookupAccountName. See this sample for how to use that
function:

http://vbnet.mvps.org/code/network/l...ccountname.htm



  #7  
Old December 23rd 08, 07:12 AM posted to microsoft.public.vb.general.discussion,microsoft.public.windowsxp.general
Pegasus \(MVP\)[_2744_]
external usenet poster
 
Posts: 1
Default General XP Access Question

See below.

"Alastair MacFarlane" wrote in message
...
Thanks MikeD and Pegasus,

I have been asked to read a value from the Registry which is not a
problem. The main issue I think is with reading the value from an ini file
in all the profiles on that PC, for example, there could be three profiles
on this pc and on two of the profiles there is a file in the application
data folder called pn.ini that I want to read a value from. I want to be
able to loop through the profiles, find the ini file, read a value and
write it to a database. From what I think Pegasus is saying, I would have
to execute the code before the user logs on.

*** Only if you need to access user registry hives. Ini files are
*** not normally locked and can be accessed at any time.

The software would run with an administrator's account. Is there anyway
the code can be executed by the general user without admin rights to the
local machine to achieve the same result?

*** This is a permissions issue. If the ini files reside in the various
*** user profile folders then Bill McCarthy's comment applies.

Are he profiles only accessible by users of the admin group or if the
software is running under an admin account? At the time of writing if I
have to do it before logging on, I will need to get a list of all the
relavant pcs and also I will need the help of my IT department. I am
trying to avoid this.

*** You will need their help in order to access other people's
*** profile folders.


If this is the only way then this is the way it will need to be.

Thanks again for both your replies.

Alastair



"MikeD" wrote in message
...

"Alastair MacFarlane" wrote in message
...
Dear All,

I have been asked to create an application that reads some data from the
registry and also from ini files stored in the application data folder.
The program the user runs would need to look in all the profiles on that
pc, search for ini files in the profiles and store it in a central
database. Ideally I would like to create the program, save it on a
central server and send an e-mail out for all the relevant staff to run
the program. The user wouldn't have any special rights on the windows XP
pc environment.

The mechanics of the process are straightforward. I just wondered if it
is possible? I have also posted this on the WindowsXP General forum and
VB General as well as I am unsure which forum to post it on.


Only question I saw there was "is it possible?". Sure. Practically
anything is possible. It's just a matter of difficulty in doing it. For
the Registry, enumerate through HKEY_USERS. That's probably the easier of
the 2. For INI files, search for them under Documents and Settings (for
XP or under, Vista's a different story).

For a better answer, you need to be more specific about what exactly
you're having difficulty with.

--
Mike




  #8  
Old December 23rd 08, 10:43 AM posted to microsoft.public.vb.general.discussion,microsoft.public.windowsxp.general
Alastair MacFarlane[_2_]
external usenet poster
 
Posts: 4
Default General XP Access Question

Pegasus and others,

Thanks for the clarification on this. Also thanks expvb for the interesting
urls.

Alastair

"Pegasus (MVP)" wrote in message
...
See below.

"Alastair MacFarlane" wrote in message
...
Thanks MikeD and Pegasus,

I have been asked to read a value from the Registry which is not a
problem. The main issue I think is with reading the value from an ini
file in all the profiles on that PC, for example, there could be three
profiles on this pc and on two of the profiles there is a file in the
application data folder called pn.ini that I want to read a value from. I
want to be able to loop through the profiles, find the ini file, read a
value and write it to a database. From what I think Pegasus is saying, I
would have to execute the code before the user logs on.

*** Only if you need to access user registry hives. Ini files are
*** not normally locked and can be accessed at any time.

The software would run with an administrator's account. Is there anyway
the code can be executed by the general user without admin rights to the
local machine to achieve the same result?

*** This is a permissions issue. If the ini files reside in the various
*** user profile folders then Bill McCarthy's comment applies.

Are he profiles only accessible by users of the admin group or if the
software is running under an admin account? At the time of writing if I
have to do it before logging on, I will need to get a list of all the
relavant pcs and also I will need the help of my IT department. I am
trying to avoid this.

*** You will need their help in order to access other people's
*** profile folders.


If this is the only way then this is the way it will need to be.

Thanks again for both your replies.

Alastair



"MikeD" wrote in message
...

"Alastair MacFarlane" wrote in message
...
Dear All,

I have been asked to create an application that reads some data from
the registry and also from ini files stored in the application data
folder. The program the user runs would need to look in all the
profiles on that pc, search for ini files in the profiles and store it
in a central database. Ideally I would like to create the program, save
it on a central server and send an e-mail out for all the relevant
staff to run the program. The user wouldn't have any special rights on
the windows XP pc environment.

The mechanics of the process are straightforward. I just wondered if it
is possible? I have also posted this on the WindowsXP General forum and
VB General as well as I am unsure which forum to post it on.


Only question I saw there was "is it possible?". Sure. Practically
anything is possible. It's just a matter of difficulty in doing it. For
the Registry, enumerate through HKEY_USERS. That's probably the easier
of the 2. For INI files, search for them under Documents and Settings
(for XP or under, Vista's a different story).

For a better answer, you need to be more specific about what exactly
you're having difficulty with.

--
Mike





  #9  
Old December 23rd 08, 10:35 PM posted to microsoft.public.vb.general.discussion,microsoft.public.windowsxp.general
Karl E. Peterson
external usenet poster
 
Posts: 3
Default General XP Access Question

Pegasus (MVP) wrote:
"Alastair MacFarlane" wrote ...
I have been asked to create an application that reads some data from the
registry and also from ini files stored in the application data folder.


Ini files are only rarely used these days so you probably have to
concentrate of the registry.


Huh? WTH kind of answer is that? That's his task.
--
..NET: It's About Trust!
http://vfred.mvps.org


 




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

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






All times are GMT +1. The time now is 10:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.