Sign in to follow this  
Followers 0
czmaster

Motherboard beep on win7

7 posts in this topic

Hello,

Is it possible to make the motherboard beep in windows 7 (like in xp with the beep function)?

Thanks,

Share this post


Link to post
Share on other sites



Yes of course.

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Hello,

Is it possible to make the motherboard beep in windows 7 (like in xp with the beep function)?

Thanks,

Here is a tuto for disable it, if it can help you to do the inverse ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Yes of course.

Cool !

I thought the speaker of my pc would remain silent forever !

Resucitation you did !

Thanks ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Thank you but I use Win7 32bits and I have this error :

_opendriver function failed error 1

I put porttalk.sys in the same folder.

Any idea ?

Share this post


Link to post
Share on other sites

Thank you but I use Win7 32bits and I have this error :

_opendriver function failed error 1

I put porttalk.sys in the same folder.

Any idea ?

Yes, all.

It's my bad. I haven't anticipated all possible scenarios that could occur when somebody runs the example scripts. If run from within zip or DriverBeep.au3 alone without the driver it would make one step too much and that what you experience would happen. Solution is actually very simple (at least should be). Replace _UnInstallDriver() function from scripts with this function:

Func _UnInstallDriver($sDriver)
    Local $aCall = DllCall("advapi32.dll", "ptr", "OpenSCManager", _
            "ptr", 0, _ ; service control manager on the local computer
            "ptr", 0, _ ; SERVICES_ACTIVE_DATABASE
            "dword", 0x000F003F) ; SC_MANAGER_ALL_ACCESS
    If @error Or Not $aCall[0] Then
        Return SetError(1, 0, 0)
    EndIf
    Local $hSCManager = $aCall[0]

    $aCall = DllCall("advapi32.dll", "ptr", "OpenServiceW", _
            "ptr", $hSCManager, _
            "wstr", $sDriver, _
            "dword", 0x000F01FF) ; SERVICE_ALL_ACCESS

    If @error Or Not $aCall[0] Then
        DllCall("advapi32.dll", "ptr", "CloseServiceHandle", "ptr", $hSCManager)
        Return SetError(2, 0, 0)
    EndIf
    Local $hService = $aCall[0]

    $aCall = DllCall("advapi32.dll", "int", "ControlService", _
            "ptr", $hService, _
            "dword", 1, _ ; SERVICE_CONTROL_STOP
            "ptr*", 0)
    If @error Or Not $aCall[0] Then
;~      DllCall("advapi32.dll", "ptr", "CloseServiceHandle", "ptr", $hService)
;~      DllCall("advapi32.dll", "ptr", "CloseServiceHandle", "ptr", $hSCManager)
;~      Return SetError(3, 0, 0)
    EndIf

    $aCall = DllCall("advapi32.dll", "int", "DeleteService", "ptr", $hService)
    If @error Or Not $aCall[0] Then
        DllCall("advapi32.dll", "ptr", "CloseServiceHandle", "ptr", $hService)
        DllCall("advapi32.dll", "ptr", "CloseServiceHandle", "ptr", $hSCManager)
        Return SetError(4, 0, 0)
    EndIf

    DllCall("advapi32.dll", "ptr", "CloseServiceHandle", "ptr", $hService)
    DllCall("advapi32.dll", "ptr", "CloseServiceHandle", "ptr", $hSCManager)

    Return 1
EndFunc

The only difference is that two commented lines.

Works now? Speak person.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

It work fine thank you.

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  
Followers 0