Is it possible to toggle the icon of this right-click context menu toggle switch?How to recover my .xml...

Is this Paypal Github SDK reference really a dangerous site?

PTIJ: Sport in the Torah

Did Amazon pay $0 in taxes last year?

Why isn't P and P/poly trivially the same?

Paper published similar to PhD thesis

Unfamiliar notation in Diabelli's "Duet in D" for piano

Professor forcing me to attend a conference, I can't afford even with 50% funding

What is better: yes / no radio, or simple checkbox?

Why restrict private health insurance?

How strong is the axiom of well-ordered choice?

How does a sound wave propagate?

Who has more? Ireland or Iceland?

How to make sure I'm assertive enough in contact with subordinates?

Is this a crown race?

Should I file my taxes? No income, unemployed, but paid 2k in student loan interest

After Brexit, will the EU recognize British passports that are valid for more than ten years?

How do you make a gun that shoots melee weapons and/or swords?

How to write a chaotic neutral protagonist and prevent my readers from thinking they are evil?

Can multiple states demand income tax from an LLC?

Why aren't there more Gauls like Obelix?

Why do we say 'Pairwise Disjoint', rather than 'Disjoint'?

Is there a math expression equivalent to the conditional ternary operator?

Unidentified signals on FT8 frequencies

Ultrafilters as a double dual



Is it possible to toggle the icon of this right-click context menu toggle switch?


How to recover my .xml default icon?help Add Any Application Shortcut in Desktop Context MenuContext menu (right click) not working for start menu itemsWindows 8 Right-click (context) menu hangAdding entries to the context menu and organising them in Windows 7Software - Right click context menu not workingContext menu folder icon from .exeHow do i add a cmd delete option to the right click context menu in window 10Add WSL to right click context menuHow to “Open CMD Here as Administrator” in right-click menu, with no elevation prompt. Without changing UAC rules













0















I have this toggle switch that starts and/or stops the WinDefend service from Windows 10 right-click Context menu. At present it only has one icon but I want it to be able to change icons too whenever it toggles the service. So that when it starts the Windefend service, it shows the EppManifest.dll,7 icon and when it stops the WinDefend service, it shows the EppManifest.dll,8 icon.



Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOTDirectoryBackgroundShellToggle Windows Defender]
"Icon"="%ProgramFiles%\Windows Defender\EppManifest.dll,7"
"Position"="Bottom"

[HKEY_CLASSES_ROOTDirectoryBackgroundShellToggle Windows Defendercommand]
@=""C:\YOUR\NSUDO\FOLDER\NSudo.exe" -U:P -ShowWindowMode:Hide cmd /c "sc query WinDefend | find /I "STATE" | find "STOPPED" && ("C:\YOUR\NSUDO\FOLDER\NSudo.exe" -U:T -ShowWindowMode:Hide sc start WinDefend & exit/b) || ("C:\YOUR\NSUDO\FOLDER\NSudo.exe" -U:T -ShowWindowMode:Hide sc stop WinDefend)""


The WinDefend service can only be stopped with TrustedInstaller privileges. So we need NSudo to run this script as TrustedInstaller










share|improve this question

























  • This icon is in the right-click context menu?

    – music2myear
    11 hours ago











  • Yes. this REG file creates a right-click context menu toggle switch

    – freddie-o
    10 hours ago











  • The few guides I just checked online suggest there is no need to refresh Explorer.exe or reset the computer for icons in the context menus to update. I don't know what mechanism Windows uses to update these. Have you tried just adding the icon changing method to the script that switches the service state? What happened when you did?

    – music2myear
    10 hours ago











  • That's what I don't know how to do--adding the icon changing method to the script. I want it to be able to change icons when it switches the service state.

    – freddie-o
    10 hours ago













  • The basic issue here then is that you are trying to do TWO things in a context-menu command rather than one thing. So, instead of placing the action command in the context menu, place an argument to run a script, and then place the action commands in the script that runs, including the information necessary to adjust the icon. A script can more easily do multiple things in a single run.

    – music2myear
    10 hours ago
















0















I have this toggle switch that starts and/or stops the WinDefend service from Windows 10 right-click Context menu. At present it only has one icon but I want it to be able to change icons too whenever it toggles the service. So that when it starts the Windefend service, it shows the EppManifest.dll,7 icon and when it stops the WinDefend service, it shows the EppManifest.dll,8 icon.



Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOTDirectoryBackgroundShellToggle Windows Defender]
"Icon"="%ProgramFiles%\Windows Defender\EppManifest.dll,7"
"Position"="Bottom"

[HKEY_CLASSES_ROOTDirectoryBackgroundShellToggle Windows Defendercommand]
@=""C:\YOUR\NSUDO\FOLDER\NSudo.exe" -U:P -ShowWindowMode:Hide cmd /c "sc query WinDefend | find /I "STATE" | find "STOPPED" && ("C:\YOUR\NSUDO\FOLDER\NSudo.exe" -U:T -ShowWindowMode:Hide sc start WinDefend & exit/b) || ("C:\YOUR\NSUDO\FOLDER\NSudo.exe" -U:T -ShowWindowMode:Hide sc stop WinDefend)""


The WinDefend service can only be stopped with TrustedInstaller privileges. So we need NSudo to run this script as TrustedInstaller










share|improve this question

























  • This icon is in the right-click context menu?

    – music2myear
    11 hours ago











  • Yes. this REG file creates a right-click context menu toggle switch

    – freddie-o
    10 hours ago











  • The few guides I just checked online suggest there is no need to refresh Explorer.exe or reset the computer for icons in the context menus to update. I don't know what mechanism Windows uses to update these. Have you tried just adding the icon changing method to the script that switches the service state? What happened when you did?

    – music2myear
    10 hours ago











  • That's what I don't know how to do--adding the icon changing method to the script. I want it to be able to change icons when it switches the service state.

    – freddie-o
    10 hours ago













  • The basic issue here then is that you are trying to do TWO things in a context-menu command rather than one thing. So, instead of placing the action command in the context menu, place an argument to run a script, and then place the action commands in the script that runs, including the information necessary to adjust the icon. A script can more easily do multiple things in a single run.

    – music2myear
    10 hours ago














0












0








0








I have this toggle switch that starts and/or stops the WinDefend service from Windows 10 right-click Context menu. At present it only has one icon but I want it to be able to change icons too whenever it toggles the service. So that when it starts the Windefend service, it shows the EppManifest.dll,7 icon and when it stops the WinDefend service, it shows the EppManifest.dll,8 icon.



Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOTDirectoryBackgroundShellToggle Windows Defender]
"Icon"="%ProgramFiles%\Windows Defender\EppManifest.dll,7"
"Position"="Bottom"

[HKEY_CLASSES_ROOTDirectoryBackgroundShellToggle Windows Defendercommand]
@=""C:\YOUR\NSUDO\FOLDER\NSudo.exe" -U:P -ShowWindowMode:Hide cmd /c "sc query WinDefend | find /I "STATE" | find "STOPPED" && ("C:\YOUR\NSUDO\FOLDER\NSudo.exe" -U:T -ShowWindowMode:Hide sc start WinDefend & exit/b) || ("C:\YOUR\NSUDO\FOLDER\NSudo.exe" -U:T -ShowWindowMode:Hide sc stop WinDefend)""


The WinDefend service can only be stopped with TrustedInstaller privileges. So we need NSudo to run this script as TrustedInstaller










share|improve this question
















I have this toggle switch that starts and/or stops the WinDefend service from Windows 10 right-click Context menu. At present it only has one icon but I want it to be able to change icons too whenever it toggles the service. So that when it starts the Windefend service, it shows the EppManifest.dll,7 icon and when it stops the WinDefend service, it shows the EppManifest.dll,8 icon.



Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOTDirectoryBackgroundShellToggle Windows Defender]
"Icon"="%ProgramFiles%\Windows Defender\EppManifest.dll,7"
"Position"="Bottom"

[HKEY_CLASSES_ROOTDirectoryBackgroundShellToggle Windows Defendercommand]
@=""C:\YOUR\NSUDO\FOLDER\NSudo.exe" -U:P -ShowWindowMode:Hide cmd /c "sc query WinDefend | find /I "STATE" | find "STOPPED" && ("C:\YOUR\NSUDO\FOLDER\NSudo.exe" -U:T -ShowWindowMode:Hide sc start WinDefend & exit/b) || ("C:\YOUR\NSUDO\FOLDER\NSudo.exe" -U:T -ShowWindowMode:Hide sc stop WinDefend)""


The WinDefend service can only be stopped with TrustedInstaller privileges. So we need NSudo to run this script as TrustedInstaller







icons context-menu






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 10 hours ago







freddie-o

















asked 11 hours ago









freddie-ofreddie-o

183




183













  • This icon is in the right-click context menu?

    – music2myear
    11 hours ago











  • Yes. this REG file creates a right-click context menu toggle switch

    – freddie-o
    10 hours ago











  • The few guides I just checked online suggest there is no need to refresh Explorer.exe or reset the computer for icons in the context menus to update. I don't know what mechanism Windows uses to update these. Have you tried just adding the icon changing method to the script that switches the service state? What happened when you did?

    – music2myear
    10 hours ago











  • That's what I don't know how to do--adding the icon changing method to the script. I want it to be able to change icons when it switches the service state.

    – freddie-o
    10 hours ago













  • The basic issue here then is that you are trying to do TWO things in a context-menu command rather than one thing. So, instead of placing the action command in the context menu, place an argument to run a script, and then place the action commands in the script that runs, including the information necessary to adjust the icon. A script can more easily do multiple things in a single run.

    – music2myear
    10 hours ago



















  • This icon is in the right-click context menu?

    – music2myear
    11 hours ago











  • Yes. this REG file creates a right-click context menu toggle switch

    – freddie-o
    10 hours ago











  • The few guides I just checked online suggest there is no need to refresh Explorer.exe or reset the computer for icons in the context menus to update. I don't know what mechanism Windows uses to update these. Have you tried just adding the icon changing method to the script that switches the service state? What happened when you did?

    – music2myear
    10 hours ago











  • That's what I don't know how to do--adding the icon changing method to the script. I want it to be able to change icons when it switches the service state.

    – freddie-o
    10 hours ago













  • The basic issue here then is that you are trying to do TWO things in a context-menu command rather than one thing. So, instead of placing the action command in the context menu, place an argument to run a script, and then place the action commands in the script that runs, including the information necessary to adjust the icon. A script can more easily do multiple things in a single run.

    – music2myear
    10 hours ago

















This icon is in the right-click context menu?

– music2myear
11 hours ago





This icon is in the right-click context menu?

– music2myear
11 hours ago













Yes. this REG file creates a right-click context menu toggle switch

– freddie-o
10 hours ago





Yes. this REG file creates a right-click context menu toggle switch

– freddie-o
10 hours ago













The few guides I just checked online suggest there is no need to refresh Explorer.exe or reset the computer for icons in the context menus to update. I don't know what mechanism Windows uses to update these. Have you tried just adding the icon changing method to the script that switches the service state? What happened when you did?

– music2myear
10 hours ago





The few guides I just checked online suggest there is no need to refresh Explorer.exe or reset the computer for icons in the context menus to update. I don't know what mechanism Windows uses to update these. Have you tried just adding the icon changing method to the script that switches the service state? What happened when you did?

– music2myear
10 hours ago













That's what I don't know how to do--adding the icon changing method to the script. I want it to be able to change icons when it switches the service state.

– freddie-o
10 hours ago







That's what I don't know how to do--adding the icon changing method to the script. I want it to be able to change icons when it switches the service state.

– freddie-o
10 hours ago















The basic issue here then is that you are trying to do TWO things in a context-menu command rather than one thing. So, instead of placing the action command in the context menu, place an argument to run a script, and then place the action commands in the script that runs, including the information necessary to adjust the icon. A script can more easily do multiple things in a single run.

– music2myear
10 hours ago





The basic issue here then is that you are trying to do TWO things in a context-menu command rather than one thing. So, instead of placing the action command in the context menu, place an argument to run a script, and then place the action commands in the script that runs, including the information necessary to adjust the icon. A script can more easily do multiple things in a single run.

– music2myear
10 hours ago










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1412449%2fis-it-possible-to-toggle-the-icon-of-this-right-click-context-menu-toggle-switch%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1412449%2fis-it-possible-to-toggle-the-icon-of-this-right-click-context-menu-toggle-switch%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown