GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV 25
→
Usando SWITCH Dialog() ou If YesNo()
Usando SWITCH Dialog() ou If YesNo()
Iniciado por Boller, dez., 16 2020 7:36 PM - Sem resposta
Conecte-se…
Boller
#1
Membro registado
3.651 mensagems
Popularité : +175 (223 votes)
Publicado em dezembro, 16 2020 - 7:36 PM
//1 : Sim
//2 : Não
SWITCH
Dialog
(
"Deseja criar as regras de liberação do Firewall?"
)
CASE
1
//Libera Firewall
s
LiberarPortaEntradaRadmin
is string
=
"netsh advfirewall firewall add rule name="
+
Charact
(
34
)
+
"Radmin Open IN Port"
+
Charact
(
34
)
+
" protocol=TCP dir=IN localport=4899 action=allow"
s
LiberarPortaSaidaRadmin
is string
=
"netsh advfirewall firewall add rule name="
+
Charact
(
34
)
+
"Radmin Open OUT Port"
+
Charact
(
34
)
+
" protocol=TCP dir=OUT localport=4899 action=allow"
s
LiberaProgINWxTarifador
is string
=
"netsh advfirewall firewall Add rule name="
+
Charact
(
34
)
+
"Wx Tarifador Open IN"
+
Charact
(
34
)
+
" dir=IN program="
+
Charact
(
34
)
+
"c:\Program files\WxTarifador\WxTarifador.exe"
+
Charact
(
34
)
+
" action=allow"
s
LiberaProgOUTWxTarifador
is string
=
"netsh advfirewall firewall Add rule name="
+
Charact
(
34
)
+
"Wx Tarifador Open OUT"
+
Charact
(
34
)
+
" dir=OUT program="
+
Charact
(
34
)
+
"c:\Program files\WxTarifador\WxTarifador.exe"
+
Charact
(
34
)
+
" action=allow"
s
Mensagem
is string
=
"@Echo off"
+
CR
+
CR
+
"cls"
+
CR
+
CR
+
"echo Abra o MS-DOS com o direito do mouse como administrador e execute essas regras de firewall"
s
PathAtual
is string
=
"cd\"
+
CR
+
CR
+
"cd "
+
fCurrentDir
(
)
s
AbreFirewall
is string
=
s
Mensagem
+
CR
+
CR
+
s
PathAtual
+
CR
+
CR
+
s
LiberarPortaEntradaRadmin
+
CR
+
CR
+
s
LiberarPortaSaidaRadmin
+
CR
+
CR
+
s
LiberaProgINWxTarifador
+
CR
+
CR
+
s
LiberaProgOUTWxTarifador
+
CR
+
CR
+
"pause"
fSaveText
(
fCurrentDir
(
)
+
"\Firewall.txt"
,
s
AbreFirewall
)
ExeRun
(
"notepad.exe "
+
fCurrentDir
(
)
+
"\Firewall.txt"
,
exeActive
,
True
)
Info
(
"Caso não funcione abra o prompt do msdos como administrador e execute esses comandos do bloco de notas que vão criar as regras de liberação de entrada e saida dos programas: Radmin e Wxtarifador"
)
CASE
2
END
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Denunciar
0
0
→ Voltar para WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto