/build/static/layout/Breadcrumb_cap_w.png

Script to run a command line

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
  • 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 - Kdebiasse 11 years ago

Answers (3)

Posted by: SMal.tmcc 11 years ago
Red Belt
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.


Comments:
  • 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? - Kdebiasse 11 years ago
    • cannot post pictures in comments so see new answer - SMal.tmcc 11 years ago
Posted by: SMal.tmcc 11 years ago
Red Belt
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

 

 


Comments:
  • 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. - Kdebiasse 11 years ago
    • 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. - SMal.tmcc 11 years ago
  • ok thank you - Kdebiasse 11 years ago
  • 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. - Kdebiasse 11 years ago
  • 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" - SMal.tmcc 11 years ago
Posted by: areiner 11 years ago
4th Degree Black Belt
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)


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. - Kdebiasse 11 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ