Jump to content
Sign in to follow this  
takberapapandai

Antara Dos Batch Cmd Dan Windows Scripting

Recommended Posts

Salam,

Kalau dalam Dos kita ada dos batch command, yg mana kita boleh buat file .bat bagi mengexecute kan command command dos mcam copy, del dan sebagainya.

Kalau dlm windows (98 dan XP) adakah ia dipanggil Windows script.

Contohnya ; ( aku ambil dari program keylogger script .ahk)

Run, C:\Program Files\Equis\The DownLoader\Dlwin.exe

WinWait, The DownLoader,

IfWinNotActive, The DownLoader, , WinActivate, The DownLoader,

WinWaitActive, The DownLoader,

MouseClick, left, 322, 63

Sleep, 100

Aku tak berapa clear tentang windows scripting sebab kalau search ada banyak mcm ; vbscript, jscript, windows script host (wsh), entah apa lagi.

Tapi yg aku tengok scripting dlm program AutoHotKey ni, best, macam buat batch cmd.

tq ph34r.gif

Share this post


Link to post
Share on other sites

tq. ;)

APA YG AKU FAHAM :blink:

WSH vs. Cmd.exe

At this point, it might be useful to briefly compare WSH and Cmd.exe, the command-line interpreter found in Windows. Both are scripting environments: WSH allows you to run WSH scripts; Cmd.exe allows you to run batch files (sometimes referred to as shell scripts). Both WSH and Cmd.exe require interaction with scripting languages and scripting tools: It is difficult to write useful scripts with nothing more than WSH, and it is difficult to write useful batch files with nothing more than the shell language.

TAPI APA YG AKU SUKA B)

Does this mean that you should throw away all your command-line tools and batch files and switch exclusively to WSH? Of course not if you have a solution that works, there is no reason to get rid of it. But for problems that batch files and command-line tools cannot solve, WSH, with its access to the myriad capabilities of VBScript, JScript, WMI, ADSI, and other Automation objects, might provide the solution you have been looking for.

Aku ni dulu dulu DOS punya programmer, lepas tu cuba belajar OOP tapi sebab sibuk buat maintenance , satu jadah windows pun aku tak ingat. Tapi sampai la ni DOs program aku masih running kat opis, cuma org dah menyampak tengok barang usang. Cuba upgrade, panggil vendor utk buat sampai la ni tak settle.

Share this post


Link to post
Share on other sites

cmd.exe batch language dalam windows xp bleh dikatakan power.. dan next windows pun batch language masih ader, cuma ngan nama lain laaa....

Share this post


Link to post
Share on other sites

DOS Batch Command:

- die ni cume command dos yang bese (xcopy, ping, color, date etc...)

- cume kte sekalikan dlm satu file(sava as .cmd / .bat)

- berguna kalo nk wat scheduling ke ape ke. (ada satu script aku pki nk execute java :lol: )

Windows Scripting :

- mcm2 ada...

- vbscript ni subset VB ()

- jscript plak mcm javascript (rs mcm sm je, nm je ln :P )

p/s: aku ada rujukan wsh, kalo nk gtau la..

Share this post


Link to post
Share on other sites

tambah sikit lagi,

WSH adalah hos dier, built-in dalam windows os sejak Win 98SE (kalau tak salah)..

WSH mampu melarikan script yang ditulis dalam vbscript dan jscript (boleh dikatakan javascript versi microsoft).

dalam bahasa mudah, WSH umpama pelakon, script adalah umpama skrip le, pelakon melakonkan mende yang ditulis dalam script :)

DOS batch bagi microsoft sudah dikira obselete..

dgn WSH dan script..byk mende2 best yang ko boleh buat..cth ko bole start program secara remote on another pc, boleh manipulate individual hardware (network card, sound card etc), bole buat brute force engine untuk guess password dan mcm2..

kalau ko power, ko boleh write virus gune WSH wth vbscript or jscript nie.

Share this post


Link to post
Share on other sites

windows scripting senang nak panggil ActiveX. wsh just script yang akan 'dihost' oleh wscript.exe (window style) and cscript.exe (console)

.cmd + .bat just call internal command (dari cmd.exe or command.com) and other .exe or .com file (basically dos executable dan depend kat return value iaitu errorlevel).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...