PDA

View Full Version : Direct access to Registry keys (WXP)



mattb025
01-23-2003, 01:11 PM
I was wondering if it was possible to access a spefic registry key from the command prompt?

I am not certain of any path or syntac to follow to be able to go straight to a key.

Andy-S
01-23-2003, 01:20 PM
What do you want to do? Give me an example of what key you want to access and what you want to do with it.

Cheers
Andy

mattb025
01-23-2003, 01:44 PM
I was wanting to be able to launch right into the registry key need to change the registored owere of the computer. We do ghosting at work and every time we have to regedit to change over the name from user. So I wanted a faster to way to directly access a key.

Andy-S
01-23-2003, 02:41 PM
Try copying the text in blue to notepad and saving as owner.reg. Change the name in the .reg file for the owner's name you want to change the registry to and then execute the following from the command prompt:

regedit /s owner.reg

I don't think it's much quicker than using regedit but it should do what you need.

<font color=blue>Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"RegisteredOwner"="Andy Stuart"</font color=blue>

Cheers
Andy

mysterywolf
01-24-2003, 03:17 AM
why not change it on the ghost itself?

mattb025
01-24-2003, 06:13 AM
The ghost image will have User set up as the default register user. It will not change from machine to machine.

mysterywolf
01-24-2003, 06:26 AM
isn't there a licencing issue here ?

mattb025
01-24-2003, 07:10 AM
We have an OEM lincesne and I was assured that what we were doing was legal.

Andy-S
01-24-2003, 07:17 AM
It's common practice to ghost the image instead of going through the OEM unbundle process. As long as you've paid for each licence (which you do when you purchase the system) then you are okay.

Did my original post cover what you needed?

Cheers
Andy

mattb025
02-04-2003, 09:25 AM
Sorry it took so long to reply. I tried that trick and could not get it to work.

Any other thoughts?

Andy-S
02-04-2003, 10:51 AM
When you say you couldn't get it to work, what error did you receive?



Cheers
Andy

Mosaic1
02-04-2003, 11:55 AM
Hi Andy. How about opening the registry to that key and then ghosting imediately?

Or using a script in the Startup Folder to read that key. Put up an input box to change that entry? Or a script which changes the Last entry key and then opens the registry.

Mosaic1
02-04-2003, 12:12 PM
I downloaded a script form Winguides and edited it. this will open the registry to the specific key you requested.

'Begin code for regedit.vbs
'Downloaded from the Scripting Guide for Windows
' http://www.winguides.com/scripting/
'Version: 1.0 (November 3, 2000)

Dim WSHShell
Set WSHShell=Wscript.CreateObject("Wscript.Shell")

WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\App lets\Regedit\LastKey","My Computer\HKEY_Local_Machine\Software\Microsoft\Win dows NT\CurrentVersion" ,"REG_SZ"

WSHShell.Run "REGEDIT"

Andy-S
02-04-2003, 01:15 PM
Excellent Mo,

Works a treat /images/forums/icons/smile.gif.


Cheers
Andy

Andy-S
02-04-2003, 01:16 PM
Matt,

Check out the script posted by Mosaic1.

Cheers
Andy

Mosaic1
02-04-2003, 01:22 PM
Thanks Andy. I found a really wonderful Download at MS. Using that and reading the Scripting section here, I am learning scripting slowly but it is coming along.

Maybe I'll post the link to the Download at the Scripting Forum. It's the 5.6 Scripting Documentation. It's the compiled Help File.

Mo

auntieflorrie
02-04-2003, 01:31 PM
OEM software can be supplied to users by companies registered with Microsoft as OEMs. They can sell the software on its own or preinstall it on a purchased pc. Each oem cd has its own ser. no. which is owned by a single user/company.
Hence, the options are to have multiple licences and ownerships with installs using unique ser. nos. or duplicate installs of one ser. no. under a single ownership and justifiable by equivalent purchased and unused licences. Other options will likely fall foul of company auditors.
It seems to me that you will end up with a lot of people claiming to own the same solitary licence.
Common sense justifies it I know, but a future audit could find you with a messy reversal to deal with.