Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Access removal

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,52840
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Access removal
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Access removal - 10/19/2007 12:38:34 AM   
  mkcheche

 

Posts: 10
Score: 0
Joined: 5/23/2007
Status: offline
Trying to remove acces 97...can someone help me...I suck at scripting ><

I would also like it to do it over a network if possible...I had a box before to pop up and ask for the host name, but i cant even get it work locally. Any help would be appreciated.



Set FileSysObj = CreateObject("Scripting.FileSystemObject")
Set colSoftware = objWMIService.ExecQuery _
("Select * from Win32_Product Where Name = 'Access'")
For Each objSoftware in colSoftware
 wscript.echo objSoftware.Name
 wscript.echo objSoftware.version
 objSoftware.Uninstall()
wscript.echo "Access has been removed Successfully!"
Next
 
 
Post #: 1
 
 RE: Access removal - 10/19/2007 1:45:39 AM   
  LANlazy

 

Posts: 82
Score: 0
Joined: 4/11/2007
Status: offline
On one of the computers look under HKLM/Software/Microsoft/Windows/CurrentVersion/Uninstall and see if Access 97 is listed.  You will have to go through each folder and look at Display Name.  Once you find it the look at UninstallString something like MsiExec.exe /I{0EFDF2F9-836D-4EB7-A32D-038BD3F1FB2A}.  Write a batch file with computer names in it and the uninstall string.  Will look like what is below.  Download PSTools (it helps me everyday) and use psexec.exe.

psexec -d \\computername MsiExec.exe /x{0EFDF2F9-836D-4EB7-A32D-038BD3F1FB2A} /quiet /passive /norestart

or you could use with a text document named softwaregone and list all computer names.  Replace 'Symantec Antivirus 10.0.2011.2' with the exact name of the software.

On Error Resume Next
softwaregone = wscript.arguments(0)
set onet = createobject("wscript.network")
set ofs = createobject("scripting.filesystemobject")
set oipFile = ofs.opentextfile(softwaregone, 1, false)
if (Err.Number <> 0) then
    wscript.echo "Cannot open " & ipFile
   
else
while not oipFile.atEndOfStream
    strComputer = oipFile.ReadLine()
    wscript.echo vbCrLf & "Connecting to " & strComputer & "..."
           Set objService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
           if (Err.Number <> 0) then
            wscript.echo "Failed to connect to " & strComputer & "."
On error resume next                         
 else
Set objWMIService = GetObject("winmgmts:" _
   & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _
   ("Select * from Win32_Product Where Name = 'Symantec Antivirus 10.0.2011.2'")
For Each objSoftware in colSoftware
   objSoftware.Uninstall()
Next
End If
wend
End If


(in reply to mkcheche)
 
 
Post #: 2
 
 RE: Access removal - 10/19/2007 1:47:46 AM   
  gdewrance


Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
Remember its not access but msaccess

(in reply to mkcheche)
 
 
Post #: 3
 
 RE: Access removal - 10/22/2007 12:38:02 AM   
  mkcheche

 

Posts: 10
Score: 0
Joined: 5/23/2007
Status: offline
I put the .vbs and text file in the same folder and I keep getting cannot open error. I renamed the file and it still does the same thing.

(in reply to gdewrance)
 
 
Post #: 4
 
 RE: Access removal - 10/22/2007 12:56:14 AM   
  LANlazy

 

Posts: 82
Score: 0
Joined: 4/11/2007
Status: offline
Did you name it softwaregone.txt and run it from cmd using cscript scriptname.vbs softwaregone.txt?

(in reply to mkcheche)
 
 
Post #: 5
 
 RE: Access removal - 10/22/2007 1:03:58 AM   
  mkcheche

 

Posts: 10
Score: 0
Joined: 5/23/2007
Status: offline
yep I did.

(in reply to LANlazy)
 
 
Post #: 6
 
 RE: Access removal - 10/22/2007 1:08:16 AM   
  mkcheche

 

Posts: 10
Score: 0
Joined: 5/23/2007
Status: offline
ok i think i got it....error on my part. I redid some code and thats why...Ill see if it works now...it said it was connecting to a network pc so i will see if it deletes it

(in reply to mkcheche)
 
 
Post #: 7
 
 RE: Access removal - 10/22/2007 1:12:33 AM   
  mkcheche

 

Posts: 10
Score: 0
Joined: 5/23/2007
Status: offline
Microsoft Access 97 is the display name....So I put my hostname in the txt file, it says it connects, i give it time but the software doesnt get removed

(in reply to mkcheche)
 
 
Post #: 8
 
 RE: Access removal - 10/22/2007 1:14:22 AM   
  mkcheche

 

Posts: 10
Score: 0
Joined: 5/23/2007
Status: offline
the wmiprvse.exe shows up in task manager for a few seconds with cpu utilization, but drops down to 0 then stays in memory

(in reply to mkcheche)
 
 
Post #: 9
 
 RE: Access removal - 10/22/2007 1:17:48 AM   
  LANlazy

 

Posts: 82
Score: 0
Joined: 4/11/2007
Status: offline
Download PSTools from sysinternals and run the psinfo -s on your computer and that will give you the exact name it is looking for.  If you look at the script I used for Symantec it has 2011.2 even though it shows in Add/Remove and just 2011.

(in reply to mkcheche)
 
 
Post #: 10
 
 RE: Access removal - 10/22/2007 1:25:07 AM   
  mkcheche

 

Posts: 10
Score: 0
Joined: 5/23/2007
Status: offline
yea I did and it shows Microsoft Access 97 as teh actual name...I am also on a domain

(in reply to LANlazy)
 
 
Post #: 11
 
 RE: Access removal - 10/22/2007 1:31:21 AM   
  LANlazy

 

Posts: 82
Score: 0
Joined: 4/11/2007
Status: offline
I dont have Access 97 so I really cant test the script.  I know it has worked on everything from Java to Symantec.  You may want to use the batch file with msiexec /x.  Sorry.

(in reply to mkcheche)
 
 
Post #: 12
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Access removal Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts