Re: Remove programs with a script?



I found this on running scripts on remote machine:

My purpose is to use the script below to pass "uninst_notes.bat" to a remote
machine and run it there. While I execute this I get error:
Error: ActiveX component can't create object
Code: 800A01AD
Source: Microsoft VBScript runtime error

What could cause this? I'm running the script below on a DC with domain
admins member account. The "uninst_notes.bat" is in the same folder as the
script below.

Here's the code:
Dim objController, objRemoteScript, objFSO
Dim objTSIn, objTSOut, strComputer

'Create objects
Set objController = CreateObject("WshController")
Set objFSO = CreateObject("Scripting.FileSystemObject")

'Read computer names from file
Set objTSIn = objFSO.OpenTextFile("targets.txt")

'Open output file for log
Set objTSOut = objFSO.CreateTextFile("log.txt", True)

Do Until objTSIn.AtEndOfStream
'Deploy script to remote computer

strComputer = objTSIn.ReadLine
objTSOut.WriteLine strComputer & ": Deploying at " & Now
Set objRemoteScript = objController.CreateScript( _
"uninst_notes.bat", strComputer)
WScript.ConnectObject objRemoteScript, "remote_"
objRemoteScript.Execute
Do Until objRemoteScript.Status = 1
WScript.Sleep 1000
Loop
objTSOut.WriteLine strComputer & " Completed at " & Now
Set objRemoteScript = Nothing

Loop

objTSIn.Close
objTSOut.Close
WScript.Echo "Deployment script complete."

Sub remote_Error
Dim objError
Set objError = objRemote.Error
objTSOut.WriteLine strComputer & ": Error at " & Now
objTSOut.WriteLine " Line: " & objError.Line & _
", Char: " & objError.Character & vbCrLf & _
"Description: " & objError.Description
WScript.Quit -1
End Sub


Thank you
-William








"William Stokes" <will@xxxxxxxxxxxxx> kirjoitti
viestissä:%2324r$uenHHA.3544@xxxxxxxxxxxxxxxxxxxxxxx
Hello,

Found out what you referred to and tested this locally. My next question
is naturally how to execute this on remote computers?

The command is:
msiexec /x {EACF4962-0476-41D4-A04D-4AD7961F8829} /passive /Lire
"c:\uninstlog.txt"
(The ID is identical in all clients)

I need some way to launch this from my admin PC to run on other
workstations so there's no user action required. I don't want to use
logon/logoff scripts cause the require logging on/off. Is there a way to
do this?

Thanks a LOT
-Will






"asdf" <asdf@xxxxxxxx> kirjoitti
viestissä:e1$DqSbnHHA.3888@xxxxxxxxxxxxxxxxxxxxxxx
"You just have to find said uninstaller and the command line options."

----------------------------------------------

Each install via "msiexec", that is "microsoft installation executable".

sets a unique GUID in the regisytry that contains all unique values used,
containing all installation setting the package allowed.

And hence will do an uninstall when calling GUID and uninstall switch
from msiexec prefix.
-------------------------------------------
Unfortunately MS went later to require an extra per "OS Version" file
written out and to be used to allow using "msiexec", in that manner.
-------------------------------------------
You likely will be unsuccessful, using this post's information
with '2007' type ms product installations.
-------------------------------------------
I gave up in installing Window Media Player on 2003 Server,
to entertain myself with news, blog's Windows media player
references used on 2003 Server an so forth.

Ms now has 'killed' the Windows Media Player" plug in for
Firefox on 2003 Server. E.g killing my watching the Ron Paul happening
during work.

Ms, -- do not stand in line for the flavor you are asking for.
The respective community has rejected your pledge,
for sanity as well as sanitary purposes.
Yes, you can, but it does not please the world any more.

It registers as your case for dividing not uniting computer users.






"Shenan Stanley" <newshelper@xxxxxxxxx> wrote in message
news:OH8FIzTnHHA.1776@xxxxxxxxxxxxxxxxxxxxxxx
William Stokes wrote:
Is it possible to remove installed programs from XP SP2 computers
with a script? And I mean manually installed (=setup.exe) programs
not any centrally deployed or published applications.

I would need to remove old Lotus Notes installations from 40 PC's.
I can of course do it manually via Add/Remove programs but it may
take a while (40x20min=800min = a boring weekend).

I havent yet tested installing newer version on top of the old one
since the old one has a bit "funny" configuration and I would be
pleased just to get rid of it and then centrally deploy new version
with MSI package.

Yes - if the application has an uninstaller.
You just have to find said uninstaller and the command line options.

--
Shenan Stanley
MS-MVP
--
How To Ask Questions The Smart Way
http://www.catb.org/~esr/faqs/smart-questions.html






.



Relevant Pages

  • Re: Microsoft Warns of New Windows Flaw (March 19, 2003 )
    ... In WINDOWS SETUP in ADD/REMOVE PROGRAMS of Control Panel ... Uninstall Outlook Express, ... Java, Javascript, ActiveX and all the other script runner toys Billy ... Install WebWasher the spammers are terrified of free from ...
    (comp.security.firewalls)
  • Re: Microsoft Warns of New Windows Flaw (March 19, 2003 )
    ... In WINDOWS SETUP in ADD/REMOVE PROGRAMS of Control Panel ... Uninstall Outlook Express, ... Java, Javascript, ActiveX and all the other script runner toys Billy ... Install WebWasher the spammers are terrified of free from ...
    (comp.security.misc)
  • Re: Remote office logon script - Long Delay
    ... Windows IP Configuration ... If I point the User's profile to a script that doesn't contain the ... I do not have WINS configured for the remote site, ... This remote server was built using connect computer script, ...
    (microsoft.public.windows.server.sbs)
  • Re: Remote office logon script - Long Delay
    ... Windows IP Configuration ... If I point the User's profile to a script that doesn't contain the ... I do not have WINS configured for the remote site, ... This remote server was built using connect computer script, ...
    (microsoft.public.windows.server.sbs)
  • Re: Retrieve installation path of a software using VBScript
    ... Your script is fine, ... I think the Windows Installer (MSI) system has got ... Planning to build on this script once it succeeds at the uninstall. ...
    (microsoft.public.scripting.vbscript)