=rand(200,99) IN WINDOWS WORD

Type this




in windows word then press enter ..





More about CMD console start , delay and set proxy

1) start a process

a.exe                     //call a.exe and wait till a.exe finish running

start a.exe            //start a.exe then goto next line

start /min a.exe   //start a in minimum size and /max for maximum size

2) wait for certain duration

2.1) by ping somewhere:

        ping -n 1 -w 4000    //wait for 4s

2.2)set time out

       timeout 180

3)wait for random duration

SET  /A mywait=  %RANDOM% * 100/32768 +15   
timeout %mywait%

4)start a process and wait for 5 s then kill it

start a.exe

timeout 5

taskkill /f /im a.exe

5) read lines in a text file

FOR /F "tokens=*" %%i IN (allText.txt) DO (
@echo %%i


6)launch internet iexplore.exe and open a url

iexplore.exe www.cclah.com

7)launch internet iexplore.exe without any plugin

iexplore.exe –extoff

8)set proxy

netsh winhttp set proxy   //one will receive error 5: access is denied

9)run a program as administrator and then set proxy

runas.exe /savecred /user:administrator "netsh winhttp set proxy"

10)check  proxy

netsh winhttp show proxy

11)reset proxy

runas.exe /savecred /user:administrator "netsh winhttp reset proxy"

12)list all running task


13)loop forever

12.1)within a.bat call a.bat


          do something here

          goto :loopName









Now moving to www.cclah.com

windows 7 group taskbar buttons

By default the taskbar buttons are set to group (combine) always :


Compare to following uncombined taskbar buttons, it looks good but less efficiency as one need two mouse clicks to open needed folder.


To ungroup these taskbar buttons, right click on the windows logo, open properties setting and then select “Never combine” for taskbar buttons:




Install windows 7 enterprise on Acer Aspire Z5801 ALL-IN-ONE PC


Acer Aspire Z5801 comes with windows home edition,it’s enough for personal usage, but this OS can not join domain thus if you want use Z5801 in enterprise environment, you must install windows enterprise edition.

You can install the  Windows 7 Enterprise OS with a Trail DVD and then active your windows upon join domain.

Notes for installation:

1) Z5801 has one 2TB hard disk with two partitions(C/D),you need erase all the data on this harddisk, so don’t back up data in D drive.

2) Update your OS first, then install the graphic driver else you will see the  Blue Screen of Death


3) try F5/F8 to enter safe mode if you encounter Blue Screen

4)The screen of Z5801 is highly reflective and not smooth, so it’s not recommended for purchase.

Possible Errors if install intel graphic card driver without update system:

The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.


- Provider

[ Name]  Microsoft-Windows-Kernel-Power
[ Guid]  {331C3B3A-2005-44C2-AC5E-77220C37D6B4}

EventID 41

Version 2

Level 1

Task 63

Opcode 0

Keywords 0x8000000000000002

- TimeCreated

[ SystemTime]  2012-08-30T09:59:47.131609900Z

EventRecordID 3690


- Execution

[ ProcessID]  4
[ ThreadID]  8

Channel System

Computer YourComputer
– Security

[ UserID]  S-1-5-18
– EventData

BugcheckCode 0
BugcheckParameter1 0x0
BugcheckParameter2 0x0
BugcheckParameter3 0x0
BugcheckParameter4 0x0
SleepInProgress false
PowerButtonTimestamp 0

Windows session message

Windows OS

How to know if the screen is been locked?






BOOL WTSRegisterSessionNotification( __in  HWND hWnd, __in  DWORD dwFlags );

LRESULT CALLBACK WindowProc( HWND hWnd, // handle to window UINT Msg, // WM_WTSSESSION_CHANGE WPARAM wParam, // session state change event LPARAM lParam // session ID );


More at





Win32 API tutorial

theForger’s Win32 API Programming Tutorial


This tutorial attempts to get you started developing with the Win32 API as quickly and clearly as possible. You can download tutorial as well as source code from:


The tutorial is in available in English, Chinese, Italian…

Windows CMD network command

(From internet)




在远程Shell中使用Netsh首先要解决一个交互方式的问题。前面说过,很多Shell不能再次重定向输出输出,所以不能在这种环境下交互地使用Ftp等命令行工具。解决的办法是,一般交互式的工具都允许使用脚本(或者叫应答文件)。比如ftp -s:filename。Netsh也是这样:netsh -f filename。



echo interface ip >s
echo show config >>s
netsh -f s
del s


这个命令和ipconfig /all差不多。


net start remoteaccess


echo interface ip >s
echo show ipnet >>s
netsh -f s
del s

这个比arp -a命令多一点信息。


echo interface ip >s
echo show tcpconn >>s
echo show udpconn >>s
netsh -f s
del s

这组命令和netstat -an一样。

Map a folder as hard disk drive in windows

subst y:        d:smrdata             //map local folder to new drive y

subst y: /D

net use x:      \\pc_name\sharedname   //map remote shared folder to new drive x

net use x: /delete

net use e: \\shares\folder

cd c:\folder

mklink /d name e:\             map folder to folder

KBA976586:Windows has encountered a critical problem and will restart automatically in one minute. Please save your work now.


 Windows Sysinternals > Downloads > File and Disk Utilities > PsTools

PsExec – execute processes remotely

After running PsExec for sometimes,windows shoots up the following error:

Windows has encountered a critical problem and will restart automatically in one minute. Please save your work now.

Then, the computer restarts.

When this problem occurs, the following event is logged in the Application log:

Log Name: Application
Source: Microsoft-Windows-Wininit
Date: <Date>
Event ID: 1015
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: <Computer>
Description: A critical system process, C:\Windows\system32\lsass.exe, failed with status code 255. The machine must now be restarted.

According to Microsoft KBA976586, the problem also occurs while using “Switch User” option in the Windows login screen. Microsoft has released an hotfix to fix this problem. http://support.microsoft.com/default.aspx?scid=kb;en-us;976586&sd=rss&spid=14481

You need to request it from Microsoft, then download and install the path.


Get every new post delivered to your Inbox.