Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 361
  • Last Modified:

Remote installs and exe

I am trying to find a way to install client apps remotley, for example Symantec AV. The console is supposed to have a built in utility to push out installs, but that works 1/10 times.
This is what I have so far... I have been using Psexec to do certain tasks remotly including getting in the command prompt of remote computers. I am not sure if there are certain commands that can do it in the backgroud.

 In addition, there is a wsus diagnostic utility that runs from the command prompt. If I am using PS exec and use the "start c:/wsusdiag.exe" it will start it, but on their window in the backgroud. Does anyone know a way to get the information on the current command prompt window on the machine I am using(server)?
0
etcs
Asked:
etcs
1 Solution
 
ComputerTechieCommented:
Have you look in to a program called AutoIt we use it for our remote installs.
http://www.autoitscript.com/autoit3/

CT

0
 
xaxa-adminCommented:
This is what I use in my company...

http://www.codework.com/express/product.html

Altiris Deployment software
0
 
Donald StewartNetwork AdministratorCommented:
Have you tried group policy to deploy ?
http://www.windowsdevcenter.com/pub/a/windows/2006/11/14/how-to-deploy-software-using-group-policy.html 
 
I use the script below to telnet into the machine I want to check with clientdiag.exe
 
save as telnet2PC.vbs

Set objArgs = WScript.Arguments
Dim strComputer, strFileName, strServiceName
 
If objArgs.Count > 0 Then 
	strcomputer = objArgs(0)
ElseIf objargs.count = 0 then
	strComputer = inputbox("Enter the name of the computer you wish to install and run the remote " _ 
	 & "command console on")
	
	If strComputer = "" then wscript.quit
End If
 
strScriptPath = replace(wscript.scriptfullname,wscript.scriptname,"")
 
Call fctChangeServiceState(strComputer,"tlntsvr","start")
Call StartTelnet(strComputer)
Call fctChangeServiceState(strComputer,"tlntsvr","stop")
 
Function StartTelnet(strComputer)
  on error resume next
	Set WshShell = WScript.CreateObject("WScript.Shell")
	strComputer = replace(strComputer,"\\","")
	wshshell.run Chr(34) & "telnet.exe" & Chr(34) & " " & strComputer,1,true
  wscript.sleep 3000 
End Function
 
Function fctChangeServiceState(strComputer,strServiceName,strState)
If strState = "start" Then 
	on error goto 0
	Dim ServiceSet, Service, svcState
	
	Set ServiceSet = GetObject("winmgmts:{impersonationLevel=impersonate}!//" _
   & strComputer).ExecQuery("select Name from Win32_Service where name='" & strServiceName & "'")
	
	If cstr(err.number) <> 0 then
    		msgbox err.number & ": " & err.description 
	  	Exit Function
	End If
	wscript.sleep 1000
 
	For each Service in ServiceSet
	   on error goto 0
	   tryCount = 5
	   intcount = 0
		
	   Service.ChangeStartMode("Manual")
  
	      Do While intcount < trycount
	    		Service.StartService()
		    	'wscript.sleep 5000
		     	intCount = intcount + 1
	
	        If cstr(err.number) <> 0 then
	          	MsgBox err.number & ": " & err.description 
	        End If
	
   	  	wscript.sleep 1000
 
	      Loop
 
	fctChangeServiceState = "running"
	Next
ElseIf strState = "stop" Then
	On Error goto 0
  'msgbox strcomputer
  strComputer = replace(strCOmputer,"\\","")
	Set ServiceSet = GetObject("winmgmts:{impersonationLevel=impersonate}!//" _
   & strComputer).ExecQuery("select Description,Name,State from Win32_Service where name='" & strServiceName & "'")
	If cstr(err.number) <> 0 then
	  'Call ErrHandler(err.number,err.description) 
	  Exit Function
	End If
	trycount = 5
 	intcount = 0
 
	For each Service in ServiceSet
	        Do While intcount < trycount
          'msgbox service.name
	    		Service.StopService()
		    	
		    	wscript.sleep 1000
		     	
		     	intCount = intCount + 1
	        	If cstr(err.number) <> 0 then
	          	'	Call ErrHandler(err.number,err.description) 
	        	err.clear
	        	End If
   		  	wscript.sleep 1500
		Loop
	   'End If
  Service.ChangeStartMode("Disabled")
	Next
	fctChangeServiceState = "stopped"
 
 
End If
 
 
End Function
 
Function RunProcess(strCommand,strComputer)
  On Error Resume Next
  dim errDescription
  
  Set objProcess = GetObject("winmgmts:{impersonationLevel=impersonate}!//" & strComputer & "\root\cimv2:Win32_Process")
  intReturn = objProcess.Create (strCommand, Null, Null, intProcessID)
 
    Select Case intReturn
      Case 0 
        errdescription = "Successfully created process on " & strComputer
      Case 2 
        errdescription = "Access denied"
      Case 3 
        errdescription = "Insufficient privileges to create a process on " & strComputer & ""
      Case 9
        errdescription = "Path not found for " & strCommand & " on " & strComputer
      Case Else
        
    End Select
  
  If intReturn <> 0 Then MsgBox intReturn & " - " & errdescription
End Function

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now