diff --git a/7zip/7zsd_LZMA2.sfx b/7zip/7zsd_LZMA2.sfx new file mode 100644 index 0000000..cd44f01 Binary files /dev/null and b/7zip/7zsd_LZMA2.sfx differ diff --git a/7zip/config.txt b/7zip/config.txt new file mode 100644 index 0000000..9b0fd23 --- /dev/null +++ b/7zip/config.txt @@ -0,0 +1,3 @@ +;!@Install@!UTF-8! +RunProgram="vn-support.hta" +;!@InstallEnd@! \ No newline at end of file diff --git a/client.iss b/client.iss deleted file mode 100755 index e5b8dfb..0000000 --- a/client.iss +++ /dev/null @@ -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"; - diff --git a/client/main.js b/client/main.js index abcc6b1..aaafdbe 100755 --- a/client/main.js +++ b/client/main.js @@ -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,8 +42,49 @@ 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) { @@ -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 (); - diff --git a/debian/changelog b/debian/changelog index 3d19c6f..e7f52b8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -vn-support (1.021-deb8) stable; urgency=low +vn-support (1.024-deb8) stable; urgency=low * Initial Release. diff --git a/gen-client.bat b/gen-client.bat new file mode 100644 index 0000000..06af53c --- /dev/null +++ b/gen-client.bat @@ -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%" diff --git a/setup.iss b/setup.iss deleted file mode 100755 index 66640b2..0000000 --- a/setup.iss +++ /dev/null @@ -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"; - diff --git a/web/vn-support.exe b/web/vn-support.exe index bf75041..deb6b7e 100644 Binary files a/web/vn-support.exe and b/web/vn-support.exe differ