Open lwcorp opened 2 years ago
you'd better pick something useful up and save it to new reg file.
cause there're something useless in exported "RegHive_reg.txt" file.
e.g. #1 useless: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket] [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume] [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume{x-x-x-x-x}] "NukeOnDelete"=dword:00000001
e.g. #2 useless: [HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache] "C:\Program Files\Sandboxie\SandboxieRpcSs.exe"="Sandboxie COM Services (RPC)" "X:\x\x.exe"="x"
e.g. #3 useless: [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\x] "SBIE_CurrentState"=dword:00000004 "SBIE_StartTicks"=hex(786f6273): "SBIE_ControlsAccepted"=dword:00000085 "SBIE_Win32ExitCode"=dword:00000000 "SBIE_ServiceSpecificExitCode"=dword:00000000 "SBIE_CheckPoint"=dword:00000000 "SBIE_WaitHint"=dword:00000000 "SBIE_ProcessId"=dword:0000172c
Could the program remove it before renaming to REG?
Could the program remove it before renaming to REG?
no, it can't.
reg.exe
binmay.exe
The BAT itself can do it via PowerShell, VBS or echo commands - see https://stackoverflow.com/questions/60034/how-can-you-find-and-replace-text-in-a-file-using-the-windows-command-line-envir
The BAT itself can do it via PowerShell, VBS or echo commands - see https://stackoverflow.com/questions/60034/how-can-you-find-and-replace-text-in-a-file-using-the-windows-command-line-envir
cause "binmay.exe" is easy to use and support Unicode,WinXP
PowerShell doesn't work on WinXP(Sandboxie v5.22).
vbs is complicated and i get some error(doesn't work).
bat echo command only works in ANSI(not Unicode reg).
PowerShell doesn't work on WinXP(Sandboxie v5.22).
I must assume there aren't a lot of users who stick to Widows XP, use old Sandboxie and know about your program. But for the benefit of the doubt, you can simply check if PowerShell exists. If it does, use it to create a REG file. If it doesn't, create the regular unmodified TXT file like now.
In other words, put this in your BAT file:
for %%i in (powershell.exe) do if "%%~$path:i"=="" (inside these brackets use PowerShell to create a REG file) else continue like now and create a TXT file
Credit to How to check if powershell is installed?.
here is powershell version, but it's too slow and not work on WinXP. powershell_RegHive_to_reg.zip
Since REG files use a REG file extensions (e.g. they're clickable this way), will you consider renaming them as such?