Elsinore

User Forum

www.screenconnect.com
Welcome Guest Search | Active Topics | Log In | Register

Tag as favorite
Unattended install in dropdown menu & desktop shortcut for attended
code9
#1 Posted : Tuesday, October 11, 2011 9:10:36 AM
Rank: Newbie
Joined: 10/11/2011
Posts: 6
Location: Perth, Australia
Apologies if these have been asked for before. I did scan through a couple of pages and performed searches.


1. Is it possible to have a drop-down (when already in a standard support session) menu item that installs the unattended client (perhaps promoting for the computer name / description first)?

2. Can the clink-once installer that get's initaed by the user automatically add a desktop shortcut that with a link it in pointing toour screenconnect server rather than having to go to a website. use email requets etc? So the next time they need support they just double-click and presto!


Cheers,
Darryl
CODE9 IT
bigdessert
#2 Posted : Tuesday, October 11, 2011 1:48:05 PM
Rank: Advanced Member
Joined: 9/14/2010
Posts: 460
Location: Minnesota
for # 2 I would just create a vbscript and put it in the toolbox to run it. This will create a shortcut on the desktop with the hotkey of ctrl+alt+x.

I find it very easy when a client calls to just tell them to hit ctrl+alt+x on their keyboard.

Code:
Set WshShell = CreateObject("WScript.Shell")
strDesktopPath = WshShell.SpecialFolders("Desktop")
Set objShortcutUrl = WshShell.CreateShortcut(strDesktopPath & "\Screenconnect.lnk")
objShortcutUrl.TargetPath = "http://www.screenconnect.com"
objShortcutUrl.HotKey = "CTRL+ALT+X"
objShortcutUrl.Save
haastility
#3 Posted : Wednesday, October 12, 2011 2:59:45 PM
Rank: Member
Joined: 8/25/2011
Posts: 18
Location: Rochester, NY
You can make it have an icon too, add this line above 'objShortcutUrl.Save':

Code:
objShortcutUrl.IconLocation = "http://www.screenconnect.com/favicon.ico"
promptcare
#4 Posted : Thursday, October 13, 2011 6:49:59 AM
Rank: Advanced Member
Joined: 9/15/2011
Posts: 78
Location: ON, Canada
Would it work to just have the Unattended installer in the Toolbox?
code9
#5 Posted : Tuesday, October 18, 2011 2:44:03 AM
Rank: Newbie
Joined: 10/11/2011
Posts: 6
Location: Perth, Australia
Hi all

Thanks for the replies. I will give the first 2 suggestions a shot.

Re: putting the unattended installer into the toolbox as far as I understand you define the naming method (e.g. %computername%) and that is stored in the installer. I'd like the installer to prompt for this info when running the msi file rather than prior to generating it. Not sure if this is possible?


Cheers,
Darryl
bigdessert
#6 Posted : Tuesday, October 18, 2011 2:34:38 PM
Rank: Advanced Member
Joined: 9/14/2010
Posts: 460
Location: Minnesota
for now you could install the %computername% method and use my quick vbscript to rename the session.


Code:
strComputer = "."  'could be any computer, not just the local one '
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colServiceList = objWMIService.ExecQuery _
("Select * from Win32_Service where Name LIKE '%ScreenConnect Guest Service%'")
dim temp
dim OriginalImagePath
For Each objService in colServiceList
temp = objService.DisplayName
next

const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")

strKeyPath = "SYSTEM\CurrentControlSet\services\" & temp
strValueName = "ImagePath"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
OriginalImagePath = strValue
'Wscript.Echo OriginalImagePath

if Right(OriginalImagePath,1) = """" then
OriginalImagePath = left(OriginalImagePath, len(OriginalImagePath) - 1)
end if

Function URLEncode(ByVal str)
Dim strTemp, strChar
Dim intPos, intASCII
strTemp = ""
strChar = ""
For intPos = 1 To Len(str)
  intASCII = Asc(Mid(str, intPos, 1))
  If intASCII = 32 Then
   strTemp = strTemp & "+"
  ElseIf ((intASCII < 123) And (intASCII > 96)) Then
   strTemp = strTemp & Chr(intASCII)
  ElseIf ((intASCII < 91) And (intASCII > 64)) Then
   strTemp = strTemp & Chr(intASCII)
  ElseIf ((intASCII < 58) And (intASCII > 47)) Then
   strTemp = strTemp & Chr(intASCII)
  Else
   strChar = Trim(Hex(intASCII))
   If intASCII < 16 Then
    strTemp = strTemp & "%0" & strChar
   Else
    strTemp = strTemp & "%" & strChar
   End If
  End If
Next
URLEncode = strTemp
End Function

Function URLDecode(ByVal What)
'URL decode Function
'2001 Antonin Foller, PSTRUH Software, http://www.motobit.com
  Dim Pos, pPos

  'replace + To Space
  What = Replace(What, "+", " ")

  on error resume Next
  Dim Stream: Set Stream = CreateObject("ADODB.Stream")
  If err = 0 Then 'URLDecode using ADODB.Stream, If possible
    on error goto 0
    Stream.Type = 2 'String
    Stream.Open

    'replace all %XX To character
    Pos = InStr(1, What, "%")
    pPos = 1
    Do While Pos > 0
      Stream.WriteText Mid(What, pPos, Pos - pPos) + _
        Chr(CLng("&H" & Mid(What, Pos + 1, 2)))
      pPos = Pos + 3
      Pos = InStr(pPos, What, "%")
    Loop
    Stream.WriteText Mid(What, pPos)

    'Read the text stream
    Stream.Position = 0
    URLDecode = Stream.ReadText

    'Free resources
    Stream.Close
  Else 'URL decode using string concentation
    on error goto 0
    'UfUf, this is a little slow method.
    'Do Not use it For data length over 100k
    Pos = InStr(1, What, "%")
    Do While Pos>0
      What = Left(What, Pos-1) + _
        Chr(Clng("&H" & Mid(What, Pos+1, 2))) + _
        Mid(What, Pos+3)
      Pos = InStr(Pos+1, What, "%")
    Loop
    URLDecode = What
  End If
End Function

Dim MyArray, Msg
MyArray = Split(OriginalImagePath, "t=", -1, 1)
test = URLDecode(MyArray(1))

Dim Input
Input = InputBox("Enter new screenconnect computer name", ,test)
If Input = "" Then
Wscript.Echo "You entered nothing in the input box...quitting now"
wscript.quit
else
Input2 = URLEncode(Input)

newpathname = MyArray(0) & "t=" & Input2 & """"
'Wscript.Echo newpathname

strKeyPath = "SYSTEM\CurrentControlSet\services\" & temp
strValueName = "ImagePath"
strValue = newpathname
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue

For Each objService in colServiceList
objService.StopService()
WSCript.Sleep 15000
objService.StartService()
next
end if



Users browsing this topic
Guest
Tag as favorite
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.