I want a script to run at command line or dos prompt

net start dot3svc

 

Thank you

I want to start dot3svc command and machines we select

 

1 Comment   [ + ] Show Comment

Comments

  • Ok a problem came up. If the dot3svc is disabled this command will not enable and start it. I need it to enable and start if disabled.
    We have a local administrator account called pcadmin which ahs admin rights to all pcs and we can user use administrator to the PC
Please log in to comment

Answers

1

create a bat file with that line.  If you are talking kace script you can upload that batch file and run that as a kscript.

Answered 07/17/2013 by: SMal.tmcc
Red Belt

  • Thank you I'm new to scripts can you show how this script would be created. Bat file would be in depencies but do i need verifies and on success?
    • cannot post pictures in comments so see new answer
Please log in to comment
1

actually just realized net is an exe not and internal call so

The quick and easy way is to target the machine that need it and run:

or you can build this way

 

 

Answered 07/17/2013 by: SMal.tmcc
Red Belt

  • Great it works thanks, one more thing can it be silent command prompt pops up. We don't want the user to see the command prompt just in case boss ask for it.
    • there are no quiet switches for the net.exe command, you can tell it to run prior to login then they will not see it.
  • ok thank you
  • Ok a problem came up. If the dot3svc is disabled this command will not enable and start it. I need it to enable and start if disabled.
  • add a launch program before the start
    c:\windows\system32\sc.exe with parameters config dot3svc start=auto (or manual)

    another way to go about this is enforce a registry setting and set the service to the automatic state by changing it's start dword from a 3 to a 2.
    HKLM\system\currentcontrolset\services\dot3svc key "start"
Please log in to comment
1

here is a silent vbs that can start/stop a service

 

Dim WshShell

Set WshShell = WScript.CreateObject("Wscript.Shell")

ServiceName = """YourService""" 

Result = WshShell.Run("net start " & ServiceName, 0, True)

Answered 07/17/2013 by: areiner
Fourth Degree Black Belt

  • Ok a problem came up. If the dot3svc is disabled this command will not enable and start it. I need it to enable and start if disabled.
Please log in to comment
Answer this question or Comment on this question for clarity