windows - Exporting Entire Registry To Relative Path -
using following code
regedit /e c:\output.reg
a registry dump file created in c directory. overwrites automatically when file same name exists. when try changing output directory relative path this
regedit /e output.reg
it wouldn't work.
no file created processing takes long usually. code can export whole registry using relative path?
like requested, .bat code including debug code:
echo %cd% regedit /e output.reg pause
command line output:
c:\users\username\desktop\new_folder>echo c:\users\username\desktop\new_folder c:\users\username\desktop\new_folder c:\users\username\desktop\new_folder>regedit /e output.reg c:\users\username\desktop\new_folder>pause press key exit . . .
folder before (and after) .bat file execution:
the syntax of command given in question fine. if supply relative path output file name file created relative current working directory. verified interactive command prompt.
whatever going wrong batch script, problem not have surmised. of more obvious explanations include:
- the working directory not think is. verify adding debug code script emit working directory.
- the file locked reason , regedit cannot write file.
- you don't have sufficient rights write working directory.
update
thanks lot question update. tried re-create scenario (i'm on windows 7 doubt matters) , indeed find same issue you. command works fine interactive console window, not when executing in batch script.
i've no idea why is, here simple enough workaround supply full path:
regedit /e %cd%\output.reg
Comments
Post a Comment