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

x
?
Solved

uninstall script

Posted on 2006-04-11
9
Medium Priority
?
3,645 Views
Last Modified: 2012-06-27
Hi;
This script below creates an error that says cannot find the path. The error says its about the row 15. Can someone help me about this. I need to uninstall nod32 antivirus from my network computers.


const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
 strComputer & "\root\default:StdRegProv")
 
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NOD32"
strValueName = "UninstallString"

oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strUninstallFullPath

' the following line -y switch suppresses the confirmation question from poping up
strUninstallFullPath=strUninstallFullPath & " -y"

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run strUninstallFullPath,8,true
set WshShell=nothing
0
Comment
Question by:burcayaroglu
  • 5
  • 4
9 Comments
 
LVL 34

Expert Comment

by:sramesh2k
ID: 16429602
Hi burcayaroglu,

See if enclosing the uninstall string (command-line) within double-quotes helps.

Example:

Use:
"C:\Program Files\NOD\Uninstall.exe" -y

instead of

C:\Program Files\NOD\Uninstall.exe -y

Perhaps that'll help you circumwent the LFN problems.
0
 

Author Comment

by:burcayaroglu
ID: 16442806
Thanks for your response however the uninstall string in the registry is
C:\Program Files\Eset\Setup\setup.exe /UNINSTALL and the error says it can not find the path. Is there another way of writing this script ?
0
 
LVL 34

Accepted Solution

by:
sramesh2k earned 1000 total points
ID: 16451618
See if this helps:

- - -
Set WshShell = CreateObject("Wscript.Shell")
strUninstallFullPath= Chr(34) & WshShell.ExpandEnvironmentStrings("%ProgramFiles%")
strUninstallFullPath= strUninstallFullPath & "\Eset\Setup\setup.exe" & Chr(34) & " /UNINSTALL"
WshShell.Run strUninstallFullPath,8,True
Set WshShell=nothing

- - -
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:burcayaroglu
ID: 16451723
Thats actually started the uninstall. Thank you very much. The points are yours. However I have a new problem now. Is there a way to start this uninstall in silent mode ? Its asking user confirmation.
0
 
LVL 34

Expert Comment

by:sramesh2k
ID: 16451968
>> Is there a way to start this uninstall in silent mode ?

Not that I know of. Usually the concerned application is responsible for supplying the quiet uninstall string. See if there is a QuietUninstallString value in the same registry key you checked earlier. If not, I'm sorry there is no way to do a silent uninstall.
0
 

Author Comment

by:burcayaroglu
ID: 16468717
it says /SLIENTMODE to start in silent mode. I can not figure out how write this command. I mean /UNISTALL and /SLIENTMODE together. I am a little confused
0
 
LVL 34

Expert Comment

by:sramesh2k
ID: 16469587
Try:

- - -
Set WshShell = CreateObject("Wscript.Shell")
strUninstallFullPath= Chr(34) & WshShell.ExpandEnvironmentStrings("%ProgramFiles%")
strUninstallFullPath= strUninstallFullPath & "\Eset\Setup\setup.exe" & Chr(34)
strUninstallFullPath= strUninstallFullPath & " /UNINSTALL /SILENTMODE"
WshShell.Run strUninstallFullPath,8,True
Set WshShell=nothing

- - -
0
 

Author Comment

by:burcayaroglu
ID: 16475405
Its done Thank you very much !
0
 
LVL 34

Expert Comment

by:sramesh2k
ID: 16475604
I'm glad that helped!
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

581 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