How to append a registry key value that has spaces in it?

خرید بک لینک

I found the following page (How do I modify the data of an existing registry key value name from cmd?) and it was extermely helpful, but I have a further question.

My PATH has a value that includes "c:Program FilesMicrosoft SQL Server100ToolsBinn", and I'd like to add "P:SQL" to it. When I run the script below, my PATH will then look like "C:Program;P:SQL". What needs to be modified so my PATH will look like "c:Program FilesMicrosoft SQL Server100ToolsBinn;P:SQL"?

Here is what I have:

for /F "skip=2 tokens=3" %%r in ('reg query "HKLMSYSTEMCurrentControlSetControlSession ManagerEnvironment" /ve Path') do set oldVal=%%r    
echo previous=%oldVal%    
set newVal=%oldVal%;P:SQL    
reg add "HKLMSYSTEMCurrentControlSetControlSession ManagerEnvironment" /v Path /t REG_EXPAND_SZ /d %newVal% /f

Thanks.

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 224 تاريخ: سه شنبه 8 تير 1395 ساعت: 0:54

صفحه بندی