Oracle, Web, Script, SQLserver, Tips & Trick

November 18, 2017

How to Install DosBox with QBASIC

Filed under: dos,qbasic — sikathabis @ 10:35 pm
Tags: , , ,
  1. First you must download dosbox on this link
    https://www.dosbox.com/download.php?main=1
    If your Operating System (OS) Windows choose Windows, if your OS Mac OS X
  2. Download QBASIC on this link http://www.qbasic.net/en/qbasic-downloads/compiler/qbasic-interpreter.htm
  3. Extract zip file from point 2 to new folder example c:\oldDos\qbasic
  4. Run DosBox , shortcut on the Desktop or programs Clipboard01
  5. Type mount C c:\oldDos
  6. Type c:\
  7. Type CD\qbasic
  8. Type Qbasic, now you can use Qbasic

 

Advertisements

December 2, 2016

How to get http from cmd (dev 6i)

Filed under: dev6i,dos,oracle,windows — sikathabis @ 8:05 pm
Tags: , , , ,

I have an application using oracle developer 6i (dev 6i). The application must communicate with the website to get the result. For example: If the application click the button then will access http: // localhost /show, and then the result “It works” showing to the application

I found winhttpjs.bat ( https://github.com/npocmaka/batch.scripts/blob/master/hybrids/jscript/winhttpjs.bat )

CMD> call winhttpjs.bat http://localhost/show -saveTo result.txt

If the result

CMD> Status: 200 OK

then file result.txt contained the result of website It work’s

If the result

CMD>  A connection with the server could not be established

then file result.txt contained The system cannot find the file specified.

To get the result for dev6i I’m using HOST to get the result and TEXT_IO for retrive text file (result.txt)

Download ~ winhttpjs-bat (erase .doc)

June 9, 2016

Print using default printer on local computer (Oracle Developer 6i, windows)

Filed under: dev6i,oracle,windows — sikathabis @ 7:29 am
Tags: , , , , ,

this example, I want to show you how to automate print using default printer on local computer.

PROCEDURE GENERATE_VALIDATION (ID1 number, ID2 number, ID3 DATE) IS
    PL_ID PARAMLIST;
    filename varchar2(255);
    teks varchar2(255);
    IN_FILE TEXT_IO.FILE_TYPE;
BEGIN
    pl_id := Create_Parameter_List('TEMP'); 
    ADD_PARAMETER(PL_ID,'ID_1',TEXT_PARAMETER,ID1);
    ADD_PARAMETER(PL_ID,'ID_2',TEXT_PARAMETER,ID2);
    ADD_PARAMETER(PL_ID,'ID_3',TEXT_PARAMETER,ID3);
--this statement for get default printer and generate to text file
    host('CMD /C wmic printer where default=''TRUE'' get name > '||filename,NO_SCREEN);
--because wmic generate 3 lines, this statement for get only line where the 
--default printer located

    host('CMD /C Powershell "Get-Content '||filename||' | Select-Object -Index 1" > '||filename||'.txt', NO_SCREEN );
    begin
        IN_FILE  := TEXT_IO.FOPEN(filename||'.txt', 'r');   
        TEXT_IO.GET_LINE(IN_FILE,TEKS);
        --Trim TEKS, because there is spaces after default printer name
        TEKS := LTRIM(RTRIM(TEKS));
        TEXT_IO.FCLOSE(IN_FILE);
    exception when others then
        TEXT_IO.FCLOSE(IN_FILE);
    end;  

--erase temporary files

    host('CMD /R DEL '||filename||'.*',NO_SCREEN);    

--if there's default printer then automate print default printer on local computer

    if TEKS is null then
         ADD_PARAMETER(PL_ID,'DESTYPE',TEXT_PARAMETER,'PRINTER');
         ADD_PARAMETER(PL_ID,'DESNAME',TEXT_PARAMETER,TEKS);
--if there's no default printer then show your report
    else
         ADD_PARAMETER(PL_ID,'DESTYPE',TEXT_PARAMETER,'SCREEN');
    end if;     
    Add_Parameter(pl_id,'PARAMFORM', TEXT_PARAMETER, 'NO');
    Add_Parameter(pl_id,'PRINTJOB',  TEXT_PARAMETER,'YES'); 

    Run_Product(REPORTS,'VALIDATION', SYNCHRONOUS, RUNTIME,FILESYSTEM, pl_id, NULL);     
    Destroy_Parameter_List(pl_id);
END;

Reference: https://technet.microsoft.com/en-us/library/hh849895.aspx | https://adamstech.wordpress.com/2010/11/1 | http://stackoverflow.com/questions/17217476..

Notes: For windows XP/2003 you must install powershell, here’s the links:

  1. Microsoft .NET Framework 2.0 Service Pack 1 (x86)
  2. Update for Windows XP (KB968930): includes Windows PowerShell 2.0 and Windows Remote Management (WinRM) 2.0
  3. Update for Windows 2003

 

April 15, 2016

How to know all list printer on network

Filed under: dos,network — sikathabis @ 10:45 am
Tags: , , ,

@echo off

SETLOCAL ENABLEDELAYEDEXPANSION
for /f "tokens=2 delims==" %%a in ('wmic printer get name /value') do (
    set printer=%%a
    if defined printer (
      if "!printer:~0,2!"=="\\" (
        echo !printer! >> "C:\file.txt"
      )
    )
)
ENDLOCAL
echo on

reference: https://community.spiceworks.com/topic/365018-list-network-printers-via-batch-file

February 25, 2013

Testing many connection to GraphOn using script

Filed under: dos — sikathabis @ 4:41 pm
Tags: ,

Example 100 connection

@echo off
mkdir boom
FOR %%A IN (101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200) DO echo “C:\Program Files (x86)\GraphOn\GO-Global\Client\gg-client.exe” -h IPADDRESS -u DOMAIN\USERNAME%%A -p DOMAIN -a SHORTCUTNAME >  .\boom\n%%A.bat
explorer  .\boom

Open all n101.bat to n200.bat file and all the connection began.

To kill them, create shortcut on the desktop example %windir%\system32\taskkill.exe /IM gg-client.exe

Example to create many users incremental using cmd

Filed under: dos — sikathabis @ 4:12 pm
Tags: ,

Copy this script and save to batch file, or run from cmd

echo FOR %%A IN (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600) DO NET USER USER%%A PASSWORD /ADD /DOMAIN > create_user.bat
create_user.bat

pause

When you run the script, then automating create to user

USER001
(more…)

February 9, 2013

Membuat Startup batch file untuk generate net use LPT1

Filed under: dos — sikathabis @ 8:44 am
Tags: ,

Prakata

Jaman sekarang ini, komputer/laptop dengan spec tinggi yang mempunyai port LPT1 (Printer) jarang ditemukan, biasanya LPT3 atau USB….

Ada beberapa aplikasi yang membutuhkan koneksi  ke LPT1, oleh karena itu dibutuhkan alias untuk dapat tetap menggunakan port LPT1

Langkah 1 – Buat batch file (create_lpt1.bat)

@ECHO OFF
Echo Membuat auto eksekusi LPT1 pada komputer client
 (more...)

January 15, 2013

Membuat procedure delay pada Quick Basic

Filed under: dos,qbasic — sikathabis @ 3:48 am
Tags: ,
SUB DELAY (SECOND!) STATIC

BEGIN! = TIMER
DO UNTIL (TIMER - BEGIN! > SECOND!) OR (TIMER - BEGIN! < 0)
LOOP

END SUB

‘cara penggunaan

DELAY 0.5 'maksudnya akan ada jeda (delay) selama 1/2 detik

December 6, 2012

Membuat report dan teknik switching dalam Quick Basic

Filed under: dos,qbasic — sikathabis @ 8:16 am
Tags: ,

Contoh output Laporan

report

Contoh Output teknik switching

kw1

Download teknik switching

Download source laporan dan switching

Download SWITCHING

July 7, 2012

Search keyword in file(s) using findstr on command (batch/dos/windows)

Filed under: dos — sikathabis @ 9:02 am
Tags:

purpose:

search keyword from one file or many files

example:

For example you want to search all keyword Ari Wibawa on all file with extension 500 in the folder

example 1:

findstr /C:”Ari Wibawa” *.500

result 1:

D:\vbs\JL\output>findstr /C:”Ari Wibawa” *.500
R0131_GLR00002.500: (more…)

Next Page »

Blog at WordPress.com.

Learning is not a spectator sport

Connor McDonald's Oracle blog

Teknologi Pendidikan

Just another WordPress.com weblog

KATAKAMI

Jurnalisme Yang Dapat Dipercaya

Qey050489's Blog

Ayo Bangkit sobat..!!!!!

B. S. Totoraharjo

Orang Bodoh Yang Tak Kunjung Pandai

culturekitchen foodlab

New Food and Art in Yogyakarta

Wahyu Catur Wibowo

Musafir Dunia Maya

SQL.... Still Learning

My Reference on SQL Server

arihdyacaesar

"A distance is getting far if your heart is impatient" -ean-

neinframe

Street Photography is like a box of a chocolates, you're never know what you're gonna get - Thomas Leuthard -

Keluarga Andrivito

-- Andrivito's Journal --

DRK™

This site is about Latest NEWS, Articles, Videos, Books, Course, Presentations, Tips & Tricks related to I.T Pro's

Gaurav Saxena

|| तत् त्वम् असि ||

Be a good Moeslim

Menuju Pribadi Muslim Sejati yang Bertaqwa

TuanSUFI

Manajemen Sholat, renungan spiritual, Teknologi Informasi

Pelangi di khatulistiwa....

Mari berbagi kebaikan, pengalaman dan senyum denganku

Angkasa13

Ceritanya saya, Pikirannya saya, Hatinya saya

sikathabis

sikathabis semua informasi disini