drorshem Posted March 27, 2011 Share Posted March 27, 2011 Hi, I am having trouble with exporting several registry keys to one text file. For example I have: ShellExecuteWait("regedit.exe","/e registry.txt HKEY_CLASSES_ROOT\.ico", @DesktopDir) ShellExecuteWait("regedit.exe","/e registry.txt HKEY_CLASSES_ROOT\.eml", @DesktopDir) ShellExecuteWait("regedit.exe","/e registry.txt HKEY_CLASSES_ROOT\.txt", @DesktopDir) It only saves the last one (txt) in that file. Is there a way to save all of them into one file? Thanks in advance! Link to comment Share on other sites More sharing options...
smartee Posted March 28, 2011 Share Posted March 28, 2011 Something like this should suffice $path = @DesktopDir & "\registry.txt" $cache = "" ShellExecuteWait("regedit.exe", "/e "&$path&" HKEY_CLASSES_ROOT\.ico") $cache &= FileRead($path) ShellExecuteWait("regedit.exe", "/e "&$path&" HKEY_CLASSES_ROOT\.eml") $cache &= FileRead($path) ShellExecuteWait("regedit.exe", "/e "&$path&" HKEY_CLASSES_ROOT\.txt") $cache &= FileRead($path) FileOpen($path, 2) FileWrite($path, $cache) FileClose($path) Link to comment Share on other sites More sharing options...
drorshem Posted March 28, 2011 Author Share Posted March 28, 2011 (edited) Works Perfectly =) However, I wish there was a way to remove the: Windows Registry Editor Version 5.00 from each one Edited March 28, 2011 by drorshem Link to comment Share on other sites More sharing options...
sahsanu Posted March 28, 2011 Share Posted March 28, 2011 Works Perfectly =)However, I wish there was a way to remove the:Windows Registry Editor Version 5.00from each one Take a look to StringReplace function. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now