ScreenConnect Remote Support Software

User Forum

www.screenconnect.com
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Guest  
#1 Posted : Thursday, March 31, 2011 8:57:12 AM(UTC)
Guest

Rank: Guest

Joined: 4/9/2010(UTC)
Posts: 328

Was thanked: 2 time(s) in 2 post(s)
What is the proper way to uninstall the unattended session clients?
bigdessert  
#2 Posted : Thursday, March 31, 2011 9:07:34 AM(UTC)
bigdessert

Rank: Advanced Member

Joined: 9/13/2010(UTC)
Posts: 664
Location: Minnesota

Thanks: 1 times
Was thanked: 29 time(s) in 26 post(s)
from add/remove programs in xp or programs and features in windows 7.
Guest  
#3 Posted : Thursday, March 31, 2011 9:10:07 AM(UTC)
Guest

Rank: Guest

Joined: 4/9/2010(UTC)
Posts: 328

Was thanked: 2 time(s) in 2 post(s)
Thanks. Now that leads to another question. Is there a way to remove it and not get disconnected?

I just ran A/R Programs and uninstalled it, but now I am disconnected and the customer is likely looking and his control panel window, his A/R Programs window, and some kind of a prompt indicating the product was successfully uninstalled.
bigdessert  
#4 Posted : Thursday, March 31, 2011 10:59:00 AM(UTC)
bigdessert

Rank: Advanced Member

Joined: 9/13/2010(UTC)
Posts: 664
Location: Minnesota

Thanks: 1 times
Was thanked: 29 time(s) in 26 post(s)
This would be the only way:

1. create normal session
2. connect unattended and join that computer to normal session(it can be connected to both just fine)
3. disconnect from the unattended session and connect to the normal session.
3. uninstall unattended client.
4. close the normal session.

at this point the only thing the customer will then see is an ok box stating the session has now ended.
Guest  
#5 Posted : Sunday, September 11, 2011 12:19:41 AM(UTC)
Guest

Rank: Guest

Joined: 4/9/2010(UTC)
Posts: 328

Was thanked: 2 time(s) in 2 post(s)
I was seroisuly at DefCon 5 until I saw this post.
teksigns  
#6 Posted : Wednesday, September 21, 2011 12:34:06 PM(UTC)
teksigns

Rank: Advanced Member

Joined: 6/20/2011(UTC)
Posts: 278
Location: NC

Thanks: 6 times
Was thanked: 4 time(s) in 4 post(s)
I have created a small utility for removing unattended installs without leaving
anything open on the client side ...

it works for me ...

just place in toolbox and execute when connected to an unattended client .
after a few secs your connection will break and the client will be uninstalled...

i created it using Autoit ..

Attached is the EXE to place in your toolbox.....


New Version Auto Searches Registry

Should be Fixed :

Download the EXE HERE
remove-unattended.exe


Code:
Func _RegSearch($sStartKey, $sSearchVal, $iType = 0x07, $fArray = False)
Local $v, $sVal, $k, $sKey, $sFound = "", $sFoundSub = "", $avFound[1] = [0]

; Trim trailing backslash, if present
If StringRight($sStartKey, 1) = "\" Then $sStartKey = StringTrimRight($sStartKey, 1)

; Generate type flags
If Not BitAND($iType, 0x07) Then Return SetError(1, 0, 0); No returns selected
Local $fKeys = BitAND($iType, 0x1), $fValue = BitAND($iType, 0x2), $fData = BitAND($iType, 0x4), $fRegExp = BitAND($iType, 0x8)

; Check for wildcard
If (Not $fRegExp) And ($sSearchVal == "*") Then
; Use RegExp pattern "." to match anything
$iType += 0x8
$fRegExp = 0x8
$sSearchVal = "."
EndIf

; This checks values and data in the current key
If ($fValue Or $fData) Then
$v = 1
While 1
$sVal = RegEnumVal($sStartKey, $v)
If @error = 0 Then
; Valid value - test its name
If $fValue Then
If $fRegExp Then
If StringRegExp($sVal, $sSearchVal, 0) Then $sFound &= $sStartKey & "\" & $sVal & @LF
Else
If StringInStr($sVal, $sSearchVal) Then $sFound &= $sStartKey & "\" & $sVal & @LF
EndIf
EndIf

; test its data
If $fData Then
$readval = RegRead($sStartKey, $sVal)
If $fRegExp Then
If StringRegExp($readval, $sSearchVal, 0) Then $sFound &= $sStartKey & "\" & $sVal & " = " & $readval & @LF
Else
If StringInStr($readval, $sSearchVal) Then $sFound &= $sStartKey & "\" & $sVal & " = " & $readval & @LF
EndIf
EndIf
$v += 1
Else
; No more values here
ExitLoop
EndIf
WEnd
EndIf

; This loop checks subkeys
$k = 1
While 1
$sKey = RegEnumKey($sStartKey, $k)
If @error = 0 Then
; Valid key - test it's name
If $fKeys Then
If $fRegExp Then
If StringRegExp($sKey, $sSearchVal, 0) Then $sFound &= $sStartKey & "\" & $sKey & "\" & @LF
Else
If StringInStr($sKey, $sSearchVal) Then $sFound &= $sStartKey & "\" & $sKey & "\" & @LF
EndIf
EndIf

; Now search it
$sFoundSub = _RegSearch($sStartKey & "\" & $sKey, $sSearchVal, $iType, False) ; use string mode to test sub keys
If $sFoundSub <> "" Then $sFound &= $sFoundSub & @LF
Else
; No more keys here
ExitLoop
EndIf
$k += 1
WEnd

; Return results
If StringRight($sFound, 1) = @LF Then $sFound = StringTrimRight($sFound, 1)
If $fArray Then
If StringStripWS($sFound, 8) <> "" Then $avFound = StringSplit($sFound, @LF)
Return $avFound
Else
Return $sFound
EndIf
EndFunc ;==>_RegSearch

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


$SearchKey = "HKLM\SOFTWARE\Classes\Installer\Products"

$SearchString = "ScreenConnect Guest Service" ; find
$Results = _RegSearch($SearchKey, $SearchString, 4, 1)


$location = StringSplit ( $Results[1], "\,\" )

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


$start = MsgBox(4, 'Uninstall ?', 'Remove Remote Client Software?')

If $start = 6 Then

$var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\" & $location[6], "ProductIcon")
If @error = 1 Then
    MsgBox(0, 'Not Installed', 'ScreenConnect Client Not Installed')
    Exit
EndIf

$ID = StringSplit ( $var, "{,}" )
ShellExecute("MsiExec.exe", "/qn /x {" & $ID[2] & "} REBOOT=REALLYSUPRESS")

SplashTextOn("Please Wait", "Starting Removal Process......", 450, 70, -1, -1, 4, "", 24)
Sleep(10000)
SplashOff()

Else
    
    Exit
    EndIf




hope you enjoy ...feel free to improve

Edited by user Thursday, September 22, 2011 12:04:18 AM(UTC)  | Reason: Not specified

bigdessert  
#7 Posted : Wednesday, September 21, 2011 6:52:50 PM(UTC)
bigdessert

Rank: Advanced Member

Joined: 9/13/2010(UTC)
Posts: 664
Location: Minnesota

Thanks: 1 times
Was thanked: 29 time(s) in 26 post(s)
Quote:
FFA6E6D4A6B9BB345A4D7757F9A1734E


This path is different with my install.....

version 2.3.1918

windows 7 x64.....there might be a way to dynamically get the path....

Edited by user Wednesday, September 21, 2011 6:53:40 PM(UTC)  | Reason: Not specified

bigdessert  
#8 Posted : Wednesday, September 21, 2011 7:22:58 PM(UTC)
bigdessert

Rank: Advanced Member

Joined: 9/13/2010(UTC)
Posts: 664
Location: Minnesota

Thanks: 1 times
Was thanked: 29 time(s) in 26 post(s)
Here is my take on it in vbscript. You can specify the software by name which installs as the name listed. This should also work on any software package you have that is installed by msi all you have to do is know all or part of the name. The only thing you need to change is the appname. I also set it up to work on 32 or 64bit operating systems.

Code:
On Error Resume Next

'**********************************************************************
const AppName = "ScreenConnect Guest Service"
'**********************************************************************

const HKEY_LOCAL_MACHINE = &H80000002

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

'First, find the GUID
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"&_
strComputer & "\root\default:StdRegProv")
'*******************************RUN 32BIT******************************
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

For Each subkey In arrSubKeys
InstalledAppName = ""
InstalledAppName = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName")

If InStr(InstalledAppName, AppName) > 0 then
    RawGUID = ""
    GUID = ""
RawGUID = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\UninstallString")
GUID = Mid(RawGUID, instr(RawGUID, "{"), 38)
    If GUID<>"" then
     ' Found matching GUID, removing...
          WshShell.Run "msiexec /qn /x " & GUID & " REBOOT=REALLYSUPRESS"
                CreateObject("WScript.Shell").Popup "Software Removal Complete", 10, "Removal Complete"
     Exit For
    End If
End If
Next
'*******************************RUN 64BIT******************************
strKeyPath = "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

For Each subkey In arrSubKeys
InstalledAppName = ""
InstalledAppName = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName")

If InStr(InstalledAppName, AppName) > 0 then
    RawGUID = ""
    GUID = ""
RawGUID = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\UninstallString")
GUID = Mid(RawGUID, instr(RawGUID, "{"), 38)
    If GUID<>"" then
     ' Found matching GUID, removing...
          WshShell.Run "msiexec /qn /x " & GUID & " REBOOT=REALLYSUPRESS"
                CreateObject("WScript.Shell").Popup "Software Removal Complete", 10, "Removal Complete"
     Exit For
    End If
End If
Next
teksigns  
#9 Posted : Wednesday, September 21, 2011 11:12:20 PM(UTC)
teksigns

Rank: Advanced Member

Joined: 6/20/2011(UTC)
Posts: 278
Location: NC

Thanks: 6 times
Was thanked: 4 time(s) in 4 post(s)
AUTOIT SCRIPT

New Version Auto Searches Registry

Should be Fixed :


Download the EXE HERE
remove-unattended.exe


Code:
Func _RegSearch($sStartKey, $sSearchVal, $iType = 0x07, $fArray = False)
Local $v, $sVal, $k, $sKey, $sFound = "", $sFoundSub = "", $avFound[1] = [0]

; Trim trailing backslash, if present
If StringRight($sStartKey, 1) = "\" Then $sStartKey = StringTrimRight($sStartKey, 1)

; Generate type flags
If Not BitAND($iType, 0x07) Then Return SetError(1, 0, 0); No returns selected
Local $fKeys = BitAND($iType, 0x1), $fValue = BitAND($iType, 0x2), $fData = BitAND($iType, 0x4), $fRegExp = BitAND($iType, 0x8)

; Check for wildcard
If (Not $fRegExp) And ($sSearchVal == "*") Then
; Use RegExp pattern "." to match anything
$iType += 0x8
$fRegExp = 0x8
$sSearchVal = "."
EndIf

; This checks values and data in the current key
If ($fValue Or $fData) Then
$v = 1
While 1
$sVal = RegEnumVal($sStartKey, $v)
If @error = 0 Then
; Valid value - test its name
If $fValue Then
If $fRegExp Then
If StringRegExp($sVal, $sSearchVal, 0) Then $sFound &= $sStartKey & "\" & $sVal & @LF
Else
If StringInStr($sVal, $sSearchVal) Then $sFound &= $sStartKey & "\" & $sVal & @LF
EndIf
EndIf

; test its data
If $fData Then
$readval = RegRead($sStartKey, $sVal)
If $fRegExp Then
If StringRegExp($readval, $sSearchVal, 0) Then $sFound &= $sStartKey & "\" & $sVal & " = " & $readval & @LF
Else
If StringInStr($readval, $sSearchVal) Then $sFound &= $sStartKey & "\" & $sVal & " = " & $readval & @LF
EndIf
EndIf
$v += 1
Else
; No more values here
ExitLoop
EndIf
WEnd
EndIf

; This loop checks subkeys
$k = 1
While 1
$sKey = RegEnumKey($sStartKey, $k)
If @error = 0 Then
; Valid key - test it's name
If $fKeys Then
If $fRegExp Then
If StringRegExp($sKey, $sSearchVal, 0) Then $sFound &= $sStartKey & "\" & $sKey & "\" & @LF
Else
If StringInStr($sKey, $sSearchVal) Then $sFound &= $sStartKey & "\" & $sKey & "\" & @LF
EndIf
EndIf

; Now search it
$sFoundSub = _RegSearch($sStartKey & "\" & $sKey, $sSearchVal, $iType, False) ; use string mode to test sub keys
If $sFoundSub <> "" Then $sFound &= $sFoundSub & @LF
Else
; No more keys here
ExitLoop
EndIf
$k += 1
WEnd

; Return results
If StringRight($sFound, 1) = @LF Then $sFound = StringTrimRight($sFound, 1)
If $fArray Then
If StringStripWS($sFound, 8) <> "" Then $avFound = StringSplit($sFound, @LF)
Return $avFound
Else
Return $sFound
EndIf
EndFunc ;==>_RegSearch

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


$SearchKey = "HKLM\SOFTWARE\Classes\Installer\Products"

$SearchString = "ScreenConnect Guest Service" ; find
$Results = _RegSearch($SearchKey, $SearchString, 4, 1)


$location = StringSplit ( $Results[1], "\,\" )

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


$start = MsgBox(4, 'Uninstall ?', 'Remove Remote Client Software?')

If $start = 6 Then

$var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\" & $location[6], "ProductIcon")
If @error = 1 Then
    MsgBox(0, 'Not Installed', 'ScreenConnect Client Not Installed')
    Exit
EndIf

$ID = StringSplit ( $var, "{,}" )
ShellExecute("MsiExec.exe", "/qn /x {" & $ID[2] & "} REBOOT=REALLYSUPRESS")

SplashTextOn("Please Wait", "Starting Removal Process......", 450, 70, -1, -1, 4, "", 24)
Sleep(10000)
SplashOff()

Else
    
    Exit
    EndIf



Edited by user Thursday, September 22, 2011 12:02:47 AM(UTC)  | Reason: Not specified

bigdessert  
#10 Posted : Thursday, September 22, 2011 12:01:33 AM(UTC)
bigdessert

Rank: Advanced Member

Joined: 9/13/2010(UTC)
Posts: 664
Location: Minnesota

Thanks: 1 times
Was thanked: 29 time(s) in 26 post(s)
Just save it as .VBS extension and it will run on windows just like the autoit script.
teksigns  
#11 Posted : Thursday, September 22, 2011 12:06:43 AM(UTC)
teksigns

Rank: Advanced Member

Joined: 6/20/2011(UTC)
Posts: 278
Location: NC

Thanks: 6 times
Was thanked: 4 time(s) in 4 post(s)
bigdessert just uploaded a different version .. try it and let me know if it works with your version ..

thank you
bigdessert  
#12 Posted : Thursday, September 22, 2011 9:18:43 AM(UTC)
bigdessert

Rank: Advanced Member

Joined: 9/13/2010(UTC)
Posts: 664
Location: Minnesota

Thanks: 1 times
Was thanked: 29 time(s) in 26 post(s)
yes that worked now.

IMO the advantage of the vbs over autoit is:

1. Sometimes AutoIT gets flagged as virus on systems.
2. vbs is 3kb vs 250kb for AutoIT.

all things aside sweet work!!!

Edited by user Thursday, September 22, 2011 9:21:00 AM(UTC)  | Reason: Not specified

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.