Regedit key

Welcome Forums General PowerShell Q&A Regedit key

Viewing 1 reply thread
  • Author
    Posts
    • #241940
      Participant
      Topics: 1
      Replies: 0
      Points: 11
      Rank: Member

      Hello
      I have question about regedit, when i add file to autostart using powershell:
      reg add HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run /v WindowsRTCP /d “C:\Windows\SomeFile.exe” /f
      Default it’s disabled in TaskManager/Startup
      How can i enable it from powershell?

    • #241961
      Participant
      Topics: 5
      Replies: 2413
      Points: 6,202
      Helping Hand
      Rank: Community MVP

      If you don’t have administrative rights you cannot write to the LOCAL_MACHINE hive. And you cannot enable it by Powershell because you would need to have administrative rights for it. But you can always write to the CURRENT_USER hive if you want to. 😉

Viewing 1 reply thread
  • You must be logged in to reply to this topic.