Garry Shape
asked on
Remotely export HKEY Current User
I am wondering if it is possible and how to run a script against a couple hundred computers to export the following key value to a text file:
HKEY_CURRENT_USER\Software \Microsoft \Office\12 .0\Common\ General. In General there is a String Value "UserTemplates" and it's the data in there I need to extract.
I tried deploying a batch to do this using a service that can execute scripts via an end agent that runs on the system, however, I found that since it's running under a service account, it cannot pull date from the "HKEY_CURRENT_USER" key.
How is it possible to get the date under that key for the actual user that is logged on and using the computer?
If this isn't possible let me know of a product that exists that can run these types of reports.. we'll be set.
HKEY_CURRENT_USER\Software
I tried deploying a batch to do this using a service that can execute scripts via an end agent that runs on the system, however, I found that since it's running under a service account, it cannot pull date from the "HKEY_CURRENT_USER" key.
How is it possible to get the date under that key for the actual user that is logged on and using the computer?
If this isn't possible let me know of a product that exists that can run these types of reports.. we'll be set.
@echo off
echo %computername%/%username% >>\\server1\share\usertemplates.txt
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>>\\server1\share\usertemplates.txt
reg query "HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\General" /v "UserTemplates">>\\server1\share\usertemplates.txt
echo.>>\\server1\share\usertemplates.txt
The easiest way to do this is with a logon script. Configure your script to run under the group policy node User Configuration\Windows Settings\Scripts\Logon. Make sure that users have Write permission to the log file. The information will then be recorded as each user logs on.
ASKER
ok thanks
A question on the logon script. How can I make it only run once? I'm concerned with the logon script running every time they login over a few days I'm trying to collect results, that it will duplicate. I just need it to run once per computer and be done
A question on the logon script. How can I make it only run once? I'm concerned with the logon script running every time they login over a few days I'm trying to collect results, that it will duplicate. I just need it to run once per computer and be done
ASKER
I suppose if I leave the logon script going, I can filter out the duplicates within Excel
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, this will definitely work