Results 1 to 1 of 1

Thread: How to disable task manager in windows 7 registry as administrator with excel vba?

  1. #1

    Question How to disable task manager in windows 7 registry as administrator with excel vba?



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello friends, hope you can help me, I have a excel file with macro with the code vba password protected and shared, but I detect when the user uses the task manager to close to force the excel file, it opens as if he had not put the lock protection vba project.

    So I want to disable the task manager while the user open excel book.

    I've tried the following code but does not work:

    Sub Disable ()
    Dim Locat As String
    Dim ModifReg As String
    Locat = "cd C: \ Windows \ system32"
    ModifReg = "REG add HKCU \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System / v DisableTaskMgr / t REG_DWORD / d 1 / f"
    Call Shell ("C: \ WINDOWS \ system32 \ cmd.exe / k" & Locat , 1)
    Call Shell ("C: \ WINDOWS \ system32 \ cmd.exe / k" & ModifReg 1)

    End Sub

    When I run it (REG add HKCU ) from cmd as administrator it works , but I need it to work when the user of the macro open the file in any pc.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •