write registry only on config and corerectly check if passwort is set

This commit is contained in:
Mario Fetka 2013-04-13 10:43:10 +02:00
parent 9ca73d7b34
commit ef25059fb3
3 changed files with 316 additions and 38 deletions

301
CLIENT_DATA/config3264.ins Normal file
View File

@ -0,0 +1,301 @@
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
Message "Configuring " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..."
if ($server_extraports_set$ = "1")
Registry_server_extraports_value_of /32Bit
endif
if ($server_querytimeout_set$ = "1")
Registry_server_querytimeout_value_of /32Bit
endif
if ($server_queryacceptontimeout_set$ = "1")
Registry_server_queryacceptontimeout_value_of /32Bit
endif
if ($server_localinputprioritytimeout_set$ = "1")
Registry_server_localinputprioritytimeout_value_of /32Bit
endif
if ($server_localinputpriority_set$ = "1")
Registry_server_localinputpriority_value_of /32Bit
endif
if ($server_blockremoteinput_set$ = "1")
Registry_server_blockremoteinput_value_of /32Bit
endif
if ($server_blocklocalinput_set$ = "1")
Registry_server_blocklocalinput_value_of /32Bit
endif
if ($server_ipaccesscontrol_set$ = "1")
Registry_server_ipaccesscontrol_value_of /32Bit
endif
if ($server_rfbport_set$ = "1")
Registry_server_rfbport_value_of /32Bit
endif
if ($server_httpport_set$ = "1")
Registry_server_httpport_value_of /32Bit
endif
if ($server_disconnectaction_set$ = "1")
Registry_server_disconnectaction_value_of /32Bit
endif
if ($server_acceptrfbconnections_set$ = "1")
Registry_server_acceptrfbconnections_value_of /32Bit
endif
if ($server_usevncauthentication_set$ = "1")
Registry_server_usevncauthentication_value_of /32Bit
endif
if ($server_usecontrolauthentication_set$ = "1")
Registry_server_usecontrolauthentication_value_of /32Bit
endif
if ($server_loopbackonly_set$ = "1")
Registry_server_loopbackonly_value_of /32Bit
endif
if ($server_accepthttpconnections_set$ = "1")
Registry_server_accepthttpconnections_value_of /32Bit
endif
if ($server_loglevel_set$ = "1")
Registry_server_loglevel_value_of /32Bit
endif
if ($server_enablefiletransfers_set$ = "1")
Registry_server_enablefiletransfers_value_of /32Bit
endif
if ($server_removewallpaper_set$ = "1")
Registry_server_removewallpaper_value_of /32Bit
endif
if ($server_usemirrordriver_set$ = "1")
Registry_server_usemirrordriver_value_of /32Bit
endif
if ($server_enableurlparams_set$ = "1")
Registry_server_enableurlparams_value_of /32Bit
endif
if ($server_alwaysshared_set$ = "1")
Registry_server_alwaysshared_value_of /32Bit
endif
if ($server_nevershared_set$ = "1")
Registry_server_nevershared_value_of /32Bit
endif
if ($server_disconnectclients_set$ = "1")
Registry_server_disconnectclients_value_of /32Bit
endif
if ($server_pollinginterval_set$ = "1")
Registry_server_pollinginterval_value_of /32Bit
endif
if ($server_allowloopback_set$ = "1")
Registry_server_allowloopback_value_of /32Bit
endif
if ($server_grabtransparentwindows_set$ = "1")
Registry_server_grabtransparentwindows_value_of /32Bit
endif
if ($server_savelogtoalluserspath_set$ = "1")
Registry_server_savelogtoalluserspath_value_of /32Bit
endif
if ($server_runcontrolinterface_set$ = "1")
Registry_server_runcontrolinterface_value_of /32Bit
endif
endif
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
Message "Configuring " + $ProductId$ + " " + $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..."
comment "Patch Registry"
if ($server_extraports_set$ = "1")
Registry_server_extraports_value_of /64Bit
endif
if ($server_querytimeout_set$ = "1")
Registry_server_querytimeout_value_of /64Bit
endif
if ($server_queryacceptontimeout_set$ = "1")
Registry_server_queryacceptontimeout_value_of /64Bit
endif
if ($server_localinputprioritytimeout_set$ = "1")
Registry_server_localinputprioritytimeout_value_of /64Bit
endif
if ($server_localinputpriority_set$ = "1")
Registry_server_localinputpriority_value_of /64Bit
endif
if ($server_blockremoteinput_set$ = "1")
Registry_server_blockremoteinput_value_of /64Bit
endif
if ($server_blocklocalinput_set$ = "1")
Registry_server_blocklocalinput_value_of /64Bit
endif
if ($server_ipaccesscontrol_set$ = "1")
Registry_server_ipaccesscontrol_value_of /64Bit
endif
if ($server_rfbport_set$ = "1")
Registry_server_rfbport_value_of /64Bit
endif
if ($server_httpport_set$ = "1")
Registry_server_httpport_value_of /64Bit
endif
if ($server_disconnectaction_set$ = "1")
Registry_server_disconnectaction_value_of /64Bit
endif
if ($server_acceptrfbconnections_set$ = "1")
Registry_server_acceptrfbconnections_value_of /64Bit
endif
if ($server_usevncauthentication_set$ = "1")
Registry_server_usevncauthentication_value_of /64Bit
endif
if ($server_usecontrolauthentication_set$ = "1")
Registry_server_usecontrolauthentication_value_of /64Bit
endif
if ($server_loopbackonly_set$ = "1")
Registry_server_loopbackonly_value_of /64Bit
endif
if ($server_accepthttpconnections_set$ = "1")
Registry_server_accepthttpconnections_value_of /64Bit
endif
if ($server_loglevel_set$ = "1")
Registry_server_loglevel_value_of /64Bit
endif
if ($server_enablefiletransfers_set$ = "1")
Registry_server_enablefiletransfers_value_of /64Bit
endif
if ($server_removewallpaper_set$ = "1")
Registry_server_removewallpaper_value_of /64Bit
endif
if ($server_usemirrordriver_set$ = "1")
Registry_server_usemirrordriver_value_of /64Bit
endif
if ($server_enableurlparams_set$ = "1")
Registry_server_enableurlparams_value_of /64Bit
endif
if ($server_alwaysshared_set$ = "1")
Registry_server_alwaysshared_value_of /64Bit
endif
if ($server_nevershared_set$ = "1")
Registry_server_nevershared_value_of /64Bit
endif
if ($server_disconnectclients_set$ = "1")
Registry_server_disconnectclients_value_of /64Bit
endif
if ($server_pollinginterval_set$ = "1")
Registry_server_pollinginterval_value_of /64Bit
endif
if ($server_allowloopback_set$ = "1")
Registry_server_allowloopback_value_of /64Bit
endif
if ($server_grabtransparentwindows_set$ = "1")
Registry_server_grabtransparentwindows_value_of /64Bit
endif
if ($server_savelogtoalluserspath_set$ = "1")
Registry_server_savelogtoalluserspath_value_of /64Bit
endif
if ($server_runcontrolinterface_set$ = "1")
Registry_server_runcontrolinterface_value_of /64Bit
endif
endif
[Registry_server_extraports_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "ExtraPorts" = REG_SZ:"$server_extraports_value_of$"
[Registry_server_querytimeout_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "QueryTimeout" = REG_DWORD:$server_querytimeout_value_of$
[Registry_server_queryacceptontimeout_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "QueryAcceptOnTimeout" = REG_DWORD:$server_queryacceptontimeout_value_of$
[Registry_server_localinputprioritytimeout_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "LocalInputPriorityTimeout" = REG_DWORD:$server_localinputprioritytimeout_value_of$
[Registry_server_localinputpriority_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "LocalInputPriority" = REG_DWORD:$server_localinputpriority_value_of$
[Registry_server_blockremoteinput_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "BlockRemoteInput" = REG_DWORD:$server_blockremoteinput_value_of$
[Registry_server_blocklocalinput_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "BlockLocalInput" = REG_DWORD:$server_blocklocalinput_value_of$
[Registry_server_ipaccesscontrol_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "IpAccessControl" = REG_SZ:"$server_ipaccesscontrol_value_of$"
[Registry_server_rfbport_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "RfbPort" = REG_DWORD:$server_rfbport_value_of$
[Registry_server_httpport_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "HttpPort" = REG_DWORD:$server_httpport_value_of$
[Registry_server_disconnectaction_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "DisconnectAction" = REG_DWORD:$server_disconnectaction_value_of$
[Registry_server_acceptrfbconnections_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "AcceptRfbConnections" = REG_DWORD:$server_acceptrfbconnections_value_of$
[Registry_server_usevncauthentication_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "UseVncAuthentication" = REG_DWORD:$server_usevncauthentication_value_of$
[Registry_server_usecontrolauthentication_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "UseControlAuthentication" = REG_DWORD:$server_usecontrolauthentication_value_of$
[Registry_server_loopbackonly_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "LoopbackOnly" = REG_DWORD:$server_loopbackonly_value_of$
[Registry_server_accepthttpconnections_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "AcceptHttpConnections" = REG_DWORD:$server_accepthttpconnections_value_of$
[Registry_server_loglevel_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "LogLevel" = REG_DWORD:$server_loglevel_value_of$
[Registry_server_enablefiletransfers_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "EnableFileTransfers" = REG_DWORD:$server_enablefiletransfers_value_of$
[Registry_server_removewallpaper_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "RemoveWallpaper" = REG_DWORD:$server_removewallpaper_value_of$
[Registry_server_usemirrordriver_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "UseMirrorDriver" = REG_DWORD:$server_usemirrordriver_value_of$
[Registry_server_enableurlparams_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "EnableUrlParams" = REG_DWORD:$server_enableurlparams_value_of$
[Registry_server_alwaysshared_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "AlwaysShared" = REG_DWORD:$server_alwaysshared_value_of$
[Registry_server_nevershared_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "NeverShared" = REG_DWORD:$server_nevershared_value_of$
[Registry_server_disconnectclients_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "DisconnectClients" = REG_DWORD:$server_disconnectclients_value_of$
[Registry_server_pollinginterval_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "PollingInterval" = REG_DWORD:$server_pollinginterval_value_of$
[Registry_server_allowloopback_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "AllowLoopback" = REG_DWORD:$server_allowloopback_value_of$
[Registry_server_grabtransparentwindows_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "GrabTransparentWindows" = REG_DWORD:$server_grabtransparentwindows_value_of$
[Registry_server_savelogtoalluserspath_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "SaveLogToAllUsersPath" = REG_DWORD:$server_savelogtoalluserspath_value_of$
[Registry_server_runcontrolinterface_value_of]
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
set "RunControlInterface" = REG_DWORD:$server_runcontrolinterface_value_of$

View File

@ -1,15 +1,15 @@
if ( $server_password_value_of$ = "" )
$server_password_value_of$ = RandomStr
if ( strLength($server_password_value_of$) = "0" )
Set $server_password_value_of$ = RandomStr
opsiservicecall_server_password_value_of
endif
if ( $server_controlpassword_value_of$ = "" )
$server_controlpassword_value_of$ = RandomStr
if ( strLength($server_controlpassword_value_of$) = "0" )
Set $server_controlpassword_value_of$ = RandomStr
opsiservicecall_server_controlpassword_value_of
endif
if ( $server_viewonlypassword_value_of$ = "" )
$server_viewonlypassword_value_of$ = RandomStr
if ( strLength($server_viewonlypassword_value_of$) = "0" )
Set $server_viewonlypassword_value_of$ = RandomStr
opsiservicecall_server_viewonlypassword_value_of
endif

View File

@ -101,7 +101,14 @@ else
comment "Create shortcuts"
LinkFolder_install
endif
if FileExists("%ScriptPath%\config3264.ins")
comment "Start set config section"
Sub "%ScriptPath%\config3264.ins"
endif
comment "Reboot"
ExitWindows /Reboot
endif
[Winbatch_install_32]
@ -131,40 +138,10 @@ copy "$IniCfgFile$" "$InstallDir64$"
[Registry_install]
; Example of setting some values of an registry key:
;
openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
; openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
; set "name1" = "some string value"
; set "name2" = REG_DWORD:0001
; set "name3" = REG_BINARY:00 af 99 cd
set "ExtraPorts" = REG_SZ:"$server_extraports_value_of$"
set "QueryTimeout" = REG_DWORD:$server_querytimeout_value_of$
set "QueryAcceptOnTimeout" = REG_DWORD:$server_queryacceptontimeout_value_of$
set "LocalInputPriorityTimeout" = REG_DWORD:$server_localinputprioritytimeout_value_of$
set "LocalInputPriority" = REG_DWORD:$server_localinputpriority_value_of$
set "BlockRemoteInput" = REG_DWORD:$server_blockremoteinput_value_of$
set "BlockLocalInput" = REG_DWORD:$server_blocklocalinput_value_of$
set "IpAccessControl" = REG_SZ:"$server_ipaccesscontrol_value_of$"
set "RfbPort" = REG_DWORD:$server_rfbport_value_of$
set "HttpPort" = REG_DWORD:$server_httpport_value_of$
set "DisconnectAction" = REG_DWORD:$server_disconnectaction_value_of$
set "AcceptRfbConnections" = REG_DWORD:$server_acceptrfbconnections_value_of$
set "UseVncAuthentication" = REG_DWORD:$server_usevncauthentication_value_of$
set "UseControlAuthentication" = REG_DWORD:$server_usecontrolauthentication_value_of$
set "LoopbackOnly" = REG_DWORD:$server_loopbackonly_value_of$
set "AcceptHttpConnections" = REG_DWORD:$server_accepthttpconnections_value_of$
set "LogLevel" = REG_DWORD:$server_loglevel_value_of$
set "EnableFileTransfers" = REG_DWORD:$server_enablefiletransfers_value_of$
set "RemoveWallpaper" = REG_DWORD:$server_removewallpaper_value_of$
set "UseMirrorDriver" = REG_DWORD:$server_usemirrordriver_value_of$
set "EnableUrlParams" = REG_DWORD:$server_enableurlparams_value_of$
set "AlwaysShared" = REG_DWORD:$server_alwaysshared_value_of$
set "NeverShared" = REG_DWORD:$server_nevershared_value_of$
set "DisconnectClients" = REG_DWORD:$server_disconnectclients_value_of$
set "PollingInterval" = REG_DWORD:$server_pollinginterval_value_of$
set "AllowLoopback" = REG_DWORD:$server_allowloopback_value_of$
set "GrabTransparentWindows" = REG_DWORD:$server_grabtransparentwindows_value_of$
set "SaveLogToAllUsersPath" = REG_DWORD:$server_savelogtoalluserspath_value_of$
set "RunControlInterface" = REG_DWORD:$server_runcontrolinterface_value_of$
[LinkFolder_install]