Button help :-(

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Indig0R0se
    Forum Member
    • May 2010
    • 4

    Button help :-(

    Hi guys

    I'm very new to all this so take it easy on me if i sound stupid....lol


    I'm trying to make a few buttons to alter a few things in windows.

    I've managed to make some buttons to change the registry ...etc but now I'm a bit stuck.


    What I'm trying to do now is make a button that when pressed it will disable "file and printer sharing" as shown here:






    And then another button to enable it again.



    What would be the best way of me doing this or is it even possible with autoplay media studio?


    Thanks
  • jassing
    Indigo Rose Customer
    • Jan 2001
    • 3124

    #2
    export your registry before and after and compare the results.... that's how you'd find exactly what it changed. (or you could use something like regmon)

    but if you really want to do it thru the gui -- have a look at autoitscript (Warning there is a plugin available, but it doesn't work on win7 or x64)

    Comment

    • Indig0R0se
      Forum Member
      • May 2010
      • 4

      #3
      Originally posted by jassing View Post
      export your registry before and after and compare the results.... that's how you'd find exactly what it changed. (or you could use something like regmon)

      but if you really want to do it thru the gui -- have a look at autoitscript (Warning there is a plugin available, but it doesn't work on win7 or x64)


      Sorry for the delay in getting back to you.


      with all the messing around with reg file you would think i would have thought of that.

      regmon isn't available anymore but i already had this software called registry workshop and that not only let me compare the reg files but it also let me save the the differences as a reg file .



      Thanks for your help


      There is one more thing i could do with a bit of help with (actually two things) .


      Is there a way to make autoplay media make a complete reg backup as soon as my software is lunched?

      The only options i have within autoplay are things like set value or create key...etc but nothing about backing them up



      Thanks again

      Comment

      • reteset
        Indigo Rose Customer
        • May 2006
        • 1692

        #4
        Originally posted by Indig0R0se View Post
        Is there a way to make autoplay media make a complete reg backup as soon as my software is lunched?
        Yes , there is a way
        Code:
        result = File.Run("regedit.exe", "/e c:\\MyRegistryBackUp.reg", "", -1, true);
        amsplugins.com Is Closed.

        Facebook Page

        Comment

        • Indig0R0se
          Forum Member
          • May 2010
          • 4

          #5
          Originally posted by reteset View Post
          Yes , there is a way
          Code:
          result = File.Run("regedit.exe", "/e c:\\MyRegistryBackUp.reg", "", -1, true);
          Thanks ill give it a go

          can you let me know where the created reg file backup will be stored?

          Also when my software is re opened and another reg file is created ,will it just over right the first one?

          Thanks again

          Comment

          • madsen
            Indigo Rose Customer
            • Jun 2004
            • 77

            #6
            In regards to RegMon, one of the great tools out there, it was integrated into ProcessMonitor together with FileMonitor (from the same sysinternals suite). Works wonders.

            Have it your way here

            As for what you are trying to achieve is also possible through some win APIs, but since you mention you're a beginner, that sounds like it's out of your league at this time. I somehow doubt that it would work through registry.
            Human Relativity: No one is alike, which is what makes us alike, at any given time. --Myself

            Comment

            • Indig0R0se
              Forum Member
              • May 2010
              • 4

              #7
              Originally posted by madsen View Post
              In regards to RegMon, one of the great tools out there, it was integrated into ProcessMonitor together with FileMonitor (from the same sysinternals suite). Works wonders.

              Have it your way here

              As for what you are trying to achieve is also possible through some win APIs, but since you mention you're a beginner, that sounds like it's out of your league at this time. I somehow doubt that it would work through registry.

              Hi

              Like i said I've managed to create the button to disable/enable the file and printer sharing using jessing's idea of comparing the reg files with it on and off.


              What I'm trying to do now is make a complete reg backup when my software is launched.


              I'm going to try reteset's code but i need to know where the backed up reg file will be created (from the looks of it it will be in C: ).

              I also need to know if the backed up reg file will be over written every time my no software is launched



              Thanks for the reply

              Comment

              • Dermot
                Indigo Rose Customer
                • Apr 2004
                • 1791

                #8
                Originally posted by Indig0R0se View Post
                Hi

                Like i said I've managed to create the button to disable/enable the file and printer sharing using jessing's idea of comparing the reg files with it on and off.


                What I'm trying to do now is make a complete reg backup when my software is launched.


                I'm going to try reteset's code but i need to know where the backed up reg file will be created (from the looks of it it will be in C: ).


                I also need to know if the backed up reg file will be over written every time my no software is launched



                Thanks for the reply
                It is very clear from his code that it is backed up to c:\\MyRegistryBackUp.reg That is just an example, you can save it where ever you want and with what ever name you want. Not sure about the overwriting, why don't you try it and see what happens.
                Dermot

                I am so out of here :yes

                Comment

                • reteset
                  Indigo Rose Customer
                  • May 2006
                  • 1692

                  #9
                  why not try and see

                  yes it overrides

                  Code:
                  result = File.Run("regedit.exe", "/e [B][COLOR="Red"]c:\\MyRegistryBackUp.reg[/COLOR][/B]", "", -1, true);
                  where c:\\MyRegistryBackUp.reg means your backup file
                  so you can set its path to where you want to create that file
                  amsplugins.com Is Closed.

                  Facebook Page

                  Comment

                  Working...
                  X