How to disable a Cortana with .bat for netlogon

Lucas Crespo 1 Reputation point

Guys, good morning!

I have a demand to disable the cortana for all users on my network, for that, I would need to create a .bat to use in netlogon.

I even managed to create one that disables via .reg, but it needs to be run as ADM and thus, it is not working with netlogon.

Would you have any suggestion/solution to create or edit my .bat?

Here's what I did and it worked only locally and as adm:

@Echo off

reg add "HKEY_LOCAL_MACHINE\Software\Policies"

reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft"

reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows"

reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Windows Search"

reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f



Windows Server Infrastructure
Windows Server Infrastructure
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Infrastructure: A Microsoft solution area focused on providing organizations with a cloud solution that supports their real-world needs and meets evolving regulatory requirements.
525 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Candy Luo 12,686 Reputation points Microsoft Vendor

    Hi ,

    If you are trying to write to any registry keys besides HKEY CURRENT USER you must have local administrator rights. As far as I know, there is no way around this.

    Best Regards,


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments