Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Script needed to change the SourcePath value in my Windows Server 2003 Registry

Reply
Thread Tools Display Modes

Script needed to change the SourcePath value in my Windows Server 2003 Registry

 
 
Spin
Guest
Posts: n/a

 
      09-15-2008
Gurus,

I am trying to change just the SourcePath value in my Windows Server 2003
Registry via script. I want to change it from it's current value to
"D:\ENGLISH\WIN2003\32BIT\ENT_WITH_SP1\I386". What kind of simple script
would enable me to change just that one value? The path to that is:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion.

--
Spin


 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a

 
      09-15-2008

"Spin" <> wrote in message
news:...
> Gurus,
>
> I am trying to change just the SourcePath value in my Windows Server 2003
> Registry via script. I want to change it from it's current value to
> "D:\ENGLISH\WIN2003\32BIT\ENT_WITH_SP1\I386". What kind of simple script
> would enable me to change just that one value? The path to that is:
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion.
>
> --
> Spin


You could do it with a one-line command, based on regedit.exe:
http://support.microsoft.com/?kbid=310516


 
Reply With Quote
 
Dave Patrick
Guest
Posts: n/a

 
      09-15-2008
Here's an example. Set the actual paths as required but note that they're
one level above the \i386 directory.


Set WshShell = CreateObject("WScript.Shell")
'Setup files
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\SourcePath", "D:\ENGLISH\WIN2003\32BIT\ENT_WITH_SP1\"
WshShell.RegWrite
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Se tup\SourcePath",
"D:\ENGLISH\WIN2003\32BIT\ENT_WITH_SP1\"

'Service pack source files
WshShell.RegWrite
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Se tup\ServicePackSourcePath",
"D:\ENGLISH\WIN2003\32BIT\ENT_WITH_SP1\"



--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


"Spin" wrote:
> Gurus,
>
> I am trying to change just the SourcePath value in my Windows Server 2003
> Registry via script. I want to change it from it's current value to
> "D:\ENGLISH\WIN2003\32BIT\ENT_WITH_SP1\I386". What kind of simple script
> would enable me to change just that one value? The path to that is:
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion.
>
> --
> Spin
>


 
Reply With Quote
 
Dusko Savatovic
Guest
Posts: n/a

 
      09-15-2008
http://support.microsoft.com/kb/310516


"Spin" <> wrote in message
news:...
> Gurus,
>
> I am trying to change just the SourcePath value in my Windows Server 2003
> Registry via script. I want to change it from it's current value to
> "D:\ENGLISH\WIN2003\32BIT\ENT_WITH_SP1\I386". What kind of simple script
> would enable me to change just that one value? The path to that is:
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion.
>
> --
> Spin
>


 
Reply With Quote
 
 
 
Reply

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script needed to change the SourcePath value in my Windows Server 2003 Registry Spin Windows Server 3 09-15-2008 04:27 PM
Script Needed to Change Ownership on User Home Directories Scott Windows Server 7 11-29-2007 06:49 PM
RE: Script needed to change a value in text files David Wolfe Scripting 0 03-06-2006 04:52 PM
Script to change registry entry Jrex7 Scripting 3 01-17-2006 09:10 PM
Change registry size in Windows Server 2003 Alberto64 Windows Server 0 11-25-2005 09:05 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59