Registry Export Frage

Gary12345

Ensign
Registriert
Sep. 2012
Beiträge
246
Hallo,

Batch-Script:

Code:
ECHO OFF
regedit /e %USERPROFILE%\Desktop\look.txt "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" 
regedit /e %USERPROFILE%\Desktop\look.txt "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"

Ist es irgendwie möglich, dass man die beiden Exports in EINER Textdatei speichert? Wenn man das ausführt, wird jeweils der letzte Export in der Textdatei gespeichert.

Danke!
 
in dem du sie mit 2 verschiedenen Namen versehrst, und dann erst zusammen führst, zB.:
Code:
ECHO OFF
regedit /e %USERPROFILE%\Desktop\look1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
regedit /e %USERPROFILE%\Desktop\look2.txt "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
copy /b %USERPROFILE%\Desktop\look1.txt +%USERPROFILE%\Desktop\look2.txt %USERPROFILE%\Desktop\look.txt
DEL %USERPROFILE%\Desktop\look1.txt %USERPROFILE%\Desktop\look2.txt
 
Zuletzt bearbeitet:
also aus zwei Text-Dateien eine zu machen ist das kleinere Problem... das Problem ist, dass du die erste Zeile bei der zweiten Datei gar nicht mehr haben willst...


Da kann das hier helfen:
Code:
@ECHO OFF
regedit /e %USERPROFILE%\Desktop\run.txt "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" 
regedit /e %USERPROFILE%\Desktop\run2.txt "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
TYPE %USERPROFILE%\Desktop\run2.txt | FIND /V /I "Windows Registry Editor Version 5.00" >> %USERPROFILE%\Desktop\run.txt
rem del %USERPROFILE%\Desktop\run2.txt

Das ganze ungetestet und ohne Gewähr... auf Wunsch kann die temporäre Datei auch gelöscht werden (was durch das REM verhindert wird)

@BadBigBen: Naja, wirklich viel bringt das allerdings nicht, da es keine gültige Reg-Datei ist so...
 
Zuletzt bearbeitet:
Habe mittlerweile diese Lösung gefunden:

ECHO OFF
reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run" >> look.txt
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" >> look.txt
reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce" >> look.txt
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce" >> look.txt
reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices" >> look.txt
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunServices" >> look.txt
reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx" >> look.txt
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceEx" >> look.txt
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows" >> look.txt
reg query "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows" >> look.txt

Dennoch Danke!
 
Zurück
Oben