Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 9 of 9

Thread: Button help :-(

  1. #1
    Join Date
    May 2010
    Posts
    4

    Cool 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

  2. #2
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    3,132
    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)

  3. #3
    Join Date
    May 2010
    Posts
    4
    Quote 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

  4. #4
    Join Date
    May 2006
    Location
    * ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|
    Posts
    1,683
    Quote 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);

  5. #5
    Join Date
    May 2010
    Posts
    4
    Quote 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

  6. #6
    Join Date
    Jun 2004
    Posts
    77
    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.

  7. #7
    Join Date
    May 2010
    Posts
    4
    Quote 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

  8. #8
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    Quote 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

  9. #9
    Join Date
    May 2006
    Location
    * ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|
    Posts
    1,683
    why not try and see

    yes it overrides

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

Posting Permissions

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