|
|
|
|
[Real VNC] Installation a distance
Dernière réponse le 22 mai 2008 à 17:41:19 gn1234567, le 18 oct 2005 à 13:59:33L'installation à distance n'est pas possible, et heureusement !
|
Le script AutoIt:
; Read password from depanvnc.ini file.
$password = IniRead("depanvnc.ini", "depanvnc", "password", "")
; Example: depanvnc.ini file:
;[depanvnc]
;password=mysecret
; If there is not password, abort.
if $password=="" Then
MsgBox (16, "Erreur", "Il manque le fichier depanvnc.ini.")
Exit(1)
EndIf
; Prevent user from doing stupid things
BlockInput(1)
; Show progress dialog
ProgressOn("Lancement de TightVNC, patientez...","Lancement de TightVNC, patientez...")
ProgressSet(5)
; Close VNC server if it's alreay running:
If ProcessExists("winvnc.exe") Then
ProcessClose("winvnc.exe")
ProcessWaitClose("winvnc.exe")
Sleep(1000)
EndIf
; Remove previous WinVNC settings from registry
RegDelete("HKEY_CURRENT_USER\SOFTWARE\ORL")
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\ORL")
; Start WinVNC:
Run("winvnc.exe")
ProgressSet(15)
AutoItSetOption("WinTitleMatchMode", 1) ; Exact title from beginning
WinWait("WinVNC: Current User Properties")
WinActivate("WinVNC: Current User Properties")
WinWaitActive("WinVNC: Current User Properties")
ProgressSet(50)
; Set the password:
Send($password) ; Set password
Send("{TAB}")
Send($password)
ProgressSet(75)
; Advanced configuration...
Send("!v")
; Ask confirmation if someone tries to connect:
WinWaitActive("WinVNC: Current User Advanced Properties")
ControlClick("WinVNC: Current User Advanced Properties","","Query console on incoming connections")
Send("!o") ; Click OK
Send("{ENTER}") ; Click OK on the main configuration Window.
ProgressSet(100)
ProgressOff()
BlockInput(0)
; Display user's IP address:
$ip = @IPAddress1
If $ip <> "0.0.0.0" Then
If $ip <> "127.0.0.1" Then
MsgBox (64, "Votre adresse IP", "Votre adresse IP est "&$ip)
EndIf
EndIf
$ip = @IPAddress2
If $ip <> "0.0.0.0" Then
If $ip <> "127.0.0.1" Then
MsgBox (64, "Votre adresse IP", "Votre adresse IP est "&$ip)
EndIf
EndIf
$ip = @IPAddress3
If $ip <> "0.0.0.0" Then
If $ip <> "127.0.0.1" Then
MsgBox (64, "Votre adresse IP", "Votre adresse IP est "&$ip)
EndIf
EndIf
$ip = @IPAddress4
If $ip <> "0.0.0.0" Then
If $ip <> "127.0.0.1" Then
MsgBox (64, "Votre adresse IP", "Votre adresse IP est "&$ip)
EndIf
EndIf
; Wait for the end of WinVNC to exit.
ProcessWaitClose("winvnc.exe")
; Remove registry settings (including password)
RegDelete("HKEY_CURRENT_USER\SOFTWARE\ORL")
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\ORL")
Exit(0)
|
Ce script va auto-configurer le serveur VNC et indiquer au client son adresse IP (qu'il devra te communiquer).
|
Et AutoIt et InnoSetup sont gratuits.
|
Merci pour les liens ...
|
Hello Sebsauvage,
; Display user's IP address: $ip = @IPAddress1 If $ip <> "0.0.0.0" Then If $ip <> "127.0.0.1" Then MsgBox (64, "Votre adresse IP", "Votre adresse IP est "&$ip) EndIf EndIf $ip = @IPAddress2 If $ip <> "0.0.0.0" Then If $ip <> "127.0.0.1" Then MsgBox (64, "Votre adresse IP", "Votre adresse IP est "&$ip) EndIf EndIf $ip = @IPAddress3 If $ip <> "0.0.0.0" Then If $ip <> "127.0.0.1" Then MsgBox (64, "Votre adresse IP", "Votre adresse IP est "&$ip) EndIf EndIf $ip = @IPAddress4 If $ip <> "0.0.0.0" Then If $ip <> "127.0.0.1" Then MsgBox (64, "Votre adresse IP", "Votre adresse IP est "&$ip) EndIf EndIf pourquoi dans cette partie du script, il y a autant de demande d'adresse IP ? Si tu pouvais m'aider, ce serait gentil. Je t'en remercie d'avance. Gérard, pas Pro dans le code du tout ... ;-) |
[depanvnc]
|
Répondre à sebsauvage
|
Bon c'est sûrement un peu tard. Mais on sait jamais.
|

