Jump to content

Disable norton


Recommended Posts

hi,

I Created a AutoIt script that I call 'AutoConfig'

it configures the new pc's at my work

It runs from cd,

but it need to connect to an other pc on the LAN to synch the clock & read 'configuration data'.

and norton blocks that

So, I wanna disable or close norton antivirus/internet security by autoit3

if I use 'processclose' it won't work.

Is there an other way to close it with a command?

thnx

Sorry for my bad english,

I'm Dutch

Edited by djo4ever
Link to comment
Share on other sites

couldnt you just press Ctrl+Alt+Delete and go to the processes tab and end everything having anything to do with it? that is the only way i can think of.

P.S. for speaking Dutch, that is good English, most people that know English as their first language dont type that well (including me sometimes)

What goes around comes around... Payback's a bitch.

Link to comment
Share on other sites

tried stop service?

there's more than one way to do that, here's 1:

$service = "Symantec AntiVirus"
ConsoleWrite(_SetServiceState(@ComputerName, $service, "Stop") & @LF)
Sleep ( 5000 )
ConsoleWrite(_SetServiceState(@ComputerName, $service, "Start") & @LF)

Func _SetServiceState($s_pc, $service, $State)
    Local Const $wbemFlagReturnImmediately = 0x10
    Local Const $wbemFlagForwardOnly = 0x20

    Local $colItems = "", $objItem, $ret_status = -1
    Local $a_status[25] = ["Success", "Not supported", "Access denied", "Dependent services running", _
            "Invalid service control", "Service cannot accept control", "Service not active", "Service request timeout", _
            "Unknown failure", "Path not found", "Service already stopped", "Service database locked", "Service dependency deleted", _
            "Service dependency failure", "Service disabled", "Service logon failed", "Service marked for deletion", "Service no thread", _
            "Status circular dependency", "Status duplicate name", "Status - invalid name", "Status - invalid parameter", _
            "Status - invalid service account", "Status - service exists", "Service already paused"]
    If Ping($s_pc) Then
        Local $objWMIService = ObjGet("winmgmts:\\" & $s_pc & "\root\CIMV2")
        If @error Then
            MsgBox(16, "_SetServiceState", "ObjGet Error: winmgmts")
            Return
        EndIf
        $colItems = $objWMIService.ExecQuery ("SELECT * FROM Win32_Service", "WQL", _
                $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
        If @error Then
            MsgBox(16, "_SetServiceState", "ExecQuery Error: SELECT * FROM Win32_Service")
            Return
        EndIf
        If IsObj($colItems) Then
            For $objItem In $colItems
                If $objItem.Name = $service Then
                    Select
                        Case $State = "Boot" Or $State = "System" Or $State = "Automatic" Or $State = "Manual" Or $State = "Disabled"
                            $ret_status = $objItem.ChangeStartMode ($State)
                        Case $State = "Stop"
                            $ret_status = $objItem.StopService ()
                        Case $State = "Start"
                            $ret_status = $objItem.StartService ()
                        Case $State = "Pause"
                            $ret_status = $objItem.PauseService ()
                        Case $State = "Resume"
                            $ret_status = $objItem.ResumeService ()
                        Case $State = "Delete"
                            $ret_status = $objItem.Delete ()
                    EndSelect
                    ExitLoop
                EndIf
            Next
        EndIf
    EndIf
    If $ret_status <> -1 Then
        Return $a_status[$ret_status]
    Else
        SetError(1)
        Return $ret_status
    EndIf
EndFunc   ;==>_SetServiceState

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

I have McAfee Antivirus installed, and when I want it stopped, I use:

"sc stop AvSynMgr"

Off topic, but when I'm off the internet and McAfee is stopped ALL

my programs run a lot faster. That's why I stop it.

ViM

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...