VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Easy to use functions to take advantage of the export and import abilities of Microsoft RegEdit to

by Tom Parkison (8 Submissions)
Category: Registry
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 21st September 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Easy to use functions to take advantage of the export and import abilities of Microsoft RegEdit to export or import Registry keys using

Rate Easy to use functions to take advantage of the export and import abilities of Microsoft RegEdit to




'Free to distribute!

'####################################################################
'######### PUT THIS CODE INTO YOUR FORM CONTROL PROCEDURES. #########
'####################################################################

'###### To Export Registry Keys ######
ExportRegistryUsingRegEdit "THE REGISTRY KEY YOU WANT TO EXPORT", "FILENAME THAT YOU WANT TO EXPORT TO", "TITLE OF THE PROGRAM IN WHICH YOU ARE USING THIS CODE IN, USED IN TITLE OF MESSAGE BOX", "WHAT YOU WANT THE MESSAGE BOX TO SAY UPON A SUCCESSFUL EXPORT"

'###### To Import Registry Keys ######
ImportRegistryUsingRegEdit "FILENAME THAT YOU WANT TO IMPORT FROM", "TITLE OF THE PROGRAM IN WHICH YOU ARE USING THIS CODE IN, USED IN TITLE OF MESSAGE BOX"

'####################################################################



'#####################################################################
'############## PUT THIS CODE INTO A BAS FILE (MODUAL). ##############
'#####################################################################

Public Sub ExportRegistryUsingRegEdit(RegistryKey As String, ExportFileName As String, NameOfTheProgram As String, MsgBoxMessage As String)
  run = Shell("regedit /e " & Chr(34) & ExportFileName & Chr(34) & " " & Chr(34) & RegistryKey & Chr(34))
  MsgBox MsgBoxMessage, 64, NameOfTheProgram
End Sub

Public Sub ImportRegistryUsingRegEdit(ImportFileName As String, NameOfTheProgram As String)
  MsgBox "You will be presented with a message box asking if you want to add the information contained in " & Chr(34) & ImportFileName & Chr(34) & " to the registry." & vbCr & "" & vbCr & "Click the Yes button to import the Registry file.", 64, NameOfTheProgram
  run = Shell("regedit " & Chr(34) & ImportFileName & Chr(34))
End Sub

'####################################################################

Download this snippet    Add to My Saved Code

Easy to use functions to take advantage of the export and import abilities of Microsoft RegEdit to Comments

No comments have been posted about Easy to use functions to take advantage of the export and import abilities of Microsoft RegEdit to . Why not be the first to post a comment about Easy to use functions to take advantage of the export and import abilities of Microsoft RegEdit to .

Post your comment

Subject:
Message:
0/1000 characters