UltraVNC.fr
UltraVNC & logiciels liés => SC => Discussion démarrée par: TC69 le 30 avril 2008, 15:17:12
-
Salut,
Pour ceux que ça intéresse, j’ai une solution qui fonctionne plutôt bien pour Vista,
Grace au lien envoyé par Wenceslas https://forum.ultravnc.fr/index.php/topic,831.0.html
Je me suis bricolé un ptit VBs qui test l’OS sur lequel est lancé SC et envois les bonne commandes pour désactiver aero ! En plus je passe les proxy en renseignant les variables ‘http_proxy_user’ & ‘http_proxy_password’ merci à JL56…
Plus d’explications :
Dans mon .exe (sfx) je lance un .hta via lequel je rentre mon compte proxy, je test la version de Windows et je lance Winvnc.
*********
SUB teledemo
‘Test de la version d’OS
*******************
SUB teledemo
on error resume next
'-------Test de l’os---------------
Set objWMIService = GetObject("winmgmts://" & strComputer)
Set colitems = objWMIService.ExecQuery ("SELECT * FROM Win32_OperatingSystem")
For Each objItem in colItems
resultOS = objitem.Version
next
'-----------------------------
'-------var d'env 'process' pour le proxy ----
Set Shell = createobject("wscript.shell")
set VarEnvUser = shell.environment("process")
ver=left(resultos,1)
if ver = "6" then ' ------ 6 pour Vista ; 5 pour Wxp-----
'----variable on pour le proxy--
VarEnvUser("http_proxy_user") = compte.value '-----via le hta
VarEnvUser("http_proxy_password") = password.value '----via le hta
'----aero off-----------------
Shell.exec"Rundll32.exe dwmApi #104"
'----- Lancement de winvnc------
Shell.run("%temp%\winvnc"),,true
'----variable off--------------
VarEnvUser("http_proxy_user") = ""
VarEnvUser("http_proxy_password") = ""
'-----validation d’ aero------------
Shell.exec"Rundll32.exe dwmApi #102"
‘-------proxy par defaut -----------
set regmod = CreateObject("WScript.Shell")
regmod.RegWrite
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\AutoConfigURL","http://xxxxxx.fr/proxypac/proxy.pac","REG_SZ"
regmod.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable",0,"REG_DWORD"
window.close()
else '------si non vista----
'----variable on pour le proxy--
VarEnvUser("http_proxy_user") = compte.value
VarEnvUser("http_proxy_password") = password.value
shell.run("%temp%\winvnc.exe"),,true
'variable off
VarEnvUser("http_proxy_user") = ""
VarEnvUser("http_proxy_password") = ""
'proxy off
set regmod = CreateObject("WScript.Shell")
regmod.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\AutoConfigURL","http://xxxxxxxx.fr/proxypac/proxy.pac","REG_SZ"
regmod.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable",0,"REG_DWORD"
window.close()
end if
End Sub 'teledemo******
-
Bonjour tc69
Génial et merci pour ce script
je l'integrerai dans mes scripts autoit
apres avoir detecté vista tu desactive l'areo par
Shell.exec"Rundll32.exe dwmApi #104"
puis apres vnc tu réactive par
Shell.exec"Rundll32.exe dwmApi #102"
par contre je n'ai pas compris l'utilité de
set regmod = CreateObject("WScript.Shell")
regmod.RegWrite
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\AutoConfigURL","http://xxxxxx.fr/proxypac/proxy.pac","REG_SZ"
regmod.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable",0,"REG_DWORD"
window.close()
c'est quoi "http://xxxxxx.fr/proxypac/proxy.pac"
est ce que c'est le proxy du lieu ou tu te trouve
merci de préciser
a+ JL56
-
Salut,
Oui c’est ça : ‘’Shell.exec Rundll32.exe dwmApi #104’’ pour désactiver Aero et ‘’Shell.exec Rundll32.exe dwmApi #102’’ pour le réactiver.
Pour ‘http://xxxxxx.fr/proxypac/proxy.pac’ c’est un script de proxy utilisé par ma boite mais qui ne me permet pas de sortir …
Donc j’attaque le proxy en directe et là sa passe :
set regmod = CreateObject("WScript.Shell")
regmod.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer","192.168.158.01","REG_SZ"
regmod.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable",1,"REG_DWORD"
En fin de session je remet le proxy par défaut.
‘-------proxy par defaut -----------
set regmod = CreateObject("WScript.Shell")
regmod.RegWrite
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\AutoConfigURL","http://xxxxxx.fr/proxypac/proxy.pac","REG_SZ"
regmod.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable",0,"REG_DWORD"
window.close()
A+
Thierry
-
merci à toi TC69 et félicitations pour ton script ;)
++
benjy
-
Salut TC69,
Merci beaucoup de partager ce script ;)
++
Wens