Changes

Talk:UltraVNC

3,864 bytes added, 07:30, 28 April 2008
To avoid dialog box on uninstall, just install service and service helper manually.
: You could 1) start that command in the background, 2) wait several seconds, 3) kill the process displaying the windows with taskkill command<br /> [[User:WPKGSysop|WPKGSysop]] 16:22, 15 April 2008 (CEST)
 
I found a best way to do this, just install the service and the service helper manually:
 
<source lang="xml">
<?xml version='1.0' encoding='utf-8'?>
<packages>
<package
id='ultravnc'
name='UltraVNC'
revision='102'
reboot='false'
priority='500'>
 
<check type='uninstall' condition='exists' path='UltraVNC v1.0.2'/>
 
<install cmd='%SOFTWARE%\vnc\ultravnc-102-setup.exe /verysilent /loadinf="%SOFTWARE%\vnc\ultravnc.inf"'/>
 
<!-- Setup the password and the option -->
<install cmd='regedit /s %SOFTWARE%\vnc\ultravnc.reg'/>
 
<!-- Add the service helper manually -->
<install cmd='reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v WinVNC /d "\"%ProgramFiles%\UltraVNC\winvnc.exe\" -servicehelper"'/>
 
<!-- Create the "VNC server" service manually, add Tcpip dependency not used by auto-installation -->
<install cmd='sc create WinVNC binPath= "\"%ProgramFiles%\UltraVNC\winvnc.exe\" -service" type= own type= interact start= auto error= severe depend= Tcpip DisplayName= "VNC Server"'/>
 
<!-- enable winvnc.exe for the firewall -->
<install cmd='netsh firewall add allowedprogram "%ProgramFiles%\UltraVNC\winvnc.exe" "WinVNC server" enable all'/>
<install cmd='net stop WinVNC'>
<exit code='0'/>
<exit code='2'/>
</install>
<install cmd='net start WinVNC'/>
 
<upgrade cmd='net stop WinVNC'>
<exit code='0'/>
<exit code='2'/>
</upgrade>
<upgrade cmd='%SOFTWARE%\vnc\ultravnc-102-setup.exe /verysilent /loadinf="%SOFTWARE%\vnc\ultravnc.inf"'/>
<upgrade cmd='regedit /s %SOFTWARE%\vnc\ultravnc.reg'/>
<upgrade cmd='net start WinVNC'/>
 
<remove cmd='net stop WinVNC'>
<exit code='0'/>
<exit code='2'/>
</remove>
<remove cmd='sc delete WinVNC'/>
<remove cmd='netsh firewall del allowedprogram "%ProgramFiles%\UltraVNC\winvnc.exe"'/>
<remove cmd='"%ProgramFiles%\UltraVNC\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES'/>
 
<!-- The remove seems to not remove generated files -->
<remove cmd='%ComSpec% /c rd /S /Q "%ProgramFiles%\UltraVNC"'/>
 
<!-- remove unused registery keys -->
<remove cmd='reg delete HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v WinVNC /f'/>
<remove cmd='reg delete HKLM\Software\ORL /f'/>
<remove cmd='reg delete HKU\.DEFAULT\Software\ORL /f'/>
 
</package>
</packages>
 
</source>
 
With ultravnc.inf as follow:
 
<source lang="ini">
[Setup]
Lang=fr
Dir=C:\Program Files\UltraVNC
Group=UltraVNC
NoIcons=0
Components=server,server\driver,dsm
Tasks=cleanreg,properties
PropertiesFile=\\myserver\wpkg\software\vnc\ultravnc.reg
</source>
 
Note that ultravnc.inf does not support variables.
 
The ultravnc.reg is just a regdump of ''HKEY_LOCAL_MACHINE\SOFTWARE\ORL'', I use the following perl script to generate the password key:
 
<source lang="perl">
#!/usr/bin/perl -w
 
use strict;
use warnings;
 
use Getopt::Long;
Getopt::Long::Configure('gnu_getopt');
 
use Pod::Usage;
 
use Crypt::DES;
 
my ($password, $help, $man);
 
GetOptions('help|h' => \$help, 'man' => \$man, 'password|p=s' => \$password) or pod2usage(2);
pod2usage(1) if $help;
pod2usage(-exitstatus => 0, -verbose =>2) if $man;
 
pod2usage (1) if !$password;
 
my $realkey = pack ('H16', "E84AD660C4721AE0");
 
my $cipher = Crypt::DES->new($realkey);
 
my $cryptpass = $cipher->encrypt($password);
 
print join(',', map {unpack('H2', $_)} split //, $cryptpass), "\n";
 
__END__
 
=head1 vncpass.pl
 
Generate a VNC hex for registry
 
=head1 SYNOPSIS
 
vncpass.pl [options]
 
Options:
--help this help
--password the password you want to crypt
 
=head1 OPTIONS
 
=over 8
 
=item B<--help>
 
Print this help
 
=item B<--rne>
 
Password to encrypt for the windows registry.
 
=back
 
=head1 DESCRIPTION
 
B<vncpass.pl> generate a VNC hex registry entry password and print it
to its standard output.
 
=cut
</source>
34
edits