#66116 - 2002-06-05 12:22 AM
Removing Webshots!?
|
dbeiser
Fresh Scripter
Registered: 2001-03-22
Posts: 34
Loc: Melbourne, FL, USA
|
Found a couple examples of scripts uninstalling webshots but they don't take into account that the webshots uninstall program prompts for a YES/NO confirmation.
I've tried the following, but the sendkeys doesn't happen until the prior command finishes, hence the yes/no never gets answered.
$HKLMSMWCV = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion" $remove=readvalue("$HKLMSMWCV\Uninstall\Webshots","UninstallString") shell("$remove") sendkeys("{enter}")
I need a silent uninstall of webshots.
Thanks in advance
_________________________
Dave
Melbourne, FL
|
|
Top
|
|
|
|
#66118 - 2002-06-05 12:57 AM
Re: Removing Webshots!?
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
download scriptit from microsoft... or Autoit from hiddensoft??
|
|
Top
|
|
|
|
#66121 - 2002-06-05 04:34 AM
Re: Removing Webshots!?
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Don't know if there is a silent uninstaller for this. Tried /? -h /?? etc. to no avail.
The key you are looing for is: quote:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Webshots
%windir%\WebshotsUninstall.exe
HTH,
- Kent
|
|
Top
|
|
|
|
#66123 - 2002-06-05 05:59 AM
Re: Removing Webshots!?
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
No deal... When I decided to eliminate it from my network, I tried everything, including calling/emailing webshots corp.
No silent uninstall, the only real solution is scriptit or autoit (or the manual del the reg keys, dirs, menu items, etc... )
|
|
Top
|
|
|
|
#66125 - 2002-06-05 01:19 PM
Re: Removing Webshots!?
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
What I haven't tried, is (on nt 2k) is to detect it's presence, and then use cacls to remove all permissions to the folder but for MIS groups.
It might be installed, but it certainly will not run.
|
|
Top
|
|
|
|
#66126 - 2002-06-05 01:21 PM
Re: Removing Webshots!?
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
notice gator in there... That is the number 1 reason I had permission to BAN it from my network.
NO spyware (except for ours...)
|
|
Top
|
|
|
|
#66128 - 2002-06-05 03:59 PM
Re: Removing Webshots!?
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
it has a startup feature to scan and remove... Just like Antivirus... As well as automated updates.
Another winner for the admin toolbox.
|
|
Top
|
|
|
|
#66129 - 2002-06-05 04:15 PM
Re: Removing Webshots!?
|
dbeiser
Fresh Scripter
Registered: 2001-03-22
Posts: 34
Loc: Melbourne, FL, USA
|
I'm currently running Kix32 version 3.63 in production, but plan on switching to the current version of 4 soon.
I need to come up with a way to uninstall webshots from both Win2K and Win NT workstations.
It appears I'm going to have to investigate the scriptit or autoit route.
Thanks, [ 05 June 2002, 16:16: Message edited by: dbeiser ]
_________________________
Dave
Melbourne, FL
|
|
Top
|
|
|
|
#66130 - 2002-06-06 12:01 AM
Re: Removing Webshots!?
|
dbeiser
Fresh Scripter
Registered: 2001-03-22
Posts: 34
Loc: Melbourne, FL, USA
|
Webshots ought to be SHOT!
The only way to get it to fully uninstall is to run their webshotsuninstall.exe program and it doesn't have any commandline options.
I downloaded autoit and wrote the following test scripts to uninstall webshots and it works, but when I try to call autoit from a kixtart script it hangs. Autoit shows up in the icon tray but never runs the script.
autoit script:
Send, c:\\winnt\\Webshotsuninstall.exe Send, {ENTER} WinWaitActive, Webshots Uninstaller, Are you SURE Send, !y WinWaitActive, The Webshots Desktop!, Would you please Send, !n
Kixtart script calling it:
$dest="c:\temp" cd $dest shell "%COMSPEC% /C autoit.exe webshots.aut" rd "c:\program files\webshots"
Thanks in advance,
Dave
_________________________
Dave
Melbourne, FL
|
|
Top
|
|
|
|
#66131 - 2002-06-06 01:58 AM
Re: Removing Webshots!?
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11629
Loc: CA
|
Well Dave, The Docs in the house and was feeling sorry for you so I wrote this script for you.
Then you go and post you're running KiXtart v3.63
Sorry, but I wrote this code to work with v4.02
Don't despair too much though, as it can easily be converted to work with v3.63
The KEYEXIST can be modified to EXISTKEY and the variable $xa=LEFT will need to be modified to find only the first 3 characters of the installed drive letter. i.e. C:\ or D:\ or E:\ etc...
WARNING!! The Surgeon General has determined that Schnapps Shots are better then WebShots so take a shot of Schnapps and then start working on this perscription of code.
NOTE: Don't forget to get the PrcView program and modify the code to copy somewhere on your local machines where users have the right to write.
code:
;** RemoveWebShots.kix ;** v1.0 Only tested on Windows 2000 ;** NOTE: Wallpaper and Screensaver are not reset on Win9x ;** You need to edit WIN.INI and SYSTEM.INI files to alter those settings on Win9x and this script does not do that. ;** This script works with KiXtart v4.02 and removes the WebShots program ;** Written By NTDOC 06/05/2002 ;** Webshots Home Page: http://www.webshots.com ;** Script requires PrcView and KiXtart v4.02 ;** PrcView is a process viewer utility that displays detailed information about processes running under Windows ;** Location to get a copy of PrcView is: http://www.xmlsp.com/pview/prcview.htm ;** Modify code so that PV.EXE and PSAPI.DLL is copied from your server to the local Workstation. ;** PSAPI.DLL is only needed for Windows NT/2000 systems, not for Windows 9x systems.
BREAK ON ;rem out this line to prevent user from terminating the script. $ProgramFiles=READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir") IF EXIST("$ProgramFiles\Webshots\WebshotsTray.exe") $WebShotActive=1 GOSUB "STOPSHOT" GOSUB "REMOVE" RETURN ENDIF RETURN
:STOPSHOT
$StartMenu=READVALUE("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Start Menu") $StartUpFolder=READVALUE("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Startup") $DeskTop=READVALUE("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Desktop") $CurrentSaver=READVALUE("HKEY_CURRENT_USER\Control Panel\Desktop", "SCRNSAVE.EXE") $CurrentWallpaper=READVALUE("HKEY_CURRENT_USER\Control Panel\Desktop", "Wallpaper") $StartValue="HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" $CurrentWebPage=READVALUE("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page") $DefaultWebPage="http://www.google.com" ; URL you want the user's home page set to after the removal" $WebShotFullURL="http://www.webshots.com/r/internal/start/client/RAND" $WebShotPage="http://www.webshots.com" $EndWebShots = '%windir%\pv.exe -k -f WebshotsTray.exe' $xa=LEFT($ProgramFiles, 3) $xb= $xa +"PROGRA~1\Webshots\Swebexec.exe" IF @INWIN=1 $SSName="%windir%\system32\ssmyst.scr" $BitMap="%windir%\Soap Bubbles.bmp" $NewSaver=WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Desktop", "SCRNSAVE.EXE", "$SSName", "REG_SZ") $DefaultWallpaper=WRITEVALUE("HKEY_CURRENT_USER\Control Panel\Desktop", "Wallpaper", "$BitMap", "REG_SZ") ENDIF IF INSTR(READVALUE($StartValue,"Start Page"),$WebShotPage) $x=WRITEVALUE($StartValue,"Start Page", "$DefaultWebPage", "REG_SZ") ENDIF
SELECT CASE @INWIN=2 IF (EXIST("%WINDIR%\PV.EXE") = 0) COPY "C:\PVIEW\PV.EXE" %WINDIR% ENDIF IF $WebShotActive SHELL $EndWebShots ENDIF CASE @INWIN=1 IF INGROUP("\\@WKSTA\Administrators")<>0 ; Verifies user is an Administrator on the system IF (EXIST("%WINDIR%\PV.EXE") = 0) COPY "C:\PVIEW\PV.EXE" %WINDIR% IF (EXIST("%WINDIR%\PSAPI.DLL")= 0) COPY "C:\PVIEW\PSAPI.DLL" %WINDIR% ENDIF ENDIF IF $WebShotActive SHELL $EndWebShots ENDIF ELSE ; abort out, user is not a local admin. Can't remove with this account. Add code to log if you want to. RETURN ENDIF ENDSELECT RETURN
:REMOVE $x=DELTREE("HKEY_CURRENT_USER\Software\Webshots") $x=DELTREE("HKEY_CLASSES_ROOT\.wbc") $x=DELTREE("HKEY_CLASSES_ROOT\.wbp") $x=DELTREE("HKEY_CLASSES_ROOT\.wbz") $x=DELTREE("HKEY_CLASSES_ROOT\wbc_auto_file") $x=DELTREE("HKEY_CLASSES_ROOT\Webshots.Collection") $x=DELTREE("HKEY_CLASSES_ROOT\Webshots.Extension") $x=DELTREE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Webshots") $x=DELVALUE("HKEY_CURRENT_USER\Software\Netscape\Netscape Navigator\User Trusted External Applications", "$xb") $x=DELVALUE("HKEY_CURRENT_USER\Software\Netscape\Netscape Navigator\Viewers", "application/x-webshots")
IF @INWIN=1 $RemoveFiles='%comspec% /c RD /S /Q "$ProgramFiles\Webshots"' $RemoveTemp='%comspec% /c RD /S /Q "%temp%\WebshotsTemp"' $RemoveWSMenu='%comspec% /c RD /S /Q "$StartMenu\Programs\Webshots Desktop!"' ELSE $RemoveFiles='%comspec% /c %WINDIR%\COMMAND\DELTREE /Y "$ProgramFiles\Webshots" ' $RemoveTemp='%comspec% /c %WINDIR%\COMMAND\DELTREE /Y "%temp%\WebshotsTemp" ' $RemoveWSMenu='%comspec% /c %WINDIR%\COMMAND\DELTREE /Y "$StartMenu\Programs\Webshots Desktop!" ' ENDIF SHELL "$RemoveFiles >nul 2>nul" SHELL "$RemoveTemp >nul 2>nul" SHELL "$RemoveWSMenu >nul 2>nul" DEL "$Desktop\Webshots Desktop!.lnk" DEL "$StartUpFolder\Webshots.lnk" DEL "%WINDIR%\WEBSHOT*.BMP" DEL "%WINDIR%\Webshots.scr" DEL "%WINDIR%\Webshots.ini" DEL "%WINDIR%\WebshotsForAdministrator.bmp" DEL "%WINDIR%\WebshotsUninstall.exe" RETURN
|
|
Top
|
|
|
|
#66134 - 2002-06-06 02:16 AM
Re: Removing Webshots!?
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11629
Loc: CA
|
Gee - Thanks guys. You're making me blush
|
|
Top
|
|
|
|
#66135 - 2002-06-06 02:20 AM
Re: Removing Webshots!?
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I think that script deserved a vote and acted accordingly.
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(Allen)
and 483 anonymous users online.
|
|
|