任何建议都是很棒的。
xml ed -s /chkSys/machine/registry -t elem -n key -v "" -i /registry/key -t attr -n value -v "'C:\Program Files\Microsoft SQL Server'" -v path "HKLM\software\symantec\Symantec Endpoint Protection\AV\Exclusions\ScanningEngines" --net \\server3\e$\temp\chksys\chksys.xml
##Old##
<?xml version="1.0" encoding="utf-8"?>
<chksys>
<machine>
<registry>
</registry>
</machine>
</chksys>
##New##
<?xml version="1.0" encoding="utf-8"?>
<chksys>
<machine>
<registry>
<key value="'C:\Program Files\Microsoft SQL Server'" path "HKLM\software\symantec\Symantec Endpoint Protection\AV\Exclusions\ScanningEngines\Directory\Admin\1075182566\DirectoryName"/>
</registry>
</machine>
</chksys>发布于 2011-10-08 22:08:44
你的命令有点离谱,当你插入时,你应该使用完整的路径键:
xml ed --net ^
-s /chksys/machine/registry -t elem -n key -v "" ^
-i /chksys/machine/registry/key -t attr -n value ^
-v "'C:\Program Files\Microsoft SQL Server'" ^
-i /chksys/machine/registry/key -t attr -n path ^
-v "HKLM\software\symantec\Symantec Endpoint Protection\AV\Exclusions\ScanningEngines" ^
OLDFILE > NEWFILE这将把编辑过的xml放入新的文件中,如果你想直接修改OLDFILE,你可以使用--inplace或-L选项。
xml ed --net --inplace ^
...https://stackoverflow.com/questions/7693690
复制相似问题