tag:blogger.com,1999:blog-165301262024-02-20T23:27:38.274+08:00Alon alon waton kelakonwatonhttp://www.blogger.com/profile/14269395051987615888noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-16530126.post-45657973249292635142014-02-19T12:13:00.000+08:002014-02-19T12:29:39.333+08:00Delphi SNMPSNMP di Delphi XE2 menggunakan <a href="http://www.indyproject.org/Sockets/index.EN.aspx">Indy</a>. Berikut ini adalah contoh sederhana cara penggunaanya.<br />
<br />
GET Request:<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">procedure TForm3.Button1Click(Sender: TObject);</span><br />
<span style="font-family: Courier New, Courier, monospace;">var</span><br />
<span style="font-family: Courier New, Courier, monospace;"> mib : string;</span><br />
<span style="font-family: Courier New, Courier, monospace;">begin</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1 := TIdSNMP.Create;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> mib := '1.3.6.1.4.1.6247.24.1.2.3.1.0';</span><br />
<span style="font-family: Courier New, Courier, monospace;"> try</span><br />
<span style="font-family: Courier New, Courier, monospace;"> </span><span style="font-family: 'Courier New', Courier, monospace;">IdSNMP1.Host := '192.168.2.10';</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1.Community := 'wublic';</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1.Query.Clear;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1.Query.PDUType := PDUGetRequest;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1.Query.MIBAdd(mib,'');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> if IdSNMP1.SendQuery then</span><br />
<span style="font-family: Courier New, Courier, monospace;"> Edit2.Text := IdSNMP1.Reply.MIBGet(mib);</span><br />
<span style="font-family: Courier New, Courier, monospace;"> finally</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1.Free;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> end;</span><br />
<span style="font-family: Courier New, Courier, monospace;">end;</span><br />
<br />
GET Request bisa juga menggunakan QuickSend :<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">procedure TForm2.Button1Click(Sender: TObject);</span><br />
<span style="font-family: Courier New, Courier, monospace;">begin</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1 := TIdSNMP.Create;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> try</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1.QuickSend('1.3.6.1.4.1.6247.24.1.2.3.1.0', 'wublic', '192.168.2.10', val);</span><br />
<span style="font-family: Courier New, Courier, monospace;"> ShowMessage(val);</span><br />
<span style="font-family: Courier New, Courier, monospace;"> finally</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1.Free;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> end;</span><br />
<span style="font-family: Courier New, Courier, monospace;">end;</span><br />
<br />
<br />
<span style="font-family: inherit;">SET request:</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">procedure TForm3.Button2Click(Sender: TObject);</span><br />
<span style="font-family: Courier New, Courier, monospace;">begin</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1 := TIdSNMP.Create;</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;"> try</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1.Host := '192.168.2.10';</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1.Community := 'private';</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1.Query.Clear;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1.Query.PDUType := PDUSetRequest;</span><span style="font-family: 'Courier New', Courier, monospace;"> IdSNMP1.Query.MIBAdd('1.3.6.1.4.1.6247.24.1.2.3.1.0', '71000000', 2);</span><br />
<span style="font-family: Courier New, Courier, monospace;"> if IdSNMP1.SendQuery then ShowMessage('Success');</span><br />
<span style="font-family: Courier New, Courier, monospace;"> finally</span><br />
<span style="font-family: Courier New, Courier, monospace;"> IdSNMP1.Free;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> end;</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">end;</span><br />
<br />watonhttp://www.blogger.com/profile/14269395051987615888noreply@blogger.com0tag:blogger.com,1999:blog-16530126.post-87576420268099592532009-12-07T15:38:00.001+08:002009-12-07T15:38:08.854+08:00Mengembalikan boot.ini Windows XP<div xmlns='http://www.w3.org/1999/xhtml'>File boot.ini gak tau gimana ceritanya bisa hilang. Biasanya ada di root folder (C:). Contohnya:<br/><font face='Courier New'>[boot loader]<br/>timeout=30<br/>default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS<br/>[operating systems]<br/>multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect</font><br/>Kalau sedang menggunakan Recovery Console bisa diperbaiki dengan perintah <b>BOOTCFG /rebuild </b><br/><br/><br/><br/></div>watonhttp://www.blogger.com/profile/14269395051987615888noreply@blogger.com0tag:blogger.com,1999:blog-16530126.post-84122694357477369012009-12-07T15:28:00.001+08:002009-12-07T15:28:22.922+08:00NTLDR is missing<div xmlns='http://www.w3.org/1999/xhtml'>Windows XP gak bisa start, cuman muncul<b> NTLDR is missing press Ctrl+Alt+Del to restart</b>. Bagaimana cara memperbaikinya. <br/><ol><li>Start komputer dengan CD installer Windows XP.</li><li>Tekan R setelah muncul Welcome to Setup dan ada pilihan press R to start the Recovery Console</li><li>Muncul pilihan Windows.Ketik 1 dan tekan Enter</li><li>Masukkan password administrator atau tekan Enter</li><li>Ketik perintah ini dan ganti X dengan nama CD ROM drive misalnya D atau E<br/><b>COPY X:\i386\NTLDR C:<br/>COPY X:\i386\NTDETECT.COM C:</b></li><li>Ketik exit</li></ol></div>watonhttp://www.blogger.com/profile/14269395051987615888noreply@blogger.com0tag:blogger.com,1999:blog-16530126.post-87040247178910503322009-12-07T15:08:00.001+08:002009-12-07T15:08:30.889+08:00MS Office SKU011.CAB hilang<div xmlns='http://www.w3.org/1999/xhtml'>Kemarin nemu problem pada MSOffice 2003, kalau dibuka muncul pesan kesalahan SKU011.CAB missing. Karena gak ada CD instalasinya akhirnya utak-atik registry saja:<br/><ol><li>Buka regedit. Klik Start-> Run -> ketik regedit.</li><li>Buka HKEY_LOCAL_MACHINE -> Software -> Microsoft -> Office -> 11.0 -> Delivery</li><li>Ada direktori dibawah Delivery namanya {90000409-6000-11D3-8CFE-0150048383C9}. Pilih direktori ini, kemudian disebelah kanan ada <b>CDCache</b>. Klik 2 kali pada CDCache dan ganti value data menjadi <b>0</b>.</li></ol><br/></div>watonhttp://www.blogger.com/profile/14269395051987615888noreply@blogger.com0tag:blogger.com,1999:blog-16530126.post-56710061927492493712009-12-05T11:33:00.001+08:002009-12-05T11:42:38.606+08:00Memperbarui Product Key Windows XP<div xmlns='http://www.w3.org/1999/xhtml'>Bagaimana cara mengganti produk key dari Windows XP yang sudah terpasang ? Ini caranya:<ol><li>Klik Start -> Run</li><li>Ketik Regedit dan klik OK</li><li>Cari registry ini: <b>HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Current Version\WPAEvents</b> bisa juga dengan klik Edit->Find dan masukkan kata 'WPAEvents'</li><li>Klik dua kali pada OOBETimer dan ganti salah satu huruf misalnya FF jadi DD kemudian klik OK</li><li>Klik Start -> Run</li><li>Ketik <b>%systemroot%\system32\oobe\msoobe.exe /a</b></li><li>Klik <b>Yes,I want to telephone a customer service representative to activate Windows</b> kemudian klik <b>Next</b></li><li>Klik <b>Change Product key</b></li><li>Isikan product key yang baru dan klik <b>Update</b></li><li>Klik <b>Remind me later</b></li><li>Restart komputer</li><li>Jalankan lagi <b>%systemroot%\system32\oobe\msoobe.exe /a</b> untuk memastikan suksesnya, pesan<b> Windows is already activated. Click OK to exit</b> akan muncul kalau sukses. <br/></li></ol>Atau bisa juga menggunakan <a href='http://download.microsoft.com/download/8/3/7/83712767-395c-4327-8e87-38be7b0cf75f/KeyUpdateTool_enu.exe'>Windows Product Key Update Tool</a> dari Microsoft</div>watonhttp://www.blogger.com/profile/14269395051987615888noreply@blogger.com0tag:blogger.com,1999:blog-16530126.post-2479584767614099022009-12-05T11:09:00.001+08:002009-12-05T11:09:01.049+08:00Instalasi Recovery Console Windows XP<div xmlns='http://www.w3.org/1999/xhtml'>Saya sering menemui problem Windows XP yang bisa diatasi dengan Recovery Console dari CD instalasi Windows XP. Ternyata Recovery Console juga bisa dipasang di hard disk dan dimunculkan pada pilihan boot. Cara instalasinya:<br />1. Masukkan CD ke drive<br />2. Klik Start -> Run<br />3. Ketik perintah berikut ( dimana X: adalah nama CD drive) kemudian tekan ENTER<br /> <b>X:\i386\winnt32.exe /cmdcons</b><br />4. Klik OK dan ikuti instruksi untuk menyelesaikan setup.</div>watonhttp://www.blogger.com/profile/14269395051987615888noreply@blogger.com0