procedure TMainForm.DeleteReg;
var reg2:TRegistry;
begin
//Delete the Android stuff
reg2:=TRegistry.Create(KEY_WRITE);
reg2.RootKey:= HKEY_CLASSES_ROOT;
reg2.Access := KEY_ALL_ACCESS;
reg2.DeleteKey('AndroidApplication\shell\Install Application\command');
reg2.DeleteKey('AndroidApplication\shell\Install Application');
reg2.DeleteKey('AndroidApplication\shell');
reg2.DeleteKey('AndroidApplication');
reg2.DeleteKey('.apk');
reg2.Free;
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil) ;
end;
sumber: http://forum.lazarus.freepascal.org/index.php?topic=20919.0
Biar lebih jelas langsung kita praktekan saja!!!
Umpamanya kita ingin mengkonfigurasi Kartu jaringan kita dengan nama “Local Area Connection” , IP Address static 192.168.1.3, subnet mask 255.255.255.0 , default gateway 192.168.1.1 dan gateway interface matrix 0, maka dari command prompt window(cmd.exe) kita ketik perintah :
* Configure interfaces
* Configure routing protocols
* Configure filters
* Configure routes
* Configure remote access behavior for Windows-based remote access routers that are running the Routing and Remote Access Server (RRAS) Service
* Display the configuration of a currently running router on any computer
* Use the scripting feature to run a collection of commands in batch mode against a specified router.
Sumber : http://abrassia.wordpress.com/
Umpamanya kita ingin mengkonfigurasi Kartu jaringan kita dengan nama “Local Area Connection” , IP Address static 192.168.1.3, subnet mask 255.255.255.0 , default gateway 192.168.1.1 dan gateway interface matrix 0, maka dari command prompt window(cmd.exe) kita ketik perintah :
netsh interface ip set address name=”Local Area Connection” static 192.168.1.5 255.255.255.0 192.168.1.1 0untuk multiple IP address dalam satu lancard(ip virtual kalo di linux pakai ifconfig eth0:1) kita bisa kasih command :
netsh interface ip add address name=” Local Area Connection ” addr=172.16.5.3 mask=255.255.0.0Untuk konfigurasi Preferred DNS Server kita bisa ketik perintah
netsh interface ip set dns name=”Local Area Connection” static 192.168.1.1sedangkan konfigurasi Alternate DNS Server kita bisa ketik perintah
netsh interface ip add dns name=”Local Area Connection” 192.168.1.2atau seandainya kita menginginkan IP address dan DNS Server otomatis dari DHCP server kita bisa berikan perintah
netsh interface ip set address “Local Area Connection” dhcp
netsh interface ip set dns “Local Area Connection” dhcpPerintah netsh.exe juga sangat berguna jika kita punya laptop yang harus gonta-ganti ip address statis(rumah dan kantor). Setingan TCP/IP untuk dirumah kita simpan konfigurasinya dalam file rumah.txt, ketik command berikut :
netsh -c interface dump > c:\rumah.txtdan setingan TCP/IP untuk dikantor kita simpan konfigurasinya dalam file kantor.txt
netsh -c interface dump > c:\kantor.txtNah jika sudah kalo kita pingin ganti konfigurasi dari rumah ke kantor atau sebaliknya tinggal jalanin command :
netsh -f c:\kantor.txtatau
netsh -f c:\rumah.txtnetsh juga bisa digunakan untuk
* Configure interfaces
* Configure routing protocols
* Configure filters
* Configure routes
* Configure remote access behavior for Windows-based remote access routers that are running the Routing and Remote Access Server (RRAS) Service
* Display the configuration of a currently running router on any computer
* Use the scripting feature to run a collection of commands in batch mode against a specified router.
Sumber : http://abrassia.wordpress.com/