
[已解決]批處理如何正確添加含空格的數(shù)據(jù)最后由 crist 于 -7-15 09:13
運(yùn)行后注冊(cè)相關(guān)數(shù)據(jù)變成“D:Program FilesTheWorld 3 /f”nclick="copycode($('code0'));">復(fù)制代碼
- FOR /F %%I IN ('dir/b/o TheWorld.exe') DO (
- reg add HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp PathsTheWorld.exe /v Path /d %%~dpI /f
- )
運(yùn)行后注冊(cè)相關(guān)數(shù)據(jù)變成“D:Program FilesTheWorld 3”請(qǐng)問應(yīng)該怎么寫代碼才能使注冊(cè)表相關(guān)數(shù)據(jù)變成“D:Program FilesTheWorld 3”呢?備注:echo %%~dpI的結(jié)果是“D:Program FilesTheWorld 3”感謝7樓版主幫忙,問題已解決nclick="copycode($('code1'));">復(fù)制代碼
- FOR /F %%I IN ('dir/b/o TheWorld.exe') DO (
- reg add HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp PathsTheWorld.exe /v Path /d %%~dpI /f
- )

