You are here

UltraVNC Viewer

25 posts / 0 new
Last post
callit
Offline
Last seen: 15 years 11 months ago
Joined: 2006-02-11 00:02
UltraVNC Viewer

I know, it's essentially portable as it is already. My only issue is that it seems to save settings to the registry - so when I sit down at a computer I've been at before, and pop open the viewer, it has my host name ready to go. And uhh, that kind of freaks me out.

I have no experience doing any of this, but would love to learn, and this seems like an easy enough place to start. If anyone can either create a wrapper or give me some pointers on what the easiest way to do this would be, feel free to let me know.

Thanks

(www.ultravnc.com for the software)

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 1 week ago
Joined: 2006-01-06 21:27
What about

What about uvnc.com/addons/singleclick.html
----
R McCue

"If you're not part of the solution, you're part of the precipitate."

callit
Offline
Last seen: 15 years 11 months ago
Joined: 2006-02-11 00:02
It looks like that's only a

It looks like that's only a server - I'm looking for a client/viewer.

milesg
Offline
Last seen: 9 years 6 months ago
Joined: 2006-01-07 13:02
You can try ...

[PortableVNCViewer.bat]

@ECHO OFF
CLS
:: **********************************************************************************************
:: * Portable VNCViewer Running Script Ver 1.0. *
:: * Miles Guo (c), 2005 - *
:: * All rights reserved. You may distribute this script but please keep this boilerplate in. *
:: * For updates on the script - check www.mydomain.com from time to time. *
:: * Use at your own risk! *
:: **********************************************************************************************
::
:: *** RUN VNCViewer ***
::
REGEDIT /s vncviewer.reg
START /w vncviewer.exe
::
:: *** GET ENV ***
::
REGEDIT /ea newvncviewer.reg "HKEY_CURRENT_USER\Software\ORL\VNCviewer"
COPY newvncviewer.reg vncviewer.reg
REGEDIT /s vncviewerdel.reg
::
:: *** DELETE TEMPLATE FILE ***
::
DEL newvncviewer.reg
::
:: *** END ***
::

[vncviewer.reg]

REGEDIT4

[HKEY_CURRENT_USER\Software\ORL\VNCviewer]

[HKEY_CURRENT_USER\Software\ORL\VNCviewer\MRU]
"index"="IJGABDHEFC"
"A"="172.21.3.221"
"B"="172.21.11.23"
"C"="172.21.20.1"
"D"="192.168.1.63"
"E"="172.21.2.31"
"F"="192.168.0.5"
"G"="192.168.1.22"
"H"="172.21.20.38"
"I"="192.168.1.7"
"J"="localhost:5901"

[vncviewerdel.reg]

REGEDIT4

[-HKEY_CURRENT_USER\Software\ORL\VNCviewer]

--------------------------------------------------------
put above file (PortableVNCViewer.bat,vncviewer.reg,vncviewerdel.reg) and vncviewer.exe on same folder.

That's all!

goodlucky

callit
Offline
Last seen: 15 years 11 months ago
Joined: 2006-02-11 00:02
Thanks

Thanks! I'll give that a try

Edit: This works perfectly - and it gives me the reg file to cleanup the other machines I've used. Thanks!

gwelvin
Offline
Last seen: 17 years 3 months ago
Joined: 2006-03-28 04:05
This could help, but ...

This could help, but calls to regedit are not permitted on workstations at work...

iXneonXi
Offline
Last seen: 18 years 1 month ago
Joined: 2006-04-09 08:44
Without modifying registry

Is there any way to use/make a VNC client Portable without requiring access to the registry?
As qwelvin said, many computers that I use will not allow calls to regedit... even tho programs can create registry entries and installers too Beee

nm35
Offline
Last seen: 18 years 2 weeks ago
Developer
Joined: 2005-12-12 17:13
Installers work fine?

So use NSIS.

~nm35 {blog} {personal space}

nm35
Offline
Last seen: 18 years 2 weeks ago
Developer
Joined: 2005-12-12 17:13
Possible NSIS app, or try Registry Rapper

Haven't tested this, just made it from scratch. Use NSIS to compile it. Make sure you have the Registry plugin.

PortableVNCViewer.nsi

;Portable VNC Viewer

;Copyright (C) 
;2006 Mark Smith (nm35)

;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either version 2
;of the License, or (at your option) any later version.

;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
;GNU General Public License for more details.

;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA02110-1301, USA.

;---Definitions----

!define SNAME "PortableVNCViewer"

;-----Runtime switches----
CRCCheck on
AutoCloseWindow True
SilentInstall silent
WindowIcon off
XPSTYLE on 

;-----Set basic information-----

Name "Portable VNC Viewer"
;Icon "${SNAME}.ico "
Caption "Portable VNC Viewer"
OutFile "${SNAME}.exe"

;-----Includes-----

!include "Registry.nsh"

;-----Variables----

;Var VariableName

;-----Version Information------

LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"

VIProductVersion "0.1.0.0"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Portable VNC Viewer"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© Mark Smith (nm35) 2006"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Makes VNC Viewer portable"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.1.0.0"

Section "Main"

${Registry::RestoreKey} "$EXEDIR\vncviewer.reg" $R0
ExecWait vncviewer.exe
${Registry::SaveKey} "HKEY_CURRENT_USER\Software\ORL\VNCviewer" "$EXEDIR\vncviewer.reg" "/G=1" $R0

End:
SectionEnd

Or use Registry Rapper, if you don't mind a generic app.

~nm35 {blog} {personal space}

iXneonXi
Offline
Last seen: 18 years 1 month ago
Joined: 2006-04-09 08:44
Compiled and Run

I compiled it and ran the program inside of vncviewer.exe's directory.
It launched the viewer, and when I exited the viewer it created a .reg file.

I just want to ask should I merge the created file "vncviewer.reg" with the registry, or leave it there or delete it?

I'm assuming your app handles registry access to keep the preferences etc. saved on the USB flash drive and keeping them out of the local machine, so what's the best way to check whether all the extra registry stuff is gone when I finish using the app, and that my settings stay on the USB key?

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 1 week ago
Joined: 2006-01-06 21:27
Leave the .reg

It's the registry settings which the launcher automatically merges on launching. Take it with you when you travel.
----
R McCue

"If you're not part of the solution, you're part of the precipitate."

nm35
Offline
Last seen: 18 years 2 weeks ago
Developer
Joined: 2005-12-12 17:13
The app restores any

The app restores any settings it finds in vncviewer.reg to the registry, runs the app, saves your settings to the drive and then deletes the Registry settings. It should work fine.

To check if the registry stuff is gone, just run VNCViewer.exe (NOT the launcher you compiled) and see if your settings still pop up.

If you want the launcher to have an icon, change the code ;Icon "${SNAME}.ico " to Icon "vncviewer.exe" and make sure vncviewer.exe is in the same directory as the NSI file when you compile. You'll get VNCViewer's icon file.

~nm35 {blog} {personal space}

iXneonXi
Offline
Last seen: 18 years 1 month ago
Joined: 2006-04-09 08:44
Testing

I'm going to be heavily testing this app on multiple boxes today.
I'll give the final go. If it works then that'd be great. It already worked on the computer I'm using now, but that was run from program files with the program I compiled (above).

Maybe it'll be incentive enough to get the devs at ultravnc to start using config files and not the registry.

iXneonXi
Offline
Last seen: 18 years 1 month ago
Joined: 2006-04-09 08:44
Experiencing Issues

I put "tabbed_vncviewer_129.exe" and "PortableVNCViewer.exe" in their own directory on my USB drive.
I ran the launcher on a Windows 2000 Pro computer without VNC installed.
The program ran.
I exited it.
Many registry keys were left - infact possibly all.
I re-launched the program and the settings changes I made were not intact.

Notable changes:
To get the NSIS file to work in the first place I had to change
ExecWait vncviewer.exe
to
ExecWait tabbed_vncviewer_129.exe

I tried changing
;Icon "${SNAME}.ico "
to
;Icon "tabbed_vncviewer_129.exe"
but the icon never changed.

So I guess you could say the launcher failed? Oh, and some registry keys are not removable.
I'll type up a full list of changes in the registry for later.
Right now I want to continue working on this and try and have a good working Portable App within the next 10 days.

Thanx for all your help with this.

EDIT! UPDATE: I safely ejected the USB Drive from the Windows 2K computer. I used regedit to search for "vnc" and nothing was found. Is this the intended behavior?? If so - why wait until ejecting to remove the registry changes? Have not re-inserted to see whether or no the settings stay upon re-launching.

2nd UPDATE: Meh - I plugged it back in and Ran it again to connect to my computer - the program works just fine but this time when I safely removed hardware the registry info stayed.

nm35
Offline
Last seen: 18 years 2 weeks ago
Developer
Joined: 2005-12-12 17:13
...

Maybe this'll help. Can you be more specific about what the problem is?

For the Icon... Remove the semicolon (;) from before Icon -- the semicolon comments out the line.

If you run the launcher, it restores your registry settings and runs the executable in the ExecWait; then it backs up your settings and deletes them from the Registry.

I wrote the program for the registry entries you said VNCViewer gave, but you're using tabbed_vncviewer -- it may leave settings elsewhere.

E-mail me your whole setup at nm35@portasoft.org; I'll look it over and see what went wrong.

~nm35 {blog} {personal space}

iXneonXi
Offline
Last seen: 18 years 1 month ago
Joined: 2006-04-09 08:44
thanx. Past few days I've

thanx. Past few days I've been busy, but now I can get back to work on it.
I'll keep in touch with yall and nm35.

jaygo
Offline
Last seen: 10 years 11 months ago
Joined: 2006-04-24 23:39
looks promising

I was just working on this today ... glad to see you guys are two steps ahead. I'll play with the compiled bit tomorrow. Let's get this thing packaged (the tabbed viewer would be nice as well) and see if John wants to list it here. You guys think it would be useful to setup a portable listen-mode viewer that updates dyndns and thus works with SingleClick? Seems doable.

Machete
Offline
Last seen: 1 year 5 months ago
Joined: 2005-12-21 15:32
I'm coming close...

I got my hands on the source, and simply removed the part that stores the MRU (the list of most recently made connections) in the registry, and moved the temporary/default options.vnc from %TEMP% to the same directory as the viewer. It appears that all I have left to do is remove the automatic registration of the .vnc files and the sound scheme it installs, and it'll be completely PORTABLE!

Unfortunately, I won't be able to finish this until about this time tomorrow, I don't have MSVC 6 at home. When it's done, should I post a copy here someplace?

Machete
Offline
Last seen: 1 year 5 months ago
Joined: 2005-12-21 15:32
Okay, it seems to be working.

The MRU's been disabled, the sound scheme and file associations aren't written to the host machine, and it stores its "options.vnc" file in the same directory the program is.

Now, I'm going to see if I can put this modification in as a command line option. With any luck, I should have it ready sometime tomorrow. If anyone wants a copy of it as it is now, just to play with it, let me know, I'll be happy to send you a copy 8)

BoredByPolitics
Offline
Last seen: 18 years 3 weeks ago
Joined: 2006-05-28 13:51
Sounds good

This will be quite useful for me, so I'll be interested in trying it out for you...

Smile

Pete

Pete

Machete
Offline
Last seen: 1 year 5 months ago
Joined: 2005-12-21 15:32
It's more or less ready, anyplace I should post it anyone?

Here's my development thread, if you want to read up on it's latest Smile

R-Rizzo
Offline
Last seen: 16 years 7 months ago
Joined: 2006-04-20 08:05
:)

I was just wondering if you had posted this. I would really like to try it out.

Thanks.

Rob

Machete
Offline
Last seen: 1 year 5 months ago
Joined: 2005-12-21 15:32
Just for you...

enjoy!

I'll upload a copy of the altered source to their sf.net page as a possible patch. I've been quite busy with other things for the past week, but at least it's hosted SOMEWHERE for the time being.

R-Rizzo
Offline
Last seen: 16 years 7 months ago
Joined: 2006-04-20 08:05
Thanks a bunch. This is sweet.

Just to double check. I just run it with the -portable switch? I did that and it appears to be working perfect....

Thanks again.

Rob

Machete
Offline
Last seen: 1 year 5 months ago
Joined: 2005-12-21 15:32
yep, that's it.

I'm glad it's working out for you. Just "vncviewer.exe -portable" will do it.

I think my next task is to make the 7-zip file manager portable. Just got my hands on the source, just gotta study it out for a bit. :lol:

Topic locked