Dec 30, 2009

Disable and Remove Windows Genuine Advantage

Official Method by Microsoft – more information here.

First Method

  1. Lauch Windows Task Manager.
  2. End wgatray.exe process in Task Manager.
  3. Restart Windows XP in Safe Mode.
  4. Delete WgaTray.exe from c:\Windows\System32.
  5. Delete WgaTray.exe from c:\Windows\System32\dllcache.
  6. Lauch RegEdit.
  7. Browse to the following location:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
    Windows NT\CurrentVersion\Winlogon\Notify
  8. Delete the folder ‘WgaLogon’ and all its contents
  9. Reboot Windows XP.

Note: With this method, you may be prompted to install WGA Notifications again which can still be unselected.

Aug 21, 2009

Aug 19, 2009

Startup & Shutdown Oracle DB

set oracle_sid =
sqlplus /nolog
conn system/manager as sysdba
shutdown abort
startup

Aug 4, 2009

Shutdown, Reboot and Logoff Windows with scripts

XP Pro
WMIC OS Where Primary=TRUE Call Shutdown
Immediate shutdown
XP Pro
WMIC OS Where Primary=TRUE Call Reboot
Immediate reboot
XP
SHUTDOWN -r -t 10
Delayed reboot
XP
SHUTDOWN -s -t 01
Delayed shutdown
XP
SHUTDOWN -i
Interactive use with GUI
TS
LOGOFF 16 /SERVER:termserv1
Logoff
TS
TSSHUTDN 45 /SERVER:termserv1 /POWERDOWN /DELAY:20 /V
Delayed poweroff
W2K (5)
DEVCON Reboot
Reboot
W2K
RUNDLL32 PowrProf.dll, SetSuspendState
Activate suspend state
W2K
RUNDLL32 USER32.DLL,LockWorkStation
Lock
W2K
Learn how to shutdown a remote Windows 2000 computer
Shutdown
NT+ (1)
PSSHUTDOWN \\mynt4srv -K -F -T 20
Delayed poweroff
NT+ (1)
PSSHUTDOWN \\myw2ksrv -O -F -T 0
Logoff
NT4+RK
W2K+RK

SHUTDOWN /L /R /T:0 /Y
Reboot
NT4+RK
W2K+RK

SHUTDOWN /L /T:10 /Y /C
Delayed shutdown
NT4
See Reboot NT on my Solutions found in alt.msdos.batch page
Reboot
NT4
RUNDLL32 USER32.DLL,ExitWindowsEx
RUNDLL32 USER32.DLL,ExitWindowsEx

Logoff
Win98/ME
RUNDLL32 SHELL32.DLL,SHExitWindowsEx n
Any
Win98/ME
RUNONCE.EXE -q
Reboot (4)
Win98
RUNDLL32 KRNL386.EXE,exitkernel
Poweroff
Win9*
RUNDLL USER.EXE,ExitWindows
Shutdown (2)
Win9*
RUNDLL USER.EXE,ExitWindowsExec
See Remarks
Win9*
RUNDLL SHELL.DLL,RestartDialog
Restart dialog
Win31*
ECHO G=FFFF:0000| DEBUG
Task Manager popup
DOS
ECHO G=FFFF:0000| DEBUG
Reboot
PowerShell
Stop-Process -processname *
Blue Screen
KiXtart
$RC = SHUTDOWN( "\\server", "Shutting down...", 10, 1, 0 )
Delayed shutdown
KiXtart
$RC = SHUTDOWN( "\\server", "", 0, 1, 1 )
Reboot
KiXtart
$RC = LOGOFF( 1 )
Logoff
KiXtart
$RC = SetSystemState( 0 )
Lock
KiXtart
$RC = SetSystemState( 1 )
Standby
KiXtart
$RC = SetSystemState( 2 )
Hibernate
KiXtart
$RC = SetSystemState( 3, 0 )
Poweroff
Perl
InitiateSystemShutdown( $sComputer, $sMessage, $uTimeoutSecs, $bForce, $bReboot )

Perl
InitiateSystemShutdown( "", "", 0, 1, 1 )
Reboot
Perl
InitiateSystemShutdown( "", "Going down...", 10, 0, 1 )
Delayed reboot
Perl
InitiateSystemShutdown( "10.0.1.16", "Sorry", 5, 1, 0 )
Delayed shutdown
Regina Rexx
RC = W32SysShutdown( how [,force] )

Regina Rexx
RC = W32SysShutdown( "P", "F" )
Poweroff
Regina Rexx
RC = W32SysShutdown( "L", "N" )
Logoff
WSH
[1] Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true")
[2]
[3]
for each OpSys in OpSysSet
[4] OpSys.Reboot()
[5] next

Reboot
WSH
Replace line 4 in the script above with this one:
[4] OpSys.Shutdown()
to shut down the PC instead of rebooting it.

Shutdown
WSH
[1] Const EWX_LOGOFF = 0
[2]
[3]
Set wmi = GetObject("winmgmts:{(Shutdown)}")
[4] Set objSet = wmi.InstancesOf("Win32_OperatingSystem")
[5]
[6]
For Each obj in objSet
[7] Set os = obj
[8] Exit For
[9] Next
[10]
[11]
os.Win32Shutdown EWX_LOGOFF

Logoff
WSH
Set objShell = CreateObject( "Shell.Application" )
Shell.ShutdownWindows

Open the Shutdown dialog
OS/2
START /PM SHUTDOWN && EXIT
Shutdown
OS/2
SETBOOT /B
Reboot
OS/2
SETBOOT /IBD:C:
Reboot
OS/2
SETBOOT /IBA:nonsense
Shutdown
OS/2
LOGOFF
Logoff

Jul 20, 2009

Unable to show hidden files & folders in XP

Symptom : In Windows Explorer --> Tools -- > Folder Option --> View, the "Do Not Shows Hidden Files & Folders" selection always been selected even you changed in to "Show Hidden Files & Folders"

Causes : This might be caused by virus infection.

Solution :

1) click on the start button --> run --> type : regedit

2) Explore the registry : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL

you will see a value name called "CheckedValue" at the right panel. Double click the CheckedValue icon, and change the Value Data from 0 to 1.

3) Yes, you can then now try again to change the folder option in the Window Explorer.


Jul 17, 2009

How to query MSSQL's Table information

To get all the table's name :

SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE';

3rd column shows the table name ..



To get the Table fields :

SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'table_name';

4th column shows the table field name..