Friday, November 21, 2014

Cmd System error 5 has occurred. Access is denied. windows 8

Open START - All Programs - Accessories - Command Prompt
Right click and select Run as administrator.


START - Down arrow on the bottom left of the screen - scroll to the right side - Under Windows System - Right click and select Run as administrator on Command Prompt

Monday, November 17, 2014

Automate windows customisation

Scriptable windows commands :

http://www.autohotkey.com
http://www.macrocreator.com

Inno Setup is a free installer for Windows programs.
General useful silent install switches :
http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html  

Control Panel Command Line Commands in Windows :
http://pcsupport.about.com/od/tipstricks/a/control-panel-command-line.htm

CONTROL [cpl],,[page]
CONTROL [/name] [/page]
CONTROL [-name] [-page]

ex :
control /name Microsoft.ActionCenter
control /name Microsoft.DateAndTime
control /name Microsoft.ActionCenter /page pageSettings

http://msdn.microsoft.com/en-us/library/windows/desktop/ee330741%28v=vs.85%29.aspx#canonical_names

Windows does not boot in normal or safe mode, stuck at some driver - run chkdsk

Most of the time is file system integrity problem (system file/driver) caused by a forced shutdown either by losing power or forceful shut down by the power button.
You get more chances to get this if you close it while it was doing updates.
It can also be cause by a bad sector on one of the mentions files, or virus alteration of files.


To fix-it you have to run a chkdisk.
Boot from a hiren's boot cd and select chkdisk, after restart and it will boot to windows normally.

If that did't work you can try to check if you find a 0 bytes file in C:\Windows\System32\drivers, usually is random letters, numers file.

Tuesday, November 11, 2014

Stop CHKDSK every time at start-up dirty partition

If a partition is marked as dirty it will not be cleared.

Type :
fsutil dirty query d:
 Volume - d: is Dirty
You can also set the dirty bit if you want by : fsutil dirty set d:


CHKNTFS /X d:
 /x = not to check the volume at start-up

chkdsk /f /r d: 

You can manually remove the dirty bit :

Download a hdd hex editor : DMDE GUI for Windows

Select Logic/disks volumes, select the volume and press Open volume.

ALT+C = volume cluster selection + ENTER
CTRL+S = Search string --- and paste in the hex part:

03 01 00 00 00 00 00 00 80 00 00 00 18  - no dirty bit
03 01 01 00 00 00 00 00 80 00 00 00 18  - win xp, win 7
03 01 01 01 00 00 00 00 80 00 00 00 18  - win 8

CTRL+E = edit 

Monday, November 3, 2014

Give credentials from command line while accessing network resources or map network drive

You try to copy a folder from a network location :
robocopy -E \\computername\folder\ D:\  
 
and you receive :
Logon failure: unknown user name or bad password.
 
To fix it type first :  
net use \\computername\ipc$ password /USER:username
 
 
To map a network drive :
net use n: \\computername\sharedfolder password /user:username
 
 
If you receive : 
A specified logon session does not exist. it may already have been terminated.
 
This behavior occurs when the "Do not allow storage of credentials or 
.NET Passports for network authentication" Network access policy is 
enabled.
 
gpedit.msc
 Windows Settings -> Security Settings -> Local Policies -> Security Options
Network access: Do not allow storage of credentials or for network authentication  
Disable.