"Capt_Ron" <Ca*****@discussions.microsoft.com> schrieb:
Would you have another link? My work's proxy/firewall won't allow me to
use
that one. It blocks UseNet for some stupid reason.
An easy solution is using "regedit.exe"'s command line options to
export/import registry sections. The following implementation is based on a
VB6 sample written by Thorsten Dörfler [MVP]
(<URL:http://www.google.de/groups?selm=3F7D2DF7.4D9AB5EC%40t-online.de>):
\\\
Public Class RegistryHelper
Public Shared Sub ExportSettings( _
ByVal FileName As String, _
ByVal Section As String _
)
FileName = """" & FileName & """"
Section = """" & Section & """"
Shell( _
"regedit.exe /e " & FileName & " " & Section, _
AppWinStyle.Hide _
)
End Sub
Public Shared Sub ImportSettings( _
ByVal FileName As String, _
Optional ByVal Silent As Boolean = True _
)
FileName = """"& FileName & """"
If Silent Then
FileName = "/s " & FileName
End If
Shell("regedit.exe " & FileName, AppWinStyle.Hide)
End Sub
End Class
///
Keywords: Registry, export, import, section.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>