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

  • Thread starter Thread starter Spin
  • Start date Start date
S

Spin

Guest
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
 
Re: Script needed to change the SourcePath value in my Windows Server 2003 Registry


"Spin" <Spin@invalid.com> wrote in message
news:6j7d9oF1p5oaU1@mid.individual.net...
> 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
 
Re: Script needed to change the SourcePath value in my Windows Server 2003 Registry

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\Setup\SourcePath",
"D:\ENGLISH\WIN2003\32BIT\ENT_WITH_SP1\"

'Service pack source files
WshShell.RegWrite
"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\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
>
 
Re: Script needed to change the SourcePath value in my Windows Server 2003 Registry

http://support.microsoft.com/kb/310516


"Spin" <Spin@invalid.com> wrote in message
news:6j7d9oF1p5oaU1@mid.individual.net...
> 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
>
 
Back
Top