Ahora el cliente es un autoextraible

This commit is contained in:
Juan Ferrer Toribio 2016-03-24 17:05:02 +01:00
parent 8250331add
commit d3b3c23ca4
8 changed files with 90 additions and 122 deletions

BIN
7zip/7zsd_LZMA2.sfx Normal file

Binary file not shown.

3
7zip/config.txt Normal file
View File

@ -0,0 +1,3 @@
;!@Install@!UTF-8!
RunProgram="vn-support.hta"
;!@InstallEnd@!

View File

@ -1,59 +0,0 @@
#define MyAppName "Remote Support"
#define MyAppVersion "1.0"
#define MyAppPublisher "Verdnatura"
#define MyAppURL "http://soporte.verdnatura.es/"
#define RegPath "Software\TightVNC\Server"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
AppId={{7615F2D0-AB26-4EB0-948C-BBB2CE1151D7}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
CreateAppDir=no
;LicenseFile=client\LICENSE.txt
SetupIconFile=client\icon.ico
Compression=lzma
SolidCompression=yes
CreateUninstallRegKey=no
Uninstallable=no
PrivilegesRequired=lowest
DisableStartupPrompt=yes
OutputDir=web
OutputBaseFilename=vn-support
SignTool=signtool.exe sign /a /f $qC:\cert.pfx$q /n $q{#MyAppPublisher}$q /t http://timestamp.comodoca.com/authenticode /d $q{#MyAppName}$q $f
[Languages]
Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl"
[Files]
Source: "client\*"; DestDir: "{tmp}"; Flags: deleteafterinstall
[Run]
Filename: "{sys}\mshta.exe"; Parameters: """{tmp}\vn-support.hta"""; WorkingDir: "{tmp}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: postinstall runascurrentuser
[Registry]
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "string"; ValueName: "ExtraPorts"; ValueData: ""; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "QueryAcceptOnTimeout"; ValueData: "0"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "BlockLocalInput"; ValueData: "0"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "AcceptRfbConnections"; ValueData: "0"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "UseVncAuthentication"; ValueData: "1"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "AcceptHttpConnections"; ValueData: "0"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "EnableUrlParams"; ValueData: "1"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "AlwaysShared"; ValueData: "0"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "NeverShared"; ValueData: "0"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "DisconnectClients"; ValueData: "1"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "AllowLoopback"; ValueData: "0"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "UseMirrorDriver"; ValueData: "1";
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "BlockRemoteInput"; ValueData: "0";
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "EnableFileTransfers"; ValueData: "1";
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "RemoveWallpaper"; ValueData: "1";
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "PollingInterval"; ValueData: "500"
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "GrabTransparentWindows"; ValueData: "1"
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "LoopbackOnly"; ValueData: "0";

View File

@ -1,7 +1,38 @@
var Conf =
{
host: 'support.verdnatura.es',
path: 'HKCU\\Software\\TightVNC\\Server',
checkKey: 'ExtraPorts',
params:
{
'UseMirrorDriver' : true,
'BlockRemoteInput' : false,
'EnableFileTransfers' : true,
'RemoveWallpaper' : true,
'PollingInterval' : 500,
'GrabTransparentWindows' : true,
'LoopbackOnly' : false
},
optParams:
{
'ExtraPorts' : '',
'QueryAcceptOnTimeout' : false,
'BlockLocalInput' : false,
'AcceptRfbConnections' : false,
'UseVncAuthentication' : true,
'AcceptHttpConnections' : false,
'EnableUrlParams' : true,
'AlwaysShared' : false,
'NeverShared' : false,
'DisconnectClients' : true,
'AllowLoopback' : false
}
};
var Support =
{
shell: new ActiveXObject ('WScript.shell'),
shell: new ActiveXObject ('WScript.Shell'),
init: function ()
{
@ -11,9 +42,50 @@ var Support =
window.resizeTo (width, height);
window.moveTo ((screen.width - width) / 2, (screen.height - height) / 2);
this.regWrites (Conf.path, Conf.params);
if (this.regRead (Conf.path, Conf.checkKey) === null)
this.regWrites (Conf.path, Conf.optParams);
this.run ('tvnserver.exe -run');
},
regRead: function (path, key)
{
try {
var value = this.shell.regRead (path +'\\'+ key);
}
catch (e) {
var value = null;
}
return value;
},
regWrites: function (path, params)
{
for (var key in params)
{
var type;
var value = params[key];
switch (typeof (value))
{
case 'boolean':
type = 'REG_DWORD';
value = value ? 1 : 0;
break;
case 'number':
type = 'REG_DWORD';
break;
default:
type = 'REG_SZ';
}
this.shell.regWrite (path +'\\'+ key, value.toString (), type);
}
},
$: function (id)
{
return document.getElementById (id);
@ -30,7 +102,7 @@ var Support =
_onStartClick: function ()
{
var port = 5500 + parseInt (this.$('operator').value);
this.run ('tvnserver.exe -controlapp -connect support.verdnatura.es::'+ port);
this.run ('tvnserver.exe -controlapp -connect '+ Conf.host +'::'+ port);
},
_onCloseClick: function ()
@ -46,4 +118,3 @@ var Support =
};
Support.init ();

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
vn-support (1.021-deb8) stable; urgency=low
vn-support (1.024-deb8) stable; urgency=low
* Initial Release.

12
gen-client.bat Normal file
View File

@ -0,0 +1,12 @@
@echo off
set wd=%~dp0
set compressFile=%temp%\vn-support.7z
set exeFile=%wd%\web\vn-support.exe
"%programFiles%\7-Zip\7z.exe" a "%compressFile%" "%wd%\client\*"
copy /b "%wd%\7zip\7zsd_LZMA2.sfx" + "%wd%\7zip\config.txt" + "%compressFile%" "%exeFile%"
del "%compressFile%"
rem signtool.exe sign /a /f "C:\cert.pfx" /n "Verdnatura" /t ^
rem http://timestamp.comodoca.com/authenticode /d "Remote Support" "%exeFile%"

View File

@ -1,59 +0,0 @@
#define MyAppName "Remote Support"
#define MyAppVersion "1.0"
#define MyAppPublisher "Verdnatura"
#define MyAppURL "http://www.verdnatura.es/"
#define RegPath "Software\TightVNC\Server"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
AppId={{7615F2D0-AB26-4EB0-948C-BBB2CE1151D7}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
CreateAppDir=no
;LicenseFile=client\LICENSE.txt
SetupIconFile=client\icon.ico
Compression=lzma
SolidCompression=yes
CreateUninstallRegKey=no
Uninstallable=no
PrivilegesRequired=lowest
DisableStartupPrompt=yes
OutputDir=..
OutputBaseFilename=vn-support
SignTool=signtool.exe sign /a /f $qC:\cert.pfx$q /n $q{#MyAppPublisher}$q /t http://timestamp.comodoca.com/authenticode /d $q{#MyAppName}$q $f
[Languages]
Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl"
[Files]
Source: "client\*"; DestDir: "{tmp}"; Flags: ignoreversion
[Run]
Filename: "{sys}\mshta.exe"; Parameters: """{tmp}\vn-support.hta"""; WorkingDir: "{tmp}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: postinstall runascurrentuser
[Registry]
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "string"; ValueName: "ExtraPorts"; ValueData: ""; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "QueryAcceptOnTimeout"; ValueData: "0"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "BlockLocalInput"; ValueData: "0"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "AcceptRfbConnections"; ValueData: "0"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "UseVncAuthentication"; ValueData: "1"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "AcceptHttpConnections"; ValueData: "0"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "EnableUrlParams"; ValueData: "1"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "AlwaysShared"; ValueData: "0"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "NeverShared"; ValueData: "0"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "DisconnectClients"; ValueData: "1"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "AllowLoopback"; ValueData: "0"; Flags: createvalueifdoesntexist
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "UseMirrorDriver"; ValueData: "1";
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "BlockRemoteInput"; ValueData: "0";
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "EnableFileTransfers"; ValueData: "1";
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "RemoveWallpaper"; ValueData: "1";
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "PollingInterval"; ValueData: "500"
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "GrabTransparentWindows"; ValueData: "1"
Root: HKCU; Subkey: "{#RegPath}"; ValueType: "dword"; ValueName: "LoopbackOnly"; ValueData: "0";

Binary file not shown.