[Windows 10]-Setting automatic update Windows 10 Technical Preview

Hi Guys,

Microsoft Windows 10 Technical Preview including features and improvement.

In this post, i will show you how to setting update Windows automatically.

1. Start “Setting” function from start menu


2. Choose “Update and Security” icon on setting panel


Continue reading “[Windows 10]-Setting automatic update Windows 10 Technical Preview”

Windows Command Line – NET USE


The NET utilities are NetBIOS applications, this means that they rely on WINS (or the local LMHOSTS file) to resolve computer names to IP addresses.

The NET Command is used to connect to a File/Printer Share as follows:

Join a file share (Drive MAP)
NET USE [driveletter:] \\ComputerName\ShareName /PERSISTENT:YES

NET USE [driveletter:] \\ComputerName\ShareName\folder1\folder2 /PERSISTENT:No

Make all future connections persistent (auto-reconnect at login)
NET USE /Persistent:Yes

Make all future connections non-persistent (reconnect with login script)
NET USE /Persistent:No

Join a file share (Drive MAP) – with a long share name
NET USE [driveletter:] “\\ComputerName\ShareName

Connect a user to their HOME directory
NET USE [devicename | *] [password | *]] [/HOME]
This requires the users Home server/folder to be defined in ADUC

Join a password protected file share (Drive MAP)
NET USE [driveletter:] \\ComputerName\ShareName[\volume] [password | *] [/USER:[domainname\]username] [/PERSISTENT:No]

In the above command /USER can also be specified as:
[/USER:[dotted domain name\]username]
[/USER:[username@dotted domain name]

In a script, to map a drive and wait until the mapping has completed before continuing:
START /wait NET USE [driveletter:] \\ComputerName\ShareName
This will be a little slower, but ensures that files can be read from the mapped drive.

Join a Printer Share
NET USE [LPTx:] \\ComputerName\printer_share /PERSISTENT:YES

Join a Printer Share – with a “long” share name
NET USE [LPTx:] “\\ComputerName\printer_share

Disconnect from a share
NET USE [driveletter:] /DELETE

Disconnect from a share and close all resources (undocumented)
NET USE [driveletter:] /DELETE /Y


NET USE H: /Home
NET USE J: \\MainServer\Users\%Username%
NET USE W: \\MainServer\GroupShare /Persistent:No
NET USE \\MainServer\SharedPrinter

NET USE command can map a network printer to an LPT port (for DOS type applications that print to a port.) but this does not add the printer to the Control Panel GUI.

By default all mapped drives have a 15 minute idle session timeout, you can modify this with the NET CONFIG command. In windows XP the explorer icon will change to show this change in status, this behaviour is designed to improve overall performance.

Drive Descriptions

Recent versions of Windows display a drive description for each share, this can be edited in the Explorer GUI. The text is stored in the registry.

_LabelFromReg=<description of drive mapping>
   (string REG_SZ)

Windows Command Line – NET


The NET Command is used to manage services as follows:

      NET START [service]
      NET STOP [service]
      NET PAUSE [service]
      NET CONTINUE [service] 

   service : The service name as shown in Control Panel, Services

To list the basic Services:


To list the running Services:


Error/return codes

The NET command does not return the documented Win32_Service class return codes (Service Not Active,Service Request Timeout, etc) and for many errors will simply return Errorlevel 2.

It will however echo its own errors on screen:

“The service table is locked. More help is available by typing NET HELPMSG 2180”
“The service table is full. More help is available by typing NET HELPMSG 2181”
“The requested service has already been started. More help is available by typing NET HELPMSG 2182”
“The service name is invalid. More help is available by typing NET HELPMSG 2185”
“The service is not responding to the control function. NET HELPMSG 2186”
“The service control is busy. NET HELPMSG 2187”
“Invalid service program name. NET HELPMSG 2188”
“The service could not be controlled in its present state. More help is available by typing NET HELPMSG 2189”
“The service ended abnormally. More help is available by typing NET HELPMSG 2190”
“The requested pause or stop is not valid for this service. More help is available by typing NET HELPMSG 2191”
“could not find service name. More help is available by typing NET HELPMSG 2192”
“service control dispatcher pipe read failed. More help is available by typing NET HELPMSG 2193”
“A thread for the new service could not be created. More help is available by typing NET HELPMSG 2194”

You can detect these errors by searching the output text with an ‘old school’ FIND command as follows:

NET START alerter 2>&1|FIND “2182”
IF errorlevel 1 goto :sub_already_started

Windows Command Line – COPY


Copy one or more files to another location.

      COPY source destination [options]

      COPY source1 + source2.. destination [options]

     source :  Pathname for the file or files to be copied.
        /A  :  ASCII text file (default)
        /B  :  Binary file copy - will copy extended characters.
destination :  Pathname for the new file(s).
        /V  :  Verify that the new files were written correctly.
        /N  :  If at all possible, use only a short filename (8.3) when creating
               a destination file. This may be necessary when copying between disks
               that are formatted differently e.g NTFS and VFAT, or when archiving 
               data to an ISO9660 CDROM.

        /Z  :  Copy files in restartable mode. If the copy is interrupted 
               part way through, it will restart if possible. (use on slow networks)

        /Y  :  Suppress confirmation prompt (Windows 2000 only)

        /-Y :  Enable confirmation prompt (Windows 2000 only)

Prompt to overwrite destination file

NT 4 will overwrite destination files without any prompt, Windows 2000 and above will prompt unless the COPY command is being executed from within a batch script.
To force the overwriting of destination files under both NT4 and Windows2000 use the COPYCMD environment variable:


This will turn off the prompt in Win2000 and will be ignored by NT4 (which overwrites by default)

Binary copies
“COPY /B … ” will copy all the files in binary mode , you can also put /B after any one file to copy just that file in binary.

Combine files
To combine files, specify a single file for the destination, but multiple files as the source. To specify more than one file use wildcards or list the files with a + in between each (file1+file2+file3)
When copying multiple files in this way the first file must exist or else the copy will fail, a workaround for this is COPY null + file1 + file2 dest1

COPY will accept UNC pathnames

Copy from the console (accept user input)

COPY CON filename.txt
Then type the input text followed by ^Z (Control key & Z)

To do this in Powershell use the following function:

function copycon {


In the current folder
COPY oldfile.doc newfile.doc

Copy from a different folder/directory:
COPY “C:\my work\some file.doc” “D:\New docs\newfile.doc”

Specify the source only, with a wildcard will copy all the files into the current directory:
COPY “C:\my work\*.doc”

Specify the source with a wildcard and the destination as a single file, this is generally only useful with plain text files.
COPY “C:\my work\*.txt” “D:\New docs\combined.txt”

Quiet copy (no feedback on screen)
COPY oldfile.doc newfile.doc >nul

COPY is an internal command.

Windows Command Line – CD


Change Directory – Select a Folder (and drive)

      CD [/D] [drive:][path]
      CD [..]

   /D : change the current DRIVE in addition to changing folder.

CHDIR is a synonym for CD.


Change to the parent directory:
C:\Work> CD ..

Change to the grant-parent directory:
C:\Work\backup\January> CD ..\..

Change to the ROOT directory:
C:\Work\backup\January> CD \

Display the current directory in the specified drive:
C:\> CD D:

Display the current drive and directory:
C:\Work> CD

Display the current drive and directory:
C:\Work> ECHO “%CD%”

In a batch file to display the location of the batch script file (%0)
C:\> ECHO “%~dp0”

In a batch file to CD to the location of the batch script file (%0)
C:\> CD /d “%~dp0”

Move down the folder tree with a full path reference to the ROOT folder…
C:\windows> CD \windows\java

Move down the folder tree with a reference RELATIVE to the current folder…
C:\windows> CD java

Move up and down the folder tree in one command…
C:\windows\java> CD ..\system32

If Command Extensions are enabled the CD command is enhanced as follows:

The current directory string is not CASE sensitive.
So CD C:\wiNdoWs will set the current directory to C:\Windows

CD does not treat spaces as delimiters, so it is possible to CD into a subfolder name that contains a space without surrounding the name with quotes.

For example:
cd \My folder

is the same as:
cd “\My folder”

An asterisk can be used to complete a folder name
e.g. C:> CD pro* will move to C:\Program Files

CHDIR is a synonym for CD

Tab Completion

This allows changing current folder by entering part of the path and pressing TAB

   C:> CD Prog [PRESS TAB] 
   Will go to C:\Program Files\

Tab Completion is disabled by default, it has been known to create difficulty when using a batch script to process text files that contain TAB characters.

Tab Completion is turned on by setting the registry value shown below

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]

Changing the Current drive

Enter the drive letter followed by a colon
C:> E:

To change drive and directory at the same time, use CD with the /D switch
C:> cd /D E:\utils

CD is an internal command.

Tìm hiểu Windows Command Line

Tìm hiểu Windows Command Line

Khi chúng ta làm việc với hệ điều hành Windows nhiều chức năng Microsoft đã xây dựng sẵng, nhưng có một số chức năng phải dùng đến lệnh Command Line.

Sau đây tôi xin bàn một chút về lệnh trong Windows và cách khai thác lệnh hiệu quả.

Để khởi động cơ chế dòng lệnh trong Windows ta dùng Start/Run gõ CMD hoặc nhấn phím Windows + R để hiện cửa sổ nhập CMD.


Các bạn lưu ý rằng tất cả các thao tác trên giao diện quản lý điều có thể sử dụng dòng lệnh để điều khiển, nhưng ngược lại thì không. Vậy chạy lệnh trên Command Line giúp ích gì cho chúng ta ?

  1. Không nhất thiết phải Remote vào máy cần thực thi lệnh.
  2. Dòng lệnh tốn ít tài nguyên của máy chủ.
  3. Dòng lệnh truy cập sát sườn hệ điều hành hơn và giúp người quản trị thao tác dưới tần thấp nhất của hệ điều hành.

Để biết được danh sách các dòng lệnh cơ bản, chúng ta chỉ cần gõ “help



Muốn biết từng dòng lệnh bên trong thực thi với mục đích gì, các tham số truyền ra sao, chúng ta gõ tiếp Lệnh /? Ví dụ COPY /?



Ngoài ra còn một số lệnh phức tạp hơn về mạng v.v.v không xuất hiện khi bạn gõ Help, tuy nhiên các bạn có thể vào Help của Windows và tìm “Command Line A-Z” và tự tìm hiểu.

Tìm hiểu các thư mục hệ thống trong Windows 32bit và Windows 64bit

Windows 64-bit:

The ‘Program Files (x86)’ and ‘SysWOW64’ folders explained

If you use a 64-bit computer with a 64-bit Windows installed (for example the 64-bit version of Windows 7) you have probably discovered that there are two new folders with the names Program Files (x86) and SysWOW64 on the harddisk, that do not exist on a 32-bit Windows. Maybe you have wondered what these folders are, why they exist and what kind of files they contain? In this article we will explain these folders and also explain why it is important to place with files with a specific bitness (32 or 64 bit) in the right folder on the harddisk.

32-bit versus 64-bit computers and Windows

Since the mid-90s almost all computers that have been sold have been 32-bit computers, and mostly they have had a 32-bit Windows installed. But after the release of Windows 7, the sales of 64-bit computers with a 64-bit Windows installed have increased a lot. In the coming years, more and more people will have a 64-bit computer with a 64-bit Windows in their home or office. One reason to this is that the price of a 64-bit computer have decreased so much that they are almost as cheap as 32-bit computers. And people will prefer 64-bit computers over 32-bit computers because they can handle much more (RAM) memory.

A 32-bit computer with a 32-bit Windows installed can use a maximum of 3 to 4 GB (RAM) memory. Mostly around 3 GB because a large part of the address space is used by video cards and other devices such as network cards, sound cards etc. This is true even if you install 4 GB in the computer. Mostly only around 3 GB RAM will still be used. With 64-bit computers and 64-bit Windows things are different. A 64-bit computer with a 64-bit Windows can handle so much RAM memory as 192 GB!

On a 64-bit Windows, both 32-bit and 64-bit programs can be run

Both 32-bit and 64-bit programs can be run on a 64-bit Windows. When a 32-bit program is run on a 64-bit Windows, a 32-bit emulator will be invoked to handle the 32-bit program.

The emulator will make the 32-bit application to think it is running on a 32-bit Windows and the same functionality that is accessible on a 32-bit Windows will also be accessible for the program on the 64-bit Windows. Normally it will be hard for the program to know if it is running on a 32-bit or 64-bit system, but if the program really needs to know the difference there are API functions available that the program can call if needed.
Exceptions: Antivirus programs etc
There are a few exceptions from this. 32-bit programs that function at low level, such as antivirus programs, will not always work on a 64-bit Windows; then a 64-bit version of the program must be used.

During the installation, it is important to install files into correct folders

As mentioned above the 32-bit emulator handles the situations when 32-bit programs are run on a 64-bit Windows and normally this works fine. But one sensitive phase is the installation of the 32-bit program. There exists special folders on the harddisk that is intended for 32-bit binary files only and it is very important that the installation program installs the 32-bit binary files to these folders. Some folders on the harddisk are intended for 32-bit binary files only and other folders are intended for 64-bit binary files only. If you place binary file with a specific bitness (32/64 bit) in a folder intended for another bitness the program will probably fail to work properly; in many cases the program will not even start.

Examples of binary files that is mentioned in this article are EXE files (program files), DLL files and OCX files (ActiveX components). Data files can usually placed in same folders and shared by both a 32 and 64 bit application.

Two different versions of the Program Files folder and the Windows System folder

A 64-bit Windows has two different versions of the program files folder and the Windows system folder (system directory). One version is intended for 32-bit files and other version is intended for 64-bit files. The name of these folders, and the bitness they are intended for, is shown in the table below:

Folder name Bitness Description
System32 64 Windows System folder (system directory) for 64-bit files
SysWOW64 32 Windows System folder (system directory) for 32-bit files
Program Files 64 Folder for 64-bit program files
Program Files (x86) 32 Folder for 32-bit program files

Below you can see the full path to the folders.

Folder name Folder path Description
System32 C:\Windows\System32 Windows System folder (system directory) for 64-bit files
SysWOW64 C:\Windows\SysWOW64 Windows System folder (system directory) for 32-bit files
Program Files C:\Program Files Folder for 64-bit program files
Program Files (x86) C:\Program Files (x86) Folder for 32-bit program files

The ‘System32’ folder is for 64-bit files and the ‘SysWOW64’ folder is for 32-bit files

This can be somewhat confusing, but the System32 folder is intended for 64-bit files and the SysWOW64 folder is intended for 32-bit files. This may seem a bit illogical if you look at the folder names, but there is an explanation to this. It has to do with compatibility. Many developers have hard coded the system folder path name in their applications source code and to preserve compatibility, if the application is converted to 64-bit code, the 64-bit system folder is still namedSystem32.

But what about 32-bit applications that have the system path hard coded and is running in a 64-bit Windows? How can they find the new SysWOW64 folder without changes in the program code, you might think. The answer is that the emulator redirects calls to System32 folder to the SysWOW64 folder transparently so even if the folder is hard coded to the System32 folder (like C:\Windows\System32), the emulator will make sure that the SysWOW64 folder is used instead. So same source code, that uses the System32 folder, can be compiled to both 32-bit and 64-bit program code without any changes.

So remember:

 the SysWOW64 folder is intended for 32-bit files only
 the System32 folder is intended for 64-bit files only

It is very important that a binary file compiled to a specific bitness (32 or 64) is installed to the correct system folder. Otherwise the program that needs the file will not be able to load the file and will probably not work as expected.

The ‘Program Files’ and ‘Program Files (x86)’ folders

If you have a 64-bit Windows installed on your computer you have probably already noticed that there exists two folders for program files: the Program Files folder and the Program Files (x86) folder. The Program Files folder is intended for 64-bit programs and the Program Files (x86) folder is intended for 32-bit programs.

In many cases the program will start and run as expected even if you place the program in wrong folder, but if the program asks Windows for the path to the Program Files folder and want to access installed files in the folder, the wrong folder will be used and the program will likely fail to function. So to be sure that everything always works as expected, you should always install files with a specific bitness to the correct Program Files folder. So on a 64-bit computer with a 64-bit Windows, remember this:

 always install a 32-bit program into the Program Files (x86) folder
 always install a 64-bit program into the Program Files folder

Supported by all Windows versions

This method of naming 32 and 64 bit folders are supported by all 64-bit Windows on the market. Both client versions and server versions of Windows support this. The following Windows versions support this naming system: Windows XP, Windows Vista, Windows 7, Windows 8 and Windows Server 2003 / 2008 / 2012.

‘WOW64’ and ‘x86’, what do they mean?

SysWOW64 and Program Files (x86) are special folders that only exists on 64-bit Windows and they are intended to store 32-bit binary files. In the folder names there are the “strange” character combinations WOW64 and x86 included. These character combinations have a meaning and we will explain it below:

 WOW64 is a shortening for ”Windows on Windows 64-bit” (can be read as “Windows 32-bit on Windows 64-bit”). It’s a emulator that allows 32-bit Windows-based applications to run seamlessly on 64-bit Windows. A compatibility layer is used as an interface between the 32-bit program and the 64-bit operating system.

 x86 is the name of a processor architecture from Intel that handles 32 bit instruction sets. The x86 term have been used for a very long time and in the beginning it was used as a general term to refer to Intel 16/32 bit processors with names such 8086, 80186, 80286, 80386 etc. But since the release of the 80386 processor, the first real 32 bit processor, the term x86 have been used to refer to 32-bit processors that have an instruction set that is compatible with the old 80386 processor.


Nguồn :


More information

If you want to have more information about the different versions of the Program Files and System folder, and have a general overview of the WOW64 technology, you should read the document Best Practices for WOW64 from Microsoft.

More information is also available in our article The ‘Program Files’ folder in different languages.