Jump to content
Sign in to follow this  

FBWF in window

Recommended Posts


I have a small script that runs the FBWF functions like enable or disable from within a GUI window. How could I display the FBWF status (when enabled or disabled) in a message box or as part of the GUI below the status button. I know there is a C++ API for the FBWF and I have looked through it but I have no C++ experience and can't understand how to convert the function over to Autoit script if even possible. I have enclosed the script if it helps. Any help is greatly appreciated.

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>

Opt('MustDeclareVars', 1)


Func Utility()
    Local $filemenu, $fileitem, $logochange, $exititem, $permissionitem
    Local $helpmenu, $helpitem, $runmenu, $runitem, $msg, $file
    Local $Button_1, $Button_2, $Button_3, $Button_4, $Button_5, $font, $widthCell
    Local $fbwfIsFilterEnabled
    Dim $syspath = "c:\windows\system32\"
    Dim $fbwf = "fbwfmgr "
    GUICreate("System Management", 150, 350, -1, -1, 0x16C00000)

    $filemenu = GUICtrlCreateMenu("&Tools")
    $fileitem = GUICtrlCreateMenu("Set Password", $filemenu)
    $logochange = GUICtrlCreateMenuItem("Change Logo", $filemenu)
    $permissionitem = GUICtrlCreateMenu("Set Permissions", $filemenu)
    $exititem = GUICtrlCreateMenuItem("Exit", $filemenu)
    $helpmenu = GUICtrlCreateMenu("Help")
    $helpitem = GUICtrlCreateMenuItem("How To", $helpmenu)

    $runmenu = GUICtrlCreateMenu("Run", -1, 1)
    $runitem = GUICtrlCreateMenuItem("Task Manager", $runmenu)
    $runitem = GUICtrlCreateMenuItem("Command Prompt", $runmenu)
    $runitem = GUICtrlCreateMenuItem("Ultr@VNC", $runmenu)
    $widthCell = 25
    Opt("GUICoordMode", 2)
    $Button_1 = GUICtrlCreateButton("Enable Protection", 1 * $widthcell, 50, 100, 20)
    $Button_2 = GUICtrlCreateButton("Disable Protection", -1, 30, 100, 20)
    $Button_3 = GUICtrlCreateButton("Protection Status", -1, 30, 100, 20)
    $Button_4 = GUICtrlCreateButton("REBOOT", -1, 60, 100, 20)
    $Button_5 = GUICtrlCreateButton("Close", -1, 30, 100, 20)

    While 1
        $msg = GUIGetMsg()
            Case $msg = $GUI_EVENT_CLOSE
                Case $msg = $Button_1   
    ;               RunWait(@ComSpec & " /k " & $syspath & $fbwf & " /enable")    ; Will Enable Write Protection
                    MsgBox(4096, "", "Please Click on REBOOT for protection to be Enabled!")

                Case $msg = $Button_2
    ;               RunWait(@ComSpec & " /k " & $syspath & $fbwf & " /disable")    ; Will Disable Write Protection
                    MsgBox(4096, "", "Please Click on REBOOT for protection to be Disabled!")

                Case $msg = $Button_3
    ;               RunWait(@ComSpec & " /k " & $syspath & $fbwf & " /displayconfig")    ; Will display status of Write Protection
    ;               if $fbwfIsFilterEnabled     
    ;                   MsgBox(4096, "", "The DVR is ", )

                Case $msg = $Button_4
                    MsgBox(4096, "", "The System will now restart!")
                Case $msg = $Button_5
                    MsgBox(4096, "", "Are you sure you want to Exit?")              

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.