Jump to content

Remote desktop connection (without MSTSC)


Recommended Posts

I know I have seen a post from a member that is trying to use MSTSC to start a remote desktop connection with another computer. That's an easy one, but here's something a little more complicated that MSTSC.

I haven't even started to write the program only because I have NO CLUE where to even begin with this, so this is purely hypothetical.

I want to accomplish something similar to what the Windows MSTSC application can do. Here's the thing though; my company provides support for customers that don't always run Windows XP (where the MSTSC application is a native program), and copying that specific program to a machine that doesn't have it installed (such as Windows 2000) doesn't work either; it's an add-on that has to be installed from the windows website.

Does anyone have any kind of an idea about how to go about writing a program that I, as a technical support consultant, would be able to have a customer run and would allow me to remote control their computer (giving me full access to their machines; video, mouse, keyboard, etc.) that would have fast response time to the controls that I'm trying to utilize.

If you're unsure of what I'm talking about, perhaps you've heard of a company called WebEx or maybe LogMeIn? Basically I just want to have a MUCH simpler version of what they are implementing but have it be an in-house application so that it could be modified and added onto as needed.

Any takers? Any ideas?

Any guidance given would be greatly appreciated!

Thanks!

Edited by Paradox
Link to comment
Share on other sites

Look for UltraVnc SC. I use a version of it that I scripted in AutoIt to support my customers who are behind firewalls. It enables them to connect to me and allows me to take control of their computers.

Edit - I can let you have the script if you want but it was the first script I wrote and does not look good. As it works and I am lazy I have never bothered to rewrite.

Edited by BigDod


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Look for UltraVnc SC. I use a version of it that I scripted in AutoIt to support my customers who are behind firewalls. It enables them to connect to me and allows me to take control of their computers.

Edit - I can let you have the script if you want but it was the first script I wrote and does not look good. As it works and I am lazy I have never bothered to rewrite.

Ya know, if ya wanted to upload it or something so I could take a look at it, that would be great. I'm taking a look at the website for that stuff right now, but man does it look bizarre to setup. :nuke::P

Link to comment
Share on other sites

Here you go

#include <GuiConstants.au3>
#include "SysTray_UDF.au3"


Opt("GUIOnEventMode", 1)
Opt("TrayIconHide", 1)

; GUI
GuiCreate("Remote Control", 200, 300)

GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")

; PIC
GuiCtrlCreatePic("logo.bmp",10,10, 180,181,$SS_SUNKEN)

; BUTTON
$Button1=GuiCtrlCreateButton("Connect", 10, 250, 80, 30)
$Button2=GuiCtrlCreateButton("Close", 110, 250, 80, 30)

GUICtrlSetOnEvent($Button1, "ConnectButton")
GUICtrlSetOnEvent($Button2, "CloseButton")

; TEXT
GuiCtrlCreateLabel("", 5, 207, 190, 20,$SS_ETCHEDFRAME)
GuiCtrlCreateLabel("Tel :- ***** ****** before Connect", 10, 210, 190, 20)
GUICtrlSetColor(-1,0xff0000)    ; Red

GUISetState(@SW_SHOW)

; Open Windows XP SP2 Firewall
$os=@OSVersion
$ver=@OSServicePack
if $os="WIN_XP" And $ver>="Service Pack 2" Then
    Run("netsh firewall set allowedprogram winvnc.exe WinVNC ENABLE", "", @SW_HIDE)
    EndIf


; Idle around
While 1
  Sleep(100)  
WEnd

Func CLOSEClicked()
    $index = _SysTrayIconIndex("winvnc.exe"); Change this to some other application if needed
    $pos = _SysTrayIconPos($index)
    Run("winvnc.exe -kill")
      $PID = ProcessExists("winvnc.exe") ; Will return the PID or 0 if the process isn't found.
      If $PID Then ProcessClose($PID)
    MouseMove($pos[0], $pos[1], 0)
    Sleep(1000)
       Exit
 EndFunc

Func ConnectButton()
    $remote_Station = INPUTBOX("Remote Control", "Remote Control Address", "", "", -1, 120)
    Run("winvnc.exe -connect " & $remote_station)
EndFunc

Func CloseButton()
    $index = _SysTrayIconIndex("winvnc.exe"); Change this to some other application if needed
    $pos = _SysTrayIconPos($index)
    Run("winvnc.exe -kill")
      $PID = ProcessExists("winvnc.exe") ; Will return the PID or 0 if the process isn't found.
      If $PID Then ProcessClose($PID)
    MouseMove($pos[0], $pos[1], 0)
    Sleep(1000)
       Exit
EndFunc

You will also need the attached files and have to search in scripts and scraps for Systray_UDF.au3

Edit - Removed telephone no.

Edited by BigDod


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Here you go

#include <GuiConstants.au3>
#include "SysTray_UDF.au3"
Opt("GUIOnEventMode", 1)
Opt("TrayIconHide", 1)

; GUI
GuiCreate("Remote Control", 200, 300)

GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")

; PIC
GuiCtrlCreatePic("logo.bmp",10,10, 180,181,$SS_SUNKEN)

; BUTTON
$Button1=GuiCtrlCreateButton("Connect", 10, 250, 80, 30)
$Button2=GuiCtrlCreateButton("Close", 110, 250, 80, 30)

GUICtrlSetOnEvent($Button1, "ConnectButton")
GUICtrlSetOnEvent($Button2, "CloseButton")

; TEXT
GuiCtrlCreateLabel("", 5, 207, 190, 20,$SS_ETCHEDFRAME)
GuiCtrlCreateLabel("Tel :- ***** ****** before Connect", 10, 210, 190, 20)
GUICtrlSetColor(-1,0xff0000)    ; Red

GUISetState(@SW_SHOW)

; Open Windows XP SP2 Firewall
$os=@OSVersion
$ver=@OSServicePack
if $os="WIN_XP" And $ver>="Service Pack 2" Then
    Run("netsh firewall set allowedprogram winvnc.exe WinVNC ENABLE", "", @SW_HIDE)
    EndIf
; Idle around
While 1
  Sleep(100)  
WEnd

Func CLOSEClicked()
    $index = _SysTrayIconIndex("winvnc.exe"); Change this to some other application if needed
    $pos = _SysTrayIconPos($index)
    Run("winvnc.exe -kill")
      $PID = ProcessExists("winvnc.exe") ; Will return the PID or 0 if the process isn't found.
      If $PID Then ProcessClose($PID)
    MouseMove($pos[0], $pos[1], 0)
    Sleep(1000)
       Exit
 EndFunc

Func ConnectButton()
    $remote_Station = INPUTBOX("Remote Control", "Remote Control Address", "", "", -1, 120)
    Run("winvnc.exe -connect " & $remote_station)
EndFunc

Func CloseButton()
    $index = _SysTrayIconIndex("winvnc.exe"); Change this to some other application if needed
    $pos = _SysTrayIconPos($index)
    Run("winvnc.exe -kill")
      $PID = ProcessExists("winvnc.exe") ; Will return the PID or 0 if the process isn't found.
      If $PID Then ProcessClose($PID)
    MouseMove($pos[0], $pos[1], 0)
    Sleep(1000)
       Exit
EndFunc

You will also need the attached files and have to search in scripts and scraps for Systray_UDF.au3

Edit - Removed telephone no.

Well, I downloaded all of the files and what not to check it out, but I think that there is an issue with the SysTray_UDF.AU3 file. When I run your program I get this returned:

Line 74 (File "blah blah\systray_udf.au3"):
If $info[$i]=HWnd($var[$i][1]) Then
If $info[$i]=^ ERROR

Error: Unknown Function Name

Just figured I'd bring it to someones attention. :P

Oh, and thanks for the code... I'm just trying to figure out how to customize that UltravncSC for my company and then i'll see if I can figure something out with the code...

Link to comment
Share on other sites

Thanks BigDod

I can't use SYSTRAY UDF due to WIN98 :nuke:

but your script helped me with idea for way to go :P

SysTray_UDF is not really required. I only used it as a means to remove the winvnc icon from the systray after closing winvnc. I believe that Valik posted an alternative method for refreshing the systray.

Edit - Here it is.

Edited by BigDod


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

SysTray_UDF is not really required. I only used it as a means to remove the winvnc icon from the systray after closing winvnc. I believe that Valik posted an alternative method for refreshing the systray.

Edit - Here it is.

Hey BidDod... This is totally not an AutoIT question, and would probably have been better if I just emailed it to you, but I figured for the sake of the posting, whatever info you have would probably help others out in the end as well.

So I've gone through and I've created my executable for that SC UltraVNC. As far as I can tell, I set it up correctly. I'm just doing some inhouse testing with some of my coworkers, but for the life of me, I can't figure out how the hell the damn thing is supposed to work once you choose your connection type. It just minimizes to the system tray and goes through it's 5 minute connection trial...

I've installed the real UltraVNC viewer (as well as some other VNC software packages) to test it, but I've yet to be able to make an actual connection.

Is there something I'm missing on the consultant side? Some little secret or other program that's supposed to be running on my end that the customer is trying to connect to?

help me help me!! :P

Edited by Paradox
Link to comment
Share on other sites

Hey BidDod... This is totally not an AutoIT question, and would probably have been better if I just emailed it to you, but I figured for the sake of the posting, whatever info you have would probably help others out in the end as well.

So I've gone through and I've created my executable for that SC UltraVNC. As far as I can tell, I set it up correctly. I'm just doing some inhouse testing with some of my coworkers, but for the life of me, I can't figure out how the hell the damn thing is supposed to work once you choose your connection type. It just minimizes to the system tray and goes through it's 5 minute connection trial...

I've installed the real UltraVNC viewer (as well as some other VNC software packages) to test it, but I've yet to be able to make an actual connection.

Is there something I'm missing on the consultant side? Some little secret or other program that's supposed to be running on my end that the customer is trying to connect to?

help me help me!! :nuke:

**UPDATE**

Figured it out... Went to http://forum.ultravnc.info/viewtopic.php?t=4606 (check out Posts #3 and 4). Once the consultant installs UltraVNC, just run the vncviewer.exe as such: "vncviewer.exe -listen <port>" where <port> is whatever port you've specified in the helpdesk.txt file.

I am so smart!

S

M

R

T

hehehehe :P

Link to comment
Share on other sites

  • 2 months later...

;region Script Settings

;<settings><scriptpackager><process>kix32.exe</process>

;<arguments></arguments>

;<extractdir>%TEMP%</extractdir>

;<outputdir>C:\src\sc</outputdir>

;<files>C:\Program Files\iTripoli\AdminScriptEditor\interpreters\kixtart\KIX32.EXE|C:\Program Files\iTripoli\AdminScriptEditor\interpreters\kixtart\KX32.dll|C:\src\sc\sc.reg|C:\src\sc\winvnc.exe|C:\src\sc\vnchooks.dll</files>

;<usedefaulticon>True</usedefaulticon>

;<icon>D:\Downloads\icons\15_16.ico</icon>

;<showinsystray>True</showinsystray>

;<tooltip></tooltip>

;<altcreds>False</altcreds>

;<efs>True</efs>

;<ntfs>True</ntfs>

;<local>False</local>

;<username></username>

;<domain></domain>

;<abortonfail>True</abortonfail>

;<product>mda One-Click VNC</product>

;<internalname>One-Click VNC</internalname>

;<version>1.0.2.1</version>

;<versionstring></versionstring>

;<description>Contact a support tech before you use this tool</description>

;<comments></comments>

;<company>mda</company>

;</scriptpackager>

;</settings>

;

;endregion

Break ON

If %ISEXE% = "1"

$HKCU = %ASEHKCU%

$CURDIR = %ASEEXEPATH%

$SCRIPTARGS = %ASEEXEARGS%

$FullID = %ASEUSERID%

$UserID = Right($FullID,(Len($FullID) - (InStr($FullID,"\"))))

Else

$HKCU = "HKEY_CURRENT_USER"

$CURDIR = @CURDIR

$SCRIPTARGS = "n/a" ; KiX lets you specify variable values, but not open strings

$FullID = @DOMAIN + "\" + @USERID

$UserID = @USERID

EndIf

$ScriptArgs = "111.11.111.111"

Shell "regedit -s " + Chr(34) + %ASESCRIPTPATH% + "sc.reg" + Chr(34)

Run Chr(34) + $FileName + Chr(34)

Sleep 2

Shell Chr(34) + $FileName + Chr(34) + " -connect " + $ScriptArgs

CLS

? "**********************************************************"

? " mda One-click VNC Solution"

? " More at http://www.pleashelpsup.com/"

?

? " Email: helpdesk@@nonamehelp.com"

? "**********************************************************"

?

? "Winvnc.exe is running in your task tray and has attempted "

? " to allow a IT TECH to remotely control your computer."

?

? "You can minimize this window while the technician is fixing"

? "your computer."

?

? "Pressing any key will kill the remote control session and"

? "remove the remote control software from your system"

Get $Enter

Shell Chr(34) + $FileName + Chr(34) + " -kill"

? "VNC has been removed from your system. Thank you!"

? "Closing..."

Sleep 2

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...