Disable Fast Startup to let Wake-on-LAN Working

Because my old desktop occasionally frozen and unable to boot up, I bought a new desktop and installed Windows 10 on it. One of the features I used on my old desktop was Wake-on-LAN, and when I test it, it doesn’t work. I tried with various settings and ended up found that it is due to Windows 10.

So to make Wake-on-LAN working on Windows 8 and Windows 10, you will have to disable fast startup in Windows. This can be turned off by going to Power Options > System Settings > Shutdown settings > Uncheck Turn on fast startup (recommended).

Microsoft also have some explanation on this as well.



Auto-Java-Updater 1.0 for Windows is Published!

I don’t really have a good impression on Oracle product, though it is truth that their product perform well, they are just less user orientated.

So this time, I am having trouble with updating Java Runtime Environment, or JRE in short. It has been a long problem. I got several desktops in my company which require JRE for their work. But after a month or two, the users will complaint to me that they cannot use their application and show me a screenshot which is actually a pop up saying JRE is out of date.

Oracle never provided an automatic update mechanism for JRE, and because the user doesn’t have administrator right, they can’t perform their installation on their on. At the end of the day, I have to update the JRE on their desktop, one by one.

So finally today I am looking for solution to the problem, and found this, a batch script to update the Java. I tried, and found a few bugs and issues. So I decided to fork it and create my own one, which is the birth of my own Auto-Java-Updater.

You may visit the project page here or download the script at the project release page here.

Anyway, my day has gone to make this script, and hopefully saving me the trouble onward until JRE 8 is obsoleted.

Building Ncat Portable for Windows


I used to use telnet for testing if the firewall working properly in the office. Telnet is good for simple test, but when comes to testing a large number of destination IP and ports it will be very time consuming. After searching on the Internet I found Netcat, a tool for testing connection. It is build-in in most Linux OS but not on Windows. So I found Ncat here as part of the Nmap for Windows by nmap.org, but too bad that it won’t execute on some Windows as it requires Microsoft Visual C++ Redistributable Package installed.

A Ncat portable is an alternative, but the website only provided a beta version of Ncat 5.59BETA1, and require you to compile your own if you would like a newer version.

They did provide a documentation on how to compile Ncat with static linking library, but if you follow the steps you will encounter a few problems which you have to troubleshoot yourselves.

So here is my steps on compiling Ncat portable after I had gone through all the trouble.If you are someone who can edit the documentation on secwiki.org, please do that for me as I don’t want to get an extra account for just editing the document :)

If you want to avoid the trouble to compile, you can download the Ncat which I compiled here, however use it at your own risk as I might have inject some malware inside :)

Building Ncat Portable for Windows


The following steps has been tested using the following environment:


  1. First, follow all steps on the original documentation at https://secwiki.org/w/Nmap/Ncat_Portable till you copied the resulted static libs and include files from “C:\OpenSSL” to the “mswin32\OpenSSL” directory in the Nmap source tree in step 5. Below is a screenshot of the original documentation in case it is edited at the time you read this article.
    Building Ncat Portable
  2. Assuming that everything went fine till now, you’re about 7 steps away from building Ncat portable.
    1. Open Nmap solution in Visual Studio from mswin32\nmap.sln and switch the build configuration to “Ncat Static” like so:
      1. Right click on Solution “nmap” in the Solution Explorer sidebar and choose “Configuration Manager“.
      2. Switch the active solution configuration to “Ncat Static“. Check the “Build” check box for project “liblua“. Make sure that the nsock, nbase and ncat projects have switched to the “Static” configuration also. Then close the “Configuration Manager”.
      3. Right click on the ncat project and select “Set as StartUp Project“.
    2. Right click on the “nsock” project in Visual Studio and click “Properties“. In “Configuration Properties” > “General” > “C/C++” > “General“, in “Additional Include Directories“, add path “..\mswin32\OpenSSL\include
    3. Right click on the “ncat” project in Visual Studio and click “Properties“. In “Configuration Properties” > “General” > “C/C++” > “General“, in “Additional Include Directories“, add path “..\mswin32\OpenSSL\include” and “..\liblua
    4. Right click on the “ncat” project in Visual Studio and click “Properties“. In “Configuration Properties” > “General” > “Linker” > “General“, in “Additional Library Directories“, add path “..\mswin32\OpenSSL\lib
    5. Expand the “ncat” project, double click the file “ncat_ssl.c” and comment out the line “#include <openssl/applink.c>
    6. Right click on the “liblua” project in Visual Studio and click “Properties“. In “Configuration Properties” > “General” > “C/C++” > “Code Generation“, set “Runtime Library” to “Multi-threaded DLL (/MD)
    7. Right click on the “ncat” project in Visual Studio and click “Build“. Alternatively you can press the F7 key to start building.

Configure NTP on Windows Time Service on Windows Server running Active Directory

Sometimes ago I needed to change NTP setting on a Windows Server which is running active directory (AD) service. Not sure why the usual way to set the NTP on Windows 7 or non-AD servers via GUI is not an option. It simply doesn’t have a GUI for you! Anyway after some Google here is the command I used. Assume the NTP server is

w32tm /config /update /manualpeerlist:,0x9 /syncfromflags:MANUAL /reliable:YES

Then force resync from the NTP source so that the source can be displayed correctly in the next command.

w32tm /resync

Finally double check if the NTP source is configured correctly

w32tm /query /source

The 0x9 flag is important as I can’t make it work without that. I still not sure what the flag does but according to the article Windows Time Service Tools and Settings this mark the server as Always time server and Automatic reliable time server.

Handle File Ended with dot Character in Windows

Sometimes you download a file from Internet and it become a file ended with dot character which cannot be opened, renamed and deleted. I found this article on the Internet with the solution. To be able to handle this, you have to use the special path format in the command prompt.


So for example, you want to delete the file, the command you will use is:

del \\?\C:\path_to_your_file.

Delete Saved Password for Network Drive, Microsoft Outlook, XP Mode, etc, in Windows

Windows and Microsoft actually saved the password in OS which can be accessed in Windows. To access the page, just simply run the below command:

control keymgr.dll

Accessing Key Manager

If you are using Windows 7 (and probably Windows Vista as well), you can also access the page by going to the user account page and clicking the “Manage your credentials” link.

Manage your Credentials Link