Sunday, February 26, 2017

Changing default node js init folder and cache folder

The node js add a global folder as a default loading of apps

Default location is
npm : C:\Users\%USERNAME%\AppData\Roaming\npm
npm-cache: C:\Users\%USERNAME%\AppData\Roaming\npm-cache

You can change that to your own location as below command

Step 1: Open Command prompt with Administrator rights

Step 2: Execute the below command
npm config set prefix "C:\node\npm"
npm config set cache "C:\node\npm-cache"

Step 3: Make sure you have that folder created before running any npm command

That's it.

Sunday, February 19, 2017

How to suspend screen in Windows or Shutdown Windows

This document is created to share some of the ways we can suspend windows display when the windows desktop/laptop is working

Step1: Open the Run command by pressing +R
Step2: Execute the below command
%systemroot%\system32\scrnsave.scr /s

How to Shutdown the windows thru Command prompt
Step1:
Step2: Execute the below command
SHUTDOWN /s /f /t