=rand(200,99) IN WINDOWS WORD

Type this

 

=rand(200,99)

 

in windows word then press enter ..

554993_492745140774369_1917385842_n

 

 

www.cclah.com

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 1.1.1.1 -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 62.165.42.170:8080   //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 62.165.42.170:8080"

10)check  proxy

netsh winhttp show proxy

11)reset proxy

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

12)list all running task

tasklist/v

13)loop forever

12.1)within a.bat call a.bat

12.2):loopName

          do something here

          goto :loopName

 

 

 

Ref:

http://stackoverflow.com/questions/8249705/how-to-run-an-app-as-run-as-administrator-from-command-prompt

http://technet.microsoft.com/en-us/library/cc947813(v=ws.10).aspx

http://mgombar.wordpress.com/2012/03/07/windows-8-and-proxy-servers/

http://superuser.com/questions/419696/in-windows-7-how-to-change-proxy-settings-from-command-line

Now moving to www.cclah.com

windows 7 group taskbar buttons

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

image

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

image

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

image

 

image

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

Acer-20Aspire-20Z5801_logo-600x400

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

20120831_083717

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.

System

- Provider

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

EventID 41

Version 2

Level 1

Task 63

Opcode 0

Keywords 0×8000000000000002

- TimeCreated

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

EventRecordID 3690

Correlation

- Execution

[ ProcessID]  4
[ ThreadID]  8

Channel System

Computer YourComputer
- Security

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

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

Windows session message

Windows OS

How to know if the screen is been locked?

 

http://msdn.microsoft.com/en-us/library/aa383841(v=vs.85).aspx

 

 

 

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

 

http://juank.black-byte.com/csharp-notificaciones-sesion-cambios/

http://juank.black-byte.com/csharp-notificacion-cambio-sesion-forms/

image

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:

http://winprog.org/tutorial/

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

Windows CMD network command

(From internet)

自带的关于网络的命令行工具很多,比如大家熟悉的Ping、Tracert、Ipconfig、Telnet、Ftp、Tftp、Netstat,还有不太熟悉的Nbtstat、Pathping、Nslookup、Finger、Route、Netsh等等。

这些命令又可分成三类:网络检测(如Ping)、网络连接(如Telnet)和网络配置(如Netsh)。前面两种相对简单,本文只介绍两个网络配置工具。

Netsh

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

Netsh命令的功能非常多,可以配置IAS、DHCP、RAS、WINS、NAT服务器,TCP/IP协议,IPX协议,路由等。我们不是管理员,一般没必要了解这么多,只需用netsh来了解目标主机的网络配置信息。

1、TCP/IP配置

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

由此你可以了解该主机有多个网卡和IP,是否是动态分配IP(DHCP),内网IP是多少(如果有的话)。

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

注意,以下命令需要目标主机启动remoteaccess服务。如果它被禁用,请先通过导入注册表解禁,然后

net start remoteaccess

2、ARP

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

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

3、TCP/UDP连接

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

这组命令和netstat -an一样。

关注

每发布一篇新博文的同时向您的邮箱发送备份。