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

How spaceships determine each other's mass in space?

Use Mercury as quenching liquid for swords?

Short story about cities being connected by a conveyor belt

Should we avoid writing fiction about historical events without extensive research?

Generating a list with duplicate entries

What exactly is the meaning of "fine wine"?

Can I negotiate a patent idea for a raise, under French law?

Sort array by month and year

Why is there an extra space when I type "ls" on the Desktop?

What would be the most expensive material to an intergalactic society?

Why do we call complex numbers “numbers” but we don’t consider 2-vectors numbers?

How to distinguish easily different soldier of ww2?

Can Witch Sight see through Mirror Image?

Why restrict private health insurance?

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

Is the differential, dp, exact or not?

Inorganic chemistry handbook with reaction lists

What is the orbit and expected lifetime of Crew Dragon trunk?

How to recover against Snake as a heavyweight character?

Short story about an infectious indestructible metal bar?

“I had a flat in the centre of town, but I didn’t like living there, so …”

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

What the error in writing this equation by latex?

How to install "rounded" brake pads



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
    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
    9 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
    9 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
    9 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
    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
    9 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
    9 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
    9 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
    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
    9 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
    9 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
    9 hours ago



















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

    – music2myear
    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
    9 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
    9 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
    9 hours ago

















This icon is in the right-click context menu?

– music2myear
10 hours ago





This icon is in the right-click context menu?

– music2myear
10 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
9 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
9 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
9 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
9 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
9 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
9 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







Popular posts from this blog

Cannot install PyQt5 The Next CEO of Stack OverflowCannot install tcpreplay 3.4.4cannot...

Kapp-Putsch Acontecimentos | Outros artigos | Menu de navegação

Why did early computer designers eschew integers? The Next CEO of Stack OverflowWhat register...