• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Remove a Registry Key

    Scheduled Pinned Locked Moved Solved
    Windows Problems
    6
    23
    5.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jaymes DriverJ
      Jaymes Driver Developer @abos_systemax
      last edited by

      @abos_systemax OHH, okay, I get you! sorry for the misunderstanding there.

      I don’t have any experience with this yet, but I will get to playing “working” and see if I can’t figure something out in my free time!

      WARNING TO USERS: My comments are written completely devoid of emotion, do not mistake my concise to the point manner as a personal insult or attack.

      1 Reply Last reply Reply Quote 0
      • M
        maouu
        last edited by

        Hello everybody,

        I made a .bat file to delete a registry key.
        I use it in a snappin with Batch Script but it does not work, I have an error code 1

        reg delete "HKLM\SOFTWARE\TightVNC" /f
        

        Someone can help me please ?!

        Thanks you

        Tom ElliottT 1 Reply Last reply Reply Quote 0
        • Tom ElliottT
          Tom Elliott @maouu
          last edited by

          @maouu Does the key actually exist on the machine?

          The error code you received is from the reg delete command itself. If the command runs it only returns two codes.

          0 = Success
          1 = Failure

          There isn’t any information as to why there would be an error so I’m just guessing the key simply doesn’t exist on the machine the snapin is running on.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 0
          • M
            maouu
            last edited by

            Yes the key exist !
            Does FOG have system rights to delete a registry key?

            How can I use the .reg file to delete the key ?!

            Thanks

            Tom ElliottT george1421G 2 Replies Last reply Reply Quote 0
            • Tom ElliottT
              Tom Elliott @maouu
              last edited by Tom Elliott

              @maouu The FOG Client runs as the SYSTEM user, so yes, it has systems rights to delete a registry key, I would think.

              Are you sure that is the location of the key, or is it in HKLM\SOFTWARE\WOW6432Node\TightVNC

              I’m not questioning your expertise, but the information would seem to indicate something else.

              I suppose you could create the reg, create a batch script to load/run the reg key, and use a “snapinpack” to run on the machine.

              There’s too many things to think about here though.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              george1421G 1 Reply Last reply Reply Quote 0
              • george1421G
                george1421 Moderator @maouu
                last edited by

                @maouu said in Remove a Registry Key:

                How can I use the .reg file to delete the key ?!

                regedit.exe /s "mykey.reg"

                Then in your mykey.reg file you need this syntax with all of the other normal prefix settings

                [-HKEY_LOCAL_MACHINE\SOFTWARE\TightVNC]
                

                Also know that the short name hklm may not be what reg is looking for, you may need the full name there. I have not tried it only offering a suggestion. The FOG Client/snapins run as SYSTEM so it should have full access to the registry even with UAC enabled.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                M 1 Reply Last reply Reply Quote 0
                • george1421G
                  george1421 Moderator @Tom Elliott
                  last edited by Tom Elliott

                  @Tom-Elliott said in Remove a Registry Key:

                  Are you sure that is the location of the key, or is it in HKLM\SOFTWARE\WOW6432Node\TightVNC

                  Oh yeah, depending on what version of VNC is installed (32 or 64 bit) the key path will be different. Good catch on that Tom.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  1 Reply Last reply Reply Quote 0
                  • M
                    maouu @george1421
                    last edited by

                    @george1421 Thanks, I’ll already test with the full name but it’s same issues.
                    I’m on W10 64bits system
                    I’ll test with: regedit.exe /s “mykey.reg”

                    @Tom-Elliott Thanks you too but my registry key is in HKLM\SOFTWARE\TightVNC
                    On HKLM\SOFTWARE\WOW6432Node\ i’ve nothing

                    Thanks you

                    Tom ElliottT george1421G 2 Replies Last reply Reply Quote 0
                    • Tom ElliottT
                      Tom Elliott @maouu
                      last edited by

                      @maouu Can you run the reg delete from the command line as is?

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                      M 2 Replies Last reply Reply Quote 0
                      • M
                        maouu @Tom Elliott
                        last edited by

                        @Tom-Elliott Yes it’s work perfectly ^^

                        1 Reply Last reply Reply Quote 0
                        • george1421G
                          george1421 Moderator @maouu
                          last edited by

                          @maouu said in Remove a Registry Key:

                          On HKLM\SOFTWARE\WOW6432Node\ i’ve nothing

                          FWIW then you have the 64 bit version of tightvnc installed otherwise this key would be populated.

                          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                          1 Reply Last reply Reply Quote 0
                          • M
                            maouu @Tom Elliott
                            last edited by

                            @Tom-Elliott It work from the commande line but when i made a snappin it’s not work.
                            I have a code 0 but my registry key is not update…

                            My snappin :
                            regedit.exe /s “http://192.168.1.6/fog/package/FOG/Key_TightVNC.reg”

                            My key.reg :

                            [HKEY_LOCAL_MACHINE\SOFTWARE\TightVNC]

                            [HKEY_LOCAL_MACHINE\SOFTWARE\TightVNC\Server]
                            “ExtraPorts”=“”
                            “QueryTimeout”=dword:0000001e
                            “QueryAcceptOnTimeout”=dword:00000001
                            “LocalInputPriorityTimeout”=dword:00000003
                            “LocalInputPriority”=dword:00000000
                            “BlockRemoteInput”=dword:00000000
                            “BlockLocalInput”=dword:00000000
                            “IpAccessControl”=“192.168.2.0-192.168.2.255:2,192.168.3.0-192.168.3.255:2,192.168.4.0-192.168.4.255:2,192.168.7.0-192.168.7.255:2,192.168.8.0-192.168.8.255:2”
                            “RfbPort”=dword:0000170c
                            “HttpPort”=dword:000016a8
                            “DisconnectAction”=dword:00000000
                            “AcceptRfbConnections”=dword:00000001
                            “UseVncAuthentication”=dword:00000001
                            “UseControlAuthentication”=dword:00000001
                            “RepeatControlAuthentication”=dword:00000001
                            “LoopbackOnly”=dword:00000000
                            “AcceptHttpConnections”=dword:00000001
                            “LogLevel”=dword:00000000
                            “EnableFileTransfers”=dword:00000001
                            “RemoveWallpaper”=dword:00000001
                            “UseMirrorDriver”=dword:00000001
                            “EnableUrlParams”=dword:00000001
                            “Password”=hex:58,34,c1,bd,a2,5d,20,a0
                            “ControlPassword”=hex:62,77,1e,20,2d,c1,2a,b6
                            “AlwaysShared”=dword:00000000
                            “NeverShared”=dword:00000000
                            “DisconnectClients”=dword:00000001
                            “PollingInterval”=dword:000003e8
                            “AllowLoopback”=dword:00000000
                            “VideoRecognitionInterval”=dword:00000bb8
                            “GrabTransparentWindows”=dword:00000001
                            “SaveLogToAllUsersPath”=dword:00000000
                            “RunControlInterface”=dword:00000001
                            “IdleTimeout”=dword:00000000
                            “VideoClasses”=“”
                            “VideoRects”=“”

                            george1421G 1 Reply Last reply Reply Quote 0
                            • george1421G
                              george1421 Moderator @maouu
                              last edited by

                              @maouu I know tightvnc, so I’m going to ask what is your goal here. Do you want to preset these values using regedit? If so there is a different way to go about this that we use.

                              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                              M 1 Reply Last reply Reply Quote 0
                              • M
                                maouu @george1421
                                last edited by

                                @george1421 At the beginning I just wanted to make a script to uninstall VNC completely and cleanly so I could reinstall it with the right settings on my computer park.
                                I realized that just by editing the registry [HKEY_LOCAL_MACHINE \ SOFTWARE \ TightVNC \ Server] it worked.

                                I want to add the following elements:

                                “IpAccessControl” = “192.168.2.0-192.168.2.255: 2,192.168.3.0-192.168.3.255: 2,192.168.4.0-192.168.4.255: 2,192.168.7.0-192.168.7.255: 2,192.168.8.0-192.168.8.255: 2”

                                “QueryTimeout” = dword: 0000001e

                                “QueryAcceptOnTimeout” = dword: 00000001

                                When I run my script:
                                regedit.exe / s “http://192.168.1.6/fog/package/FOG/Key_TightVNC.reg” I get a code 0 in Host Snapin History but the registry is not changed

                                george1421G 1 Reply Last reply Reply Quote 0
                                • george1421G
                                  george1421 Moderator @maouu
                                  last edited by

                                  @maouu Here is how we deploy with PDQ Deploy (sorry I don’t use snapins but the install function is similar:

                                    @Echo Off
                                  
                                    start /wait dfmirage-setup-2.0.301.exe /verysilent /norestart
                                  
                                    REM Hack to determine arch of this system
                                    IF EXIST C:\Windows\SysWOW64\diskpart.exe GOTO :x64
                                  
                                  :x86
                                    msiexec /i tightvnc-2.7.10-setup-32bit.msi /qn /norestart ADDLOCAL="Server" SERVER_REGISTER_AS_SERVICE=1 SERVER_ADD_FIREWALL_EXCEPTION=1 SERVER_ALLOW_SAS=1 SET_USEVNCAUTHENTICATION=1 VALUE_OF_USEVNCAUTHENTICATION=1 SET_PASSWORD=1 VALUE_OF_PASSWORD=<SetMe!!> SET_USECONTROLAUTHENTICATION=1 VALUE_OF_USECONTROLAUTHENTICATION=1 SET_CONTROLPASSWORD=1 VALUE_OF_CONTROLPASSWORD=<SetMe2!!> SET_IPACCESSCONTROL=1 VALUE_OF_IPACCESSCONTROL="192.168.0.0-192.168.255.255:2,0.0.0.0-192.167.255.255:1,192.169.0.0-255.255.255.255:1" SET_REMOVEWALLPAPER=1 VALUE_OF_REMOVEWALLPAPER=1
                                  
                                  
                                  :x64
                                    msiexec /i tightvnc-2.7.10-setup-64bit.msi /qn /norestart ADDLOCAL="Server" SERVER_REGISTER_AS_SERVICE=1 SERVER_ADD_FIREWALL_EXCEPTION=1 SERVER_ALLOW_SAS=1 SET_USEVNCAUTHENTICATION=1 VALUE_OF_USEVNCAUTHENTICATION=1 SET_PASSWORD=1 VALUE_OF_PASSWORD=<SetMe!!> SET_USECONTROLAUTHENTICATION=1 VALUE_OF_USECONTROLAUTHENTICATION=1 SET_CONTROLPASSWORD=1 VALUE_OF_CONTROLPASSWORD=<SetMe2!!> SET_IPACCESSCONTROL=1 VALUE_OF_IPACCESSCONTROL="192.168.0.0-192.168.255.255:2,0.0.0.0-192.167.255.255:1,192.169.0.0-255.255.255.255:1" SET_REMOVEWALLPAPER=1 VALUE_OF_REMOVEWALLPAPER=1
                                  
                                  
                                  :Exit
                                    REM Install done, errors generated by msi will be reported to installer
                                    net stop "TightVNC Server"
                                    net start "TightVNC Server"
                                    rmdir /s /q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\TightVNC\"
                                  

                                  I’m pretty sure if you reinstall with the new parameters they will overwrite what is in the registry. I know this ISN’T what you are looking for, but it works for us.

                                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                                  1 Reply Last reply Reply Quote 0
                                  • 1
                                  • 2
                                  • 1 / 2
                                  • First post
                                    Last post

                                  157

                                  Online

                                  12.0k

                                  Users

                                  17.3k

                                  Topics

                                  155.2k

                                  Posts
                                  Copyright © 2012-2024 FOG Project