How to create a simple Backup script using windows HTA

Prerequisites:

  • a notepad (I recommend: notepad++)
  • some HTML knowledge
  1. Start a simple HTML page and add the following as the main structure:[xml]<head>
    <title>Backup Reminder</title>
    <HTA:APPLICATION
    APPLICATIONNAME=”Backup Reminder”
    ID=”myware”
    VERSION=”1.0″
    CAPTION=”yes”
    BORDER=”normal”
    SYSTEMMENU=”yes”
    MAXIMIZEBUTTON=”no”
    MINIMIZEBUTTON=”no”
    ICON=”gumware.ico”
    SCROLL=”no”
    SCROLLFLAT=”yes”
    SINGLEINSTANCE=”yes”
    CONTEXTMENU=”yes”/><style>
    img{border: 0px}
    input{color: blue; background-color: white; font-variant:small-caps;
    font-family: Arial,Helvetica,sans-serif; border: 1px solid blue}
    H1,H2,H3,H4,H5,H6,P,BODY,UL{font-family: Arial, Helvetica, sans-serif}
    </style>
    </head>[/xml] (more…)

Create a Data Generator using sequence and a loop in Oracle DB

Create a sequence (i.e. “tmp” starting with 10001) to be used in statements:

[sql]CREATE SEQUENCE TMP
START WITH 10001
MAXVALUE 9999999999999999999999
MINVALUE 1[/sql]

Enter the following in a DB-Tool editor:

[sql]begin
FOR Lcntr IN 1..10000
LOOP
insert into customer (surname, forname, some_id, some_field)
values (‘SN’ || tmp.nextval, ‘FN’ || tmp.nextval, 123456, ‘abcdef’);
END LOOP;
commit;
end;[/sql]

Output should be something like this:

[text]SN50076,FN50076,123456,abcdef
SN50077,FN50077,123456,abcdef
SN50078,FN50078,123456,abcdef
SN50079,FN50079,123456,abcdef
SN50080,FN50080,123456,abcdef
SN50081,FN50081,123456,abcdef[/text]

How to create a bootable usb to install Windows X

Firstly, insert your USB  (WARNING: the following steps will erase ALL DATA on selected USB!!).

Open a cmd prompt and type “diskpart” to start the partitioning program:

[bash]list disk # <– to list the disks on the system

# Disk ### Status Size Free Dyn Gpt
# ——– ————- ——- ——- — —
# Disk 0 Online 931 GB 3072 KB
# Disk 1 Online 1944 MB 0 B
# Disk 2 Online 7498 MB 0 B <– this will be our selected disk

select disk 2

# Disk 2 is now the selected disk.

clean

# DiskPart succeeded in cleaning the disk.

create primary partition

# DiskPart succeeded in creating the specified partition.

select partition 1

# Partition 1 is now the selected partition.

active # <– make the partition active

# DiskPart marked the current partition as active.

format fs=ntfs quick

assign # <– assign a letter to the drive

# DiskPart successfully assigned the drive letter or mount point.[/bash]

Your drive is now ready to copy a loaded iso DVD of your version of Windows.

 

How to fix VB application not running on Windows Vista, 7 or 8

Older VB application built on VB 5 or 6 may not work properly under the newer versions of Windows Vista, 7 or 8. The app may even require specific dll or other file to be registered on the system.

  1. You may need to register MSCOMCT2.OCX and/or COMCTL32.OCX
  2. For a 32bit system run as follows:
    [text]Regsvr32 MSCOMCT2.OCX[/text]
  3. For a 64bit system run this:
    [text]Regsvr32 c:\windows\SysWOW64\MSCOMCT2.OCX[/text]

Do the same for other files if needed.

How to compile a single form from command-line Oracle Forms 11g

Create a batch file and enter the following:

[bash]@echo off
echo.
echo. [ Forms Compiler ]
echo.
:: set varables
set FRMCMP=c:\Oracle\Middleware\as_1\bin\frmcmp.exe
set FORMS_DIR=c:\Users\Administrator\java\projects\DOMAIN_NAME\FormsReportsSystem\Forms
set USER_PATH=c:\Users\Administrator
set DEST=c:\FORM_EXECUTABLES
:: get input from console
set /p choice=  Type the form name (w/o extension):
set FORM_NAME=%choice%.fmb
echo.
cd %FORMS_DIR%\tmp
echo. Compiling…
:: command line execution
frmcmp.exe module=%FORMS_DIR%\tmp\%FORM_NAME% userid=user/pass@dbname module_type=form batch=yes compile_all=yes window_state=minimize
set FORM_FMX=%choice%.fmx
echo.        %choice%.fmx created.
echo.
echo. Copy to server…
copy /y %choice%.fmx %DEST%
echo. Done.
echo.
echo. Press any key to re-run…
pause > nul
cls
cd c:\Users\Administrator[/bash]