Sign in to follow this  
Followers 0
Markir

Registrykey save in file

4 posts in this topic

Hello everybody,

how can I save a registry key in a file?

I look at the autoit help and i find this code:

$var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Siemens\HiPathCTI\Admin", "")

I want to save all informations from HKEY_LOCAL_MACHINE\SOFTWARE\Siemens\HiPathCTI\Admin in a file test.reg

I hope that somebody can help me.

Share this post


Link to post
Share on other sites



Hello everybody,

how can I save a registry key in a file?

I look at the autoit help and i find this code:

$var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Siemens\HiPathCTI\Admin", "")

I want to save all informations from HKEY_LOCAL_MACHINE\SOFTWARE\Siemens\HiPathCTI\Admin in a file test.reg

I hope that somebody can help me.

<{POST_SNAPBACK}>

FileWriteLine("filename",$var)

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Or this...

Run(or runwait) ('regedit.exe /e c:\test.reg "HKEY_LOCAL_MACHINE\......etc"')

Share this post


Link to post
Share on other sites

Thank you all

@quietus24

I have coded this:

#include <GUIConstants.au3>

GUICreate("HiPath CAP 3.0 Einstellungen") ; will create a dialog box that when displayed is centered

Opt("GUICoordMode",2)

GUICtrlCreateLabel ("XML PS", 10, 10, 50)

GUICtrlCreateButton ("Registrykey exportieren", -10, 340, 50)

Run ('regedit.exe /e c:\test.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Siemens\HiPathCTI\Admin"')

GUICtrlCreateButton ( "Registrykey importieren", 0, -1)

Run ('regedit.exe /i c:\test.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Siemens\HiPathCTI\Admin"')

GUISetState () ; will display an dialog box with 2 button

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

But then I run this script, there is a messagbox to import the key, but I want to choose if I want to export or import. Can you help me, please?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0