How to tell .vbs Script on look for IP Address in a .txt file



Hi there,

I am actually trying to remove WinZip for all the users in my domain
remotely. There is an excellent script on
http://www.enterpriseitplanet.com/resources/scripts_sms/article.php/3084091which
will remove winzip silently.

Is there any way where we can tell the script to read IP_Address.txt
file which includes all the IP Addresses in my domain and remove them
accordingly.

I am sure this is possible. Please advice.

Script: (Watch for Word Wrap)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
' Uninstall WinZip
'
' This script uninstalls WinZip 8.0 cleanly with no user prompting
'
' Steve Shockley, 08Nov2001

On Error Resume Next
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")

main()


sub main()

'Let's find out where WinZip is installed

WZPath=regget("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\winzip32.exe\")

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run WZPath & " /uninstallx",0,TRUE

FullWZPath = replace(WZPath, "PROGRA~1", "Program Files")

DeleteAFolder(left(FullWZPath,(len(FullWZPath)-13)))

end sub


function regget(value)
on error resume next
Set regedit = CreateObject("WScript.Shell")
regget=regedit.RegRead(value)
end function

function DeleteAFolder(filespec)
Dim fso
on error resume next
Set fso = CreateObject("Scripting.FileSystemObject")
fso.DeleteFolder(filespec)
end function
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Thanks,
Athif - MVP

.



Relevant Pages

  • Re: How to tell .vbs Script on look for IP Address in a .txt file
    ... My concern is the script should read the IP Addresses ... addresses from the list and then un-install winzip accordingly. ... Dim fso ... Set fso = CreateObject ...
    (microsoft.public.scripting.vbscript)
  • Re: RegWrite fails
    ... I am logged on as Administrator with Full Control ... >>in order to defeat Explorer ZIP file processing by Windows XP. ... Two already have WinZip ... script line be sure that ZIP files are associated with WinZip 9. ...
    (microsoft.public.scripting.vbscript)
  • Re: Installing software through start up script
    ... 'Upgrade any previous verison of winzip to winzip32.exe version 18.0.6028.0 ... Set objFSO = CreateObject ... This works best if you run it in a startup script because if you wait until ... delete the winzip folder. ...
    (microsoft.public.scripting.vbscript)
  • Re: Create ZIP File From Script
    ... I think ill just stick with WinZip. ... You can register ... For immediate online delivery, ... > sends the key to the original command window I started the script from. ...
    (microsoft.public.scripting.vbscript)
  • Re: WinZip script hangs with too much data
    ... > winzip call, winzip makes a temporary file, and then it hangs. ... > cancel the script the error turns up as a missing file when the script ... the operation terminates with error level 250. ...
    (microsoft.public.scripting.wsh)

Loading