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
Answers (3)
Please log in to answer
Posted by:
SMal.tmcc
11 years ago
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.
Posted by:
SMal.tmcc
11 years ago
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
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
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