one command

one command

Postby sharonch » 2012-01-12 21:38

Can I initiate the UVNC server and give the password at the same time from one command or from a control program?

If the answer is yes, what language do you use to do so?
Posts: 10
Joined: 2011-12-15 08:25

Re: one command

Postby YY » 2012-01-14 15:53

This can be achieved by using a Batch Script with some 3rd party utilities.

I submit herewith a sample.
You need to download two free tools:
- vncpwd -- tool to encrypt the VNC password.
- inifile -- tool to write the encrypted vnc password into the file "ultravnc.ini"

Here is the structure of the Batch Script (I call it as Start_UltraVNC.bat):
Code: Select all
rem ===========================
rem Sample Batch File to start a UVNC server with specified password
rem Syntax: (the following example starts the UVNC server with password "123")
rem Start_UltraVNC.bat 123
rem ===========================

vncpwd.exe /v:%1 /f:ultravnc.ini

inifile.exe ultravnc.ini [connection] password > temp.bat

call temp.bat

inifile.exe ultravnc.ini [ultravnc] passwd=%password%00

start winvnc.exe

After all files (vncpwd.exe; vncpwd.dll; inifile.exe; winvnc.exe; ultravnc.ini; Start_UltraVNC.bat; etc) are available, put them into one folder.

Open a Command Prompt window, and goto this folder, and then run (for e.g) this command:
Start_UltraVNC.bat 123

This will start the uvnc server with password setted as "123"
Posts: 996
Joined: 2006-11-13 15:11

Return to (stable)

Who is online

Users browsing this forum: No registered users and 1 guest