Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

XML configuration vs. Windows Registry

Any features you would like to see in UltraVNC? Propose it here
Post Reply

Should UltraVNC Server have an option to read settings from an XML configuration file?

Yes!
17
89%
No Way!
2
11%
 
Total votes: 19

sbostedor
100
100
Posts: 273
Joined: 2005-02-02 19:30
Location: Jackson, MI, USA
Contact:

XML configuration vs. Windows Registry

Post by sbostedor »

There has been a very large discussion of this on the TightVNC mailing list but I think that this is a more appropriate group to bring this idea to.

Someone started the thread by asking for a VNC that can read the settings from XML or some other config file rather than relying on the Windows registry.

The benefits of doing this include:

- simple xcopy deployment of the server

- the ability to distribute settings changes simply by editing or replacing the configuration file (no remote registry API's)

- security would be simple just by placing file level permissions on the config file

- the option of having all of your VNC servers pull settings from a central config file on a network share

- many more that other can probably add

One person on the tightVNC list said that his reason for opposing the XML file was for security reasons. He felt that the registry security was somehow better than file level security.

Another person opposed it because he felt that some registry book should dictate how we all compute. More specifically, the reason was that this book said that any setting under 1KB should only be made in the registry. I'm not sure why that is, but I guess if the book said ... ;)

Another opposition to the XML idea seemed to think that those in favor of XML where anti-Microsoft and out of line.

What do you think? Is this something that UltraVNC would consider doing?
Last edited by sbostedor on 2005-07-25 17:54, edited 1 time in total.
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Post by redge »

Should UltraVNC Server have an option to read settings from an XML configuration file?

good consideration and sense of word and let the ability, choice for use xml file config or registry depending of admin opinion.

I voted Yes for this reason, if not OK, Admin can use back the registry version, that not closed option. very good :-)
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
sbostedor
100
100
Posts: 273
Joined: 2005-02-02 19:30
Location: Jackson, MI, USA
Contact:

Post by sbostedor »

Yea, it was meant as an option and not a replacement. The admin should be able to decide but it should default to an xml file if no registry keys are detected ... or maybe if a CERTAIN registry key isn't detected.

For example, if a DWORD of USEREGISTRY is not there or set to 0, it uses XML - Else it uses the registry settings.
Steve Bostedor
http://www.vncscan.com
Super Simple UltraVNC Management
californiajeff
40
40
Posts: 101
Joined: 2004-12-22 23:19
Location: Las Vegas, NV
Contact:

Post by californiajeff »

I find this idea interesting. Would going to XML make it easier to port UltraVNC to other operating systems? Should we be worried about security issues if it is in XML? What problems could we end up dealing with?
OhMyGoat
40
40
Posts: 103
Joined: 2005-05-15 02:35

Post by OhMyGoat »

Well I don't see a real need for xml configurations to do an easier installation, infact one could just export a .reg file with ultravnc configuration and import it on another computer. However it would be pretty useful to preserve different settings of different vnc servers running: using the registry would mess up everything since each vnc server writes in the same place as others. I don't see the necessity of using xml format however: a simple text file or a ini file would be fine for all the vnc server settings stored in the registry (and won't require writing extra code since one could just use windows apis for that).
aewell
Posts: 1
Joined: 2005-07-31 00:55

Post by aewell »

Hi All,

I am an on site consultant. I have to fix a lot of computer with
corrupted registries. The registry is a HORRIBLE idea that I wish M$
had never come up with. Oh please, Oh Please, do not use the registry, unless you are absolutely forced to!

My 2 cents,
--Tony
redndahead
8
8
Posts: 13
Joined: 2004-06-10 05:18

Post by redndahead »

there is one benefit I can see from it. If ultravnc can be pointed to look at this xml file on a remote server then it would be easy to configure a bunch with one file.

Adam
OhMyGoat
40
40
Posts: 103
Joined: 2005-05-15 02:35

Post by OhMyGoat »

where's the problem you can create a .bat file that downloads with wget or graburl a .reg file with the ultravnc configuration and installs it
sbostedor
100
100
Posts: 273
Joined: 2005-02-02 19:30
Location: Jackson, MI, USA
Contact:

Post by sbostedor »

OhMyGoat wrote:where's the problem you can create a .bat file that downloads with wget or graburl a .reg file with the ultravnc configuration and installs it
I don't think that they're saying it can't be done another way such as that. I think that XML would be more of a user friendly way to do a quick and easy deployment of UltraVNC to a computer.

Your suggestion implied a number of actions to accomplish what would only be one action using XML.

Network Administrators deal with enough problems and complications these days. Something like this would make a real impact on their day.
Steve Bostedor
http://www.vncscan.com
Super Simple UltraVNC Management
californiajeff
40
40
Posts: 101
Joined: 2004-12-22 23:19
Location: Las Vegas, NV
Contact:

Post by californiajeff »

(see post below)
Last edited by californiajeff on 2005-08-04 20:31, edited 1 time in total.
californiajeff
40
40
Posts: 101
Joined: 2004-12-22 23:19
Location: Las Vegas, NV
Contact:

Post by californiajeff »

Hey I just recently found out another program has already done what we are thinking of. I installed FileZilla on my system and during the setup process it asks you if you want to use the registry or an xml file. It recommends using the registry if you have multiple users on the same computer or it recommends using xml if you are the only user on your computer.

It seemed very easy and well thought out. I think UltraVNC should do like they did.
OhMyGoat
40
40
Posts: 103
Joined: 2005-05-15 02:35

Post by OhMyGoat »

I think that a .ini file would be easier. XML requires a lot more code than ini does since windows has already APIs for ini. There's no justification for using xml instead of ini for the kind of thata that the program saves: XML is for lots of nested structured data that's why, since ultravnc has no kind of that structured data (infact that data saves fine in the registry) ultravnc won't need it. Filezilla needs it because it needs to store a lot of structured data, ultravnc data instead is not much and can be easily stored everywhere. BTW ini files are easier to read and easier to change (differently from xml). I don't see why you insist in wanting xml, ini is better and requires really very short code changes (using ini probably the program would get just 1-2kb bigger, differently from using xml that will probably get it 20-30kb bigger)
Last edited by OhMyGoat on 2005-08-11 02:58, edited 1 time in total.
sbostedor
100
100
Posts: 273
Joined: 2005-02-02 19:30
Location: Jackson, MI, USA
Contact:

Post by sbostedor »

I agree with the Goat. ;)

I initially was saying XML but that was just symantecs. I don't care if it's XML, INI, or an exported .reg file. It doesn't really matter when the reason for doing it is to be able to have everything needed to run VNC in a single folder.

I totally agree that the data stored by VNC doesn't warrant XML. If it would be easier, INI is just as good.

I understand that it would be a considerable rewrite of a lot of code, though, so I'm trying not to beg too hard.
Steve Bostedor
http://www.vncscan.com
Super Simple UltraVNC Management
OhMyGoat
40
40
Posts: 103
Joined: 2005-05-15 02:35

Post by OhMyGoat »

i gave a look at ultravnc sources and it would only require a redefinition of writeint writestring readint readstring etc. if somebody is willing to do that using writeprofileint adding such feature won't take much time (something that checks if an ini file exists in the same folder and if it exists it writes there instead of the registry).

xml would be just a waste of time since registry branch of ultravnc will fit perfectly in an ini file. also xml would require msxml library that on windows 95 (and maybe also on 98 non-sr2) is not present.
Last edited by OhMyGoat on 2005-10-23 05:08, edited 1 time in total.
sbostedor
100
100
Posts: 273
Joined: 2005-02-02 19:30
Location: Jackson, MI, USA
Contact:

Post by sbostedor »

This is where I wish I was better at c++! I agree than an INI would be better for this issue than XML. It would address the same needs.
Steve Bostedor
http://www.vncscan.com
Super Simple UltraVNC Management
xbx14
8
8
Posts: 21
Joined: 2004-05-04 05:22
Location: Brisbane, Australia
Contact:

Post by xbx14 »

Just like "californiajeff", I too have installed FileZilla. It politely asks if you wish to use the registry or an xml file. This is great for installing onto a USB Memory Stick/USB Key(whatever these things are called). I installed the whole program onto a USB device, told it to use an xml file, and away I went - the ftp program now runs cleanly on any pc!

Could UltraVNC also be installed this way, therefore creating true portability, and leaving no data behind? :|
UltraVNC Server 1.0.4 RC8 (Dec 2007)
OS: XP Pro SP2 EN
OhMyGoat
40
40
Posts: 103
Joined: 2005-05-15 02:35

Post by OhMyGoat »

if somebody here has a vague idea on how should ini files be implemented i can try implementing them: i never used vnc with all those administrator/user properties stuff so i don't know how it works.

I can even try redefining those functions to write/read in an ini file if such file exists however all the settings, user and administrator ones will be stored in the same file and i don't think that this will make system administrators happy.
Last edited by OhMyGoat on 2005-10-24 06:07, edited 1 time in total.
OhMyGoat
40
40
Posts: 103
Joined: 2005-05-15 02:35

Post by OhMyGoat »

hello? don't tell me that nobody here has at least a vague idea on how should ini files be implemented... i never messed with that stuff and i really need ini support for ultravnc asap.

So... if somebody gives me an idea on how i should implement them i will implement them the right way and it will be an improvement for everybody... if nobody cares to tells me i implement them how i want however that way would be surely incorrect so it will be an improvement just for me and those that don't care with the policies stuff because it will be just a "workaround" that just does the job i want and will never comply with those policies stuff.

I'm going to write all the code and i will naturally release the changes... it's up to the people that want this patch to chose if they want me to write just a workaround or a decent implementation that does all the policies stuff...

So please... if somebody here gets the right idea on how to implement them tell me so i can a patch that complies with that stuff . Thanks.
OhMyGoat
40
40
Posts: 103
Joined: 2005-05-15 02:35

Post by OhMyGoat »

I got a message from pgmoney telling me to use 3 ini files, one for admin, one for default settings and one for user (stored in the user profile directory). but the problem is still there: an user could keep just a single ultravnc configuration... since the user configuration is stored in the user profile so there can be only one there.

As the people in this post said ini files would have been useful to keep different ultravnc installed without each one messing up with the other settings.

I've almost done writing all the stuff like pgmoney said but I think that those ini files must stay in the same folder where ultravnc is, so i'm probably going to merge all those 3 files in a single ini, with different sections inside it. Is it ok for everybody?
OhMyGoat
40
40
Posts: 103
Joined: 2005-05-15 02:35

Post by OhMyGoat »

I still have to find out the best way to store the settings however I posted part of the patch here:
http://www.rafb.net/paste/results/l1bF2362.html

I just made another class that sees if the INI file is available and then tries to write inside it. Then I just replaced all LoadINT SaveINT etc with the ones of that class. it seems to work fine for now the problem is still where to save the stuff.
OhMyGoat
40
40
Posts: 103
Joined: 2005-05-15 02:35

Post by OhMyGoat »

I've decided to do the following: when winvnc starts it checks the uvncadmin.ini file to see where are the other settings stored, if their location is not specified then the uvncdefault.ini is searched in the current directory and the user profile .ini file is searched in the home profile directory. Also the WINVNC Instance name will be loaded from the ini files (if it's not specified it will be the default one) (so there could be multiple instances of winvnc running at the same time (only one for each ini file however)).

Is it ok for everybody if I do that?
Neko
Posts: 2
Joined: 2006-11-30 13:03

Re: XML configuration vs. Windows Registry

Post by Neko »

I can a 404 on that link, can you upload it elsewhere?
Last edited by Neko on 2006-12-02 17:58, edited 1 time in total.
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Re: XML configuration vs. Windows Registry

Post by redge »

ultravnc server 1.0.4
settings = ultravnc.ini :-)
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
Post Reply