Remote installs and exe

Posted on 2009-04-23
Last Modified: 2012-05-06
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)?
Question by:etcs
    LVL 23

    Accepted Solution

    Have you look in to a program called AutoIt we use it for our remote installs.


    LVL 2

    Expert Comment

    This is what I use in my company...

    Altiris Deployment software
    LVL 47

    Expert Comment

    Have you tried group policy to deploy ?
    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,"\\","")
 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
    	      Do While intcount < trycount
    		    	'wscript.sleep 5000
    		     	intCount = intcount + 1
    	        If cstr(err.number) <> 0 then
    	          	MsgBox err.number & ": " & err.description 
    	        End If
       	  	wscript.sleep 1000
    	fctChangeServiceState = "running"
    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
    		    	wscript.sleep 1000
    		     	intCount = intCount + 1
    	        	If cstr(err.number) <> 0 then
    	          	'	Call ErrHandler(err.number,err.description) 
    	        	End If
       		  	wscript.sleep 1500
    	   'End If
    	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


    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    Quality of Service (QoS) options are nearly endless when it comes to networks today. This article is merely one example of how it can be handled in a hub-n-spoke design using a 3-tier configuration.
    David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
    In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now