MikeRamalho
MIS
Good Day Everyone,
I have found out that there are about 400 PC's in my organization that have non licensed Winzip 8.1. I've created a batch file that I am looking at sending out through SMS.
The batch file goes through and removes the application from the registry and start menu but for some reason the Program Files\Winzip folder is still there.
Below is the command I am running;
' Uninstall WinZip
rem remove winzip
C:\PROGRA~1\WinZip\winzip32.exe /uninstallx /s
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
Any help would be greatly appreciated.
Thank You
I have found out that there are about 400 PC's in my organization that have non licensed Winzip 8.1. I've created a batch file that I am looking at sending out through SMS.
The batch file goes through and removes the application from the registry and start menu but for some reason the Program Files\Winzip folder is still there.
Below is the command I am running;
' Uninstall WinZip
rem remove winzip
C:\PROGRA~1\WinZip\winzip32.exe /uninstallx /s
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
Any help would be greatly appreciated.
Thank You