locked
Edit Registry with standard user RRS feed

  • Question

  • Hi i am using vbscript to disable regedit for standard user.

    The script is as below :--

     Set objShell = WScript.CreateObject("WScript.Shell")

    Set WSHNetwork = CreateObject("Wscript.Network")
    strComputer = WSHNetwork.ComputerName
    UserString = WSHNetwork.UserName
    DomainString = WSHNetwork.UserDomain

    isDomainAdmin = false

    Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)

    For Each GroupObj In UserObj.Groups

    IF GroupObj.Name ="Domain Admins" THEN


    isDomainAdmin = true


    END IF

    Next


    If isDomainAdmin Then

        Wscript.Echo strUser & " Domain Admin."


    Else

        Wscript.Echo strUser & " Not A Domain Admin."


    reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t REG_DWORD /d 2 /f" 

    End If

    But i am unable to disable the regedit for standard user.

    what i am missing i do not know.

    please share your knowledge and help me so that standard user can not view or use the regedit program.

    Thanks,

    Vishwajeet.

    Saturday, July 7, 2012 11:51 AM

Answers

All replies

  • Hi Vishwajeet kumar,

     I found this Link , hope it will be useful for you .

    Link : http://www.vistax64.com/tutorials/116415-regedit-enable-disable.html

    Regards,


    MCT / MCITP / MCTS / MCSA / C|EH

    • Marked as answer by Niki Han Thursday, August 9, 2012 3:35 AM
    Saturday, July 7, 2012 7:17 PM
  • Hi,

    I suggest you ask this question in the Microsoft Script Forum for further discussion.<o:p></o:p>

    The reason
    why we recommend posting appropriately is you will get the most qualified pool
    of respondents, and other partners who read the forums regularly can either
    share their knowledge or learn from your interaction with us. Thank you for
    your understanding.<o:p></o:p>



    Mohammed Imtiyaz Ali

    • Proposed as answer by Niki Han Monday, July 9, 2012 7:11 AM
    Sunday, July 8, 2012 5:51 AM
  • Hi Rashid,

       Thanks a lot for your reply. The link is useful in order to disable or enable regedit tool but i want to disable regedit only for standard users and not for administrative users. So please suggest me the ways of how to do it ?

    Thanks,

    Vishwajeet. 

    Friday, July 13, 2012 11:34 AM