Skip to main content


Windows 7 black screen after windows logo

Windows 7 just show a black screen, after showing the windows logo on startup.
On Windows startup with the black screen, try pressing caps lock key. If caps lock key respond normally, then there’s a chance that windows boot up properly. Press the power button for 3 seconds and release it.
If windows shutdown properly, turn on the computer again. This time, try pressing F8 to go to safe mode.
In safe mode, open device manager. Open windows explorer, right click on “This Computer” or “My Computer” and select properties, this will open device manager.  Or alternatively, go to control panel and select device manager.
In Device Manager, select the Display Adapter, right click on it and click properties. From the properties, uninstall the driver. Don’t worry windows will install its standard or default display driver.
Restart or shutdown the computer, if the problem is just the corrupted display driver then startup should be working  fine and the black screen issue is not present anymore.

Copy folder/file to multiple folders

Copy a single folder to multiple folders?

Copy a file to multiple folders?

This can be done easily using PowerShell script.

Script below requires PS 3.0, but it can easily be tweak for other version.

Here's the script:

$source_folder="D:\xfolder\United Folders"
dir -Directory "D:\Unity\Project_016\" | ForEach-Object {
write-host $_.fullname
Copy-Item -Path $source_folder -Destination $_.FullName


What the script does is the $source_folder is to be copied to all folders in the destination.

Basically, the "United Folders" is to be copied to the root of the sub folder in destination folder which is "D:\Unity\Project_016\".


After executing the script, the folders will look like this:
D:\Unity\Project_016\01\United Folders
D:\Unity\Project_016\02\United Folders
D:\Unity\Project_016\03\United Folders

It dep…

Excel formula fixed cell address

How to insert a formula with a fixed cell address? Absolute referencing will come to the rescue.

Absolute reference in Excel is prefix with a dollar ($) sign.

$A$1: This means that Column "A" and Row "1" will not change when copied to another cell.



The above formula when copied from one cell to another cell, $A$1 will remain the same.

While A$1,$A2 will change its location when copied to another cell.

 A$1: This means that column "A" will change while row location (which is number 1) will not change when copied.

 So this absolute reference will change like D$1, G$1 or E$1 depends on the location. So number "1" value will never change.

 $A1: The column "A" will not change when copied from one cell to another cell, while the row value which is number "1" will change.

So the above absolute reference will change like $A3, $A10, $A12 etc., Column "A" will be constant while the row changes.


Linux protect file from deletion

To protect file from deletion in Linux system, the chattr command is able to set the attributes that protects the file.

chattr +a my_protected_file.txt

chattr +a  == means that the file can be appended and the file can't be deleted as well.

To set the file to immutable, "+i"  attribute can be used.

chattr +i the_protected_file.txt

Immutable file is protected from deletion and the original contents of the file is also preserved because no changes can be made.

This command below:

ls xx*.txt >> the_protected_file.txt

The command above will show "permission denied" if the file is immutable.

If the file is set with +a, then the above command will append the output of "ls" to the file.

To unset or removed the attribute use the minus sign, "-a", "-i".

For example, chattr -a the_protected_file.txt or  chattr -i the_protected_file.txt

To know more about chattr type the command below:

man chattr
chattr --help
info chattr

This wiki link shows …

Folder redirection very slow

Folder redirection is good and bad, well if everything is working as expected then it's definitely good and sometimes it's bad if it causes some unexpected issues such as very slow login.
So you have a folder redirection working  smoothly over the years, users can always change their password whenever they want it and of course, System Administrator can also change user password anytime whenever they want it or whenever they just felt like changing it (just kidding), or when situations demand it.
If folder redirection suddenly becomes problematic or causes some issue such as slow login, one issue could be that the user changes the password or the Sys Ad change the user password.
One issue I encountered if the folder redirection suddenly becomes slow, if the client or the user has a mapped drive that is set manually and set to persistent, persistent mapped drives uses the Vault Credential Manager to store the password.
If the password is not updated in the vault credential man…

Map drive not working

Mapping drive can be set in different ways,  via group policy, using scripting (PowerShell, Vbscript, Jscript) or it can be set via command line.
Setting script via command line can be done easily using ”net” command, like the example below. The example below shows the syntax on how to map a drive or folder.

net use ?
The syntax of this command is:
NET USE [devicename | *] [\\computername\sharename[\volume] [password | *]]         [/USER:[domainname\]username]         [/USER:[dotted domain name\]username]         [/USER:[username@dotted domain name]         [/SMARTCARD]         [/SAVECRED]         [[/DELETE] | [/PERSISTENT:{YES | NO}]]
NET USE {devicename | *} [password | *] /HOME
Net use \\AD_Server\Working_folder  Z:
The command will map “Working_folder” to drive Z on the client PC.
The above command will not need a password  if run as a batch file and deploy as a logon script via group policy.
To delete the mapped drive : net use Z: /delete