Note that there are some explanatory texts on larger screens.

plurals
  1. PODOS Delayed expansion in concatendated command string
    primarykey
    data
    text
    <p>I have asked other questions about Concatenated commands in DOS, but am obviously not yet that confident with the full bredth of things to take into account.</p> <p>Can someone take a look at the below code and output on my system and see if they can advise what syntax is wrong (Note, I have broken the lines manually):</p> <pre><code>%comspec% /v:on /k "(for /f "tokens=2*" %a in ('reg query hkcu\software\microsoft \windows\currentversion\policies\system /v DisableTaskMgr') do @set DisableTaskMg r=%b) 2&gt;nul &amp; set DisableTaskMgr&amp; pause &amp; (if defined programfiles^(x86^) (set "ProgramFiles(x32)=%programfiles(x86)%") else (set "ProgramFiles(x32)=%programfil es%")) &amp; !ProgramFiles(x32)!\Mozilla\Firefox\Firefox.exe -chrome chrome://browser /content &amp; echo. &amp; if defined DisableTaskMgr (echo DisableTaskMgr reg key existed prior to running, and... &amp; (set DisableTaskMgr=%DisableTaskMgr:~2,3% &amp; echo ! DisableTaskMgr! &amp; reg add hkcu\software\microsoft\windows\currentversion\policies \system /v DisableTaskMgr /t REG_DWORD /d %DisableTaskMgr% &amp; if %DisableTaskMgr% eql 0 (echo Previous state was Task Manager enabled) else (echo Previous state was Task Manager DISabled))) else (echo DisableTaskMgr reg key DID NOT exist pri or to running &amp; reg delete hkcu\software\microsoft\windows\currentversion\polici es\system /v DisableTaskMgr /f)" </code></pre> <p>.<br> <img src="https://i.stack.imgur.com/nqYJo.png" alt="enter image description here"></p> <p>I have tried cutting out parts of the code to fix individual parts, but my attempts at trial and error prove that I don't have much of an idea of what is wrong, and that I am not going to get this solved on my own very fast :(</p> <p><img src="https://i.stack.imgur.com/2hLl5.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload