header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Adding regestries
Last Post 26 Jan 2008 03:12 AM by marco.shaw. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
cullendUser is Offline
New Member
New Member
Posts:1
Avatar

--
25 Jan 2008 09:35 PM  

Hi, I am trying to figure out how I could accomplish the following:

I would like to load up a server with hard drives (maybe 10) and extract a Vista .WIM image to each hard drive. I'm thinking this is the script I will use for that:

net use Y:\\Imagelocation\Image
copy Y:\Image.WIM C:\Image
For($x=1;$x –eq10; $x++)
{C:\imagex.exe /apply C:\Image\Image.WIM a C:}

Now here is my problem. I have 10 keys in a data file and each key is suppose to go to a sepperate HD. So Key 1 goes to Disk1, Key 2 to Disk2, etc, etc. How could I:
Accesss the data file
Access the hard drive registries
Read only one line at a time and add that registry
So imagine I want to write to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion on Disk1 with the value "ID"="00031234" then on Disk2 write "ID"="00031331"
How could I do this?

Any help would be appreciated!

marco.shawUser is Online
Co-Community Director
Basic Member
Basic Member
Posts:188
Avatar

--
26 Jan 2008 03:12 AM  
(Also posted in the PowerShell newsgroup.)

I don't know much about this WIM image feature...

So I'm assuming you're going to be sitting on some system local or remote and want to access these WIM images to change a registry key in that image?

I assume that the image is actually running so that they can all be accessed?

Here's a good post on registry functions, including remote:
http://scriptolog.blogspot.com/2007/10/stand-alone-registry-functions-library.html

Passing a key from a file is the easy part.

You can simply use something like:

get-content key_file.txt|foreach-object{one_of_the_above_remote_registry_functions}

Marco
Marco

*Microsoft MVP - Windows PowerShell: http://www.microsoft.com/mvp
*PowerGadgets MVP: http://www.powergadgets.com/mvp
*Blog: http://marcoshaw.blogspot.com
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer