VBS ile .bat veya CMD komutları yürütmek

Ömer faruk der

Kilopat
Katılım
29 Kasım 2017
Mesajlar
8
Daha fazla  
Cinsiyet
Erkek
Merhaba öncelikle.
Yapmak istediğim şey aslında şu googbyedpi programını kendi BAT dosyası yerine VBS ile açmak istiyorum ekranda kalan komut penceresi sinir bozucu oluyor.
Simge durumuna almakta hemen hemen aynı şey aşağıda ek bir program falan olsun istemiyorum her şey arka planda hallolsun.

Yani istediğim şey:

Kod:
Set wshshell = createobject("wscript. Shell")
Wshshell. Run chr(34) & "goodbyedpi.exe" & chr(34), 0
Set wshshell = nothing.

Burada goodbyedpi.exe dosyasını

[USER=82557]@Echo[/USER] off.
Pushd "%~DP0"
Set _arch = X86.
If "%processor_archıtecture%"=="AMD64" (set _arch = X86_64)
If defıned processor_archıtew6432 (set _arch = X86_64)
Pushd "%_arch%"

Start "" goodbyedpi.exe -5 --DNS-addr 77.88.8.8 --DNS-port 1253 --dnsv6-addr 2A02:6b8::feed:0ff --dnsv6-port 1253.

Popd.
Popd.

Bu komutlar ile başlatmak ve bunu VBS ile yapmak.
 
Kod:
Set wshShell = CreateObject("WScript.Shell")
Dim exePath, args

exePath = WScript.ScriptFullName
exePath = Left(exePath, InStrRev(exePath, "\")) & "goodbyedpi.exe"
args = "-5 --dns-addr 77.88.8.8 --dns-port 1253 --dnsv6-addr 2a02:6b8::feed:0ff --dnsv6-port 1253"

wshShell.Run Chr(34) & exePath & Chr(34) & " " & args, 0
Set wshShell = Nothing


Bunu VBS olarak kaydedip dene
 
Kod:
Set wshShell = CreateObject("WScript.Shell")
Dim exePath, args.

exePath = WScript.ScriptFullName
exePath = Left(exePath, InStrRev(exePath, "\")) & "goodbyedpi.exe"
args = "-5 --dns-addr 77.88.8.8 --dns-port 1253 --dnsv6-addr 2a02:6b8::feed:0ff --dnsv6-port 1253"

wshShell.Run Chr(34) & exePath & Chr(34) & " " & args, 0
Set wshShell = Nothing.

Bunu VBS olarak kaydedip dene.

Oldu eline sağlık teşekkür ederim.
 

Technopat Haberler

Geri
Yukarı