Thursday, November 01, 2012

Notes on Windows

NotesWindows  - Notes on Windows
=============

This includes NotesWinXP which is now made obsolete.
The content here is related to any version of Windows and will be specifically denoted.


Contents
=========
Roaming Profile - Encryption
Useful Registry Keys
Stop accidentally moving files or folders
Windows Update does not work anymore
Windows CMD commands
Application Location
MS Windows XP backup
Change Location of My Pictures, My Documents
Change Location of Libraries in Windows 7
Password Revealed on Windows
Known Folders can be Hidden - Windows 7
Boot Manager - Windows XP, Windows 7
How to Repair a Corrupt Windows 7 Installation
Windows Recovery Console Operations
Windows 7 Administrator account
Windows 7 - Where are those Options
Windows 7 - Create a System Repair Disc
Microsoft Outlook
Windows 8 - Confirm Delete
Windows 7/8 Install - Creating Bootable USB
Windows 8 - Startup
Windows 8 - Startup Folder
Removing Rogueware
Hidden Windows Devices


Roaming Profile - Encryption - WinXP
=============================
Problem: When roaming profile cannot be saved - the reason could be due to some files are being encrypted.

Solution: Find and remove the encrypted file. Use the tool "cipher" provided by WinXP.

    cipher /S:directoryName
... to check encryption status of all subdirectories

Ref:
Roaming decrypt
http://www.microsoft.com/technet/prodtechnol/winxppro/reskit/c18621675.mspx

Search windows "roaming profile" decrypt
http://au.alpha.yahoo.com/search/web?p=windows+%22roaming+profile%22+decrypt
search http://au.alpha.yahoo.com/search/web?p=windows+%22roaming+profile%22+decrypt


 

Useful Registry Keys
================================
Append Path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
System Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
User path:   HKEY_CURRENT_USER\Environment
Reserved Drives Letters: HKEY_LOCAL_MACHINE\SYSTEM\MOUNTEDDevices

Stop accidentally moving files or folders  - WinXP
===========================================
It is very easy to accidentally move folders in Windows Explorer, simply by careless movement of the mouse and accidentally releasing buttons. This problem is also very easy to occur with trackpads on laptops. There is a way of preventing this accidental motion by making Windows pop up a dialog box to ask for confirmation.

"Do You Want To Move Or Copy Files From This Zone?"

To enable this feature,
1. Click Start -> Control Panel -> Internet Options.
2. Click “Security” tab, mark the zone “Local intranet”, and click the “Sites” button.
3. Un-tick “Automatically detect intranet network”
4. Tick “Include all local (intranet) sites not listed in other zones”
   Tick “Include all sites that bypass the proxy server”
   Untick “Include all network paths (UNCs)”  

Windows Update does not work anymore  - WinXP
=====================================
For some reason, Windows files may corrupt such that the Windows Update will not work anymore. To solve this:
1. Open a Command Prompt Terminal: Start - Run, type: cmd.
2. To stop the current windows update service, in the Command Prompt, type:
    net stop wuauserv
3. Re-register the windows update dll for WinXP 32bit
    regsvr32 %windir%\system32\wups2.dll
Re-register the windows update dll for WinXP 64bit
    regsvr32 %windir%\syswow64\wups2.dll


Windows CMD commands
=====================
Ref: http://ss64.com/nt/

When in a CMD terminal, to launch another CMD terminal and execute a script (test.bat)
- start cmd /k test.bat    - new window remains open
- start cmd /c test.bat    - closes the new window when script finishes

Some commands related to Volume Shadow Copy Service (Vista)
vssadmin List Shadows
vssadmin List ShadowStorage


Application Location
=====================
WinXP:
Netscape Bookmarks (Netscape v 8.1)
D:\Program Files\Netscape\Netscape Browser\defaults\profile\bookmarks.html


MS Windows XP backup
======================
Below describes the process to take when backing up Windows. Some folder directory sizes given here may give an indication of their relative or typical sizes, but they will obviously vary in different systems.

- Login as each user and i) Empty Recycle Bin, ii) Clear all Cache, Cookies
- Login in as Administrator (so that can backup Registry and other System State)
- Goto Control Panel - Performance and Maintenance - "Free up space in your hard disk"
- c:\windows\system32 = 1GB
- c:\windows\ folders except system32 = 790MB
- c:\windows\system32\dllcache = 467MB
- c:\windows\$NTUninstall* = 245MB
- c:\windows\Driver Cache = 87MB
- c:\windows\fonts = 89MB
- c:\windows\help = 46MB
- c:\windows\ime = 86MB
- To backup Registry - go to the GUI windows Backup Utility and check the "System State"
- Do Normal and then Incremental backup.


Change Location of My Documents
=================================
WinXP:
Change My Documents.
- Right click My Documents - Properties - change the Target Location
- by default My Documents is in C:\Documents and Settings\<user>\My Documents

My Pictures, My Music.
- It appears that these folders are not changeable and are set under My Documents.
- When My Documents location is changed, then these folders should follow too.


Change Location of Libraries in Windows 7
===========================================
Libraries in Windows 7 can be assigned to various locations. Libraries will source the physial location of target directories and present the contents as if they all belong to the library. To change the location of Libraries in Windows 7:
- open Explorer
- in the left hand pane, right click on the library icons
- select Properties
- a list of location is presented, which can then be modified


Password Revealed on Windows
==============================
Windows 7:
- Passwords apparently can be revealed by System Information for Windows.
- the System Information (Start - All Programs - Accessories - System Tools - System Information) on Windows XP do not seem to reveal passwords.
- to remove the passwords in Windows 7, do:
    Control Panel - User Accounts and Family Safety - Windows Credential Manager.



Known Folders can be Hidden - Windows 7
==========================================
Windows default folders like Music, Pictures, Videos, Searches are part of the operating system and is not easy to remove. They may be hidden in a number of different ways.
1. Move them to another location by:
- Right click and select properties of the Known Folder
- Go to Location tab
- use the button Move to specify new location.
2. Merge them into Documents folder.
- Select the Known Folder to move.
- For the target to move to, select Documents.
3. Remove Known Folders
- Go to Start button and type, GPEDIT.MSC
- Under User Configuration, click Administrative Templates, double click Windows Components, then Windows Explorer.
- In the Disable Known Folders setting, double click and select Enabled.
- Click Show and enter names of any folders to be disabled.
- Go back to main Windows Explorer and delete any of the Known Folders, and it will be permanenet.

For a list of Known Folders, http://msdn.microsoft.com/en-us/library/bb882665.aspx


Boot Manager - Windows XP, Windows 7
======================================
Boot Loader for Windows XP: NTLDR
Sits on the Primary Partition of the Hard Disk
Configuration file: boot.ini
To edit, use Notepad

Boot Loader for Windows 7 / Vista : Windows Boot Manager (BOOTMGR)
Sits on the Primary Partition of the Hard Disk
Configuration file: BCD (Boot Configuration Data)
To edit, use BCDEDIT


How to Repair a Corrupt Windows 7 Installation
================================================
http://www.computerworld.com/s/article/9221540/How_to_Repair_a_Corrupt_Windows_7_Installation?taxonomyId=89&pageNumber=3


Windows Recovery Console Operations
====================================
Firstly to enter into recovery console, by booting from Windows CD/DVD. When 'Welcome to Setup' appears, then press 'R'. Here is a list of commands that may be helpful for repairing or trouble shooting in Recovery Console mode.

listsvc        - list the services running. Example display drivers agp440.sys is listed
disable agp440 - to disable a service that is running and listed under listsvc.


Windows 7 Administrator account
==================================
This section is specifically for Windows 7. In previous versions of Windows, there may appear the Administrator user on the login page. The Administrator account does not appear on Windows 7 by default.

By default, the Windows 7 installation usually
- allow you to create a new user, say FirstUser, during install and will set it up with Administrator password.
- there is a hidden Administrator user, but it is not active and has no password.

To manage the Administrator account, eg to activate it or give it a password, etc:
- click Start
- right click Computer - Manage
- Go to System Tools - Local User and Groups - User
- perform any task including Administrator account.

Alternative way to make Administrator appear on login screen.
- click Start and in the Search box, type CMD
- right click on the CMD icon that appears, choose Run As Administrator
- in the Command Prompt type:
  net user administrator /active:yes
      or
  net user administrator /active:no


Windows 7 - Where are those Options
=====================================
To enable Folder Options, which used to be a menu within Windows Explorer, we now need to do this for Windows 7:
- go to Contorl Panel - Appearance and Personalization - Folder Options.


Windows 7 - Create a System Repair Disc
========================================

The GUI way to create a Repair Disc is to Saerch for "Create a Repair Disc"

However, that can fail like this: once click create button and error came out
    original title: the parameter is incorrect ( 0x80070057)
    Unable to create a system repair disc 0x80070057

In that case, an alternative to create Repair Disc is:

i.           Boot the system by inserting Windows 7 installation disc.
ii.         When it gets to the main setup window, click on Repair from the lower left corner.
iii.       Select Command Prompt from the main Repair menu.
iv.        At the command prompt type in recdisc, then ENTER.
v.          You'll get the popup to choose which drive letter to create the Recovery disc to.
vi.        Have a clean DVD in the DVD drive and select start.
This should get your System repair disc created.



Microsoft Outlook
==================
Before you say this section should not be in the Windows notes, we argue that it should simply because MS love to tie in the products to the Windows OS so intimately that it affects other Windows related stuff, as you will see.


How to save, manage, archive Microsoft Outlook *.msg files?

- If your messages are in the Notes folder, or if you are looking for Calendar, Inbox or other items, DON'T LOOK FOR NOTES folder. Everything in Outlook inside Inbox, Notes, Calendar and more are DUMPED into a single *.pst file.
- - Where is the *.pst files?
- - - In Windows 7, it is default in:
- - - C:\Users\cyk\Documents\Outlook Files\Outlook.pst     (main outlook file)
- - - C:\Users\<user name>\AppData\Local\Microsoft\Outlook\*.pst   (other email accounts imported into Outlook)

- Tricky, you may be smart and Open Outlook, go to the left hand panel and find Inbox, Notes. Then right click on Notes, select properties. This will show the Notes folder in location called: "Outlook Data File". Don't spend hours looking for this, it is in fact the Outlook.pst mentioned above.

- So you cannot access all your messages without using Outlook, because it is also dumped into the Outlook.pst which is a proprietary format. Here's how to get all the messages out.
- - Open MS Outlook.
- - Open a Windows Explorer window and place it next to the Outlook app.
- - From the Outlook, click Notes, click the big buttons in the Ribbon to change to "Notes List". This give you a list of all the Notes in the main pane of Outlook.
- - Highlight all the notes you can to archive and save elsewhere. Drag them to a folder in the Windows Explorer window. Now all your notes will appear as individual *.msg files.
- - Download the little utility called "msgtxt" from:
http://www.enterag.ch/enterag/downloads/msgtext.xhtml
http://www.softpedia.com/get/Internet/Other-Internet-Related/MsgText.shtml
- - Use msgtxt to convert *.pst to *.txt files. A simple batch program can be written to simplify this.



Windows 8 - Confirm Delete
=============================
In Windows Explorer in Windows 8, it seems that it doesn't ask for confirmatin when you delete something.

Is this crazy or what? Not sure about those people who insists they don't make mistakes, but it is much safer to have the Confirm Delete option, which have been present in Windows many generations ago. So Windows 8 decide to trash this safety feature.

But you can bring it back - NOT from the Folder Options area.

You need to go to Windows 8 Desktop (no, not from the Metro UI), right click Recycle Bin.
Then click on Properties.
Then check the box 'Display delete confirmatin dialog'

If you want to test this, don't try deleting any important files ;)
Choose a dummy file that you don't mind losing and test this feature is back or not.


Windows 7/8 Install - Creating Bootable USB
=============================================
Creating the USB drive is the first step to installing Windows 7/8 from USB.

UEFI vs BIOS
For UEFI, the USB needs to be formatted as FAT32
For BIOS, the USB needs to be formatted as NTFS

When creating the USB on another PC, to check if that PC is booted with EUFI or not, launch "MSINFO32" on the CMD, then look at the BOOT MODE.

Size of USB drive needs to be at least 4GB


- Open a Command Prompt with Administrator privileges in Windows 7/8.
- Insert the USB device into an available USB port.
- Type "DiskPart" in the command prompt.
- Type "List Disk” (make note of the disk number of the target USB drive).
- Type "Select Disk X”, where X is the target USB drive noted in step above.
- Type "Clean”.
- Type "Create Partition Primary”.
- Select Partition 1
- Type "format FS=fat32 quick” for UEFI installation
    OR
  Type "format FS=ntfs quick” for BIOS installation
- Type "Active”.
- Type "Assign".
- Type "list volume".
- Type "Exit".


Extra step for UEFI
If the file 'BOOTX64.EFI' is not in \EFI\BOOT\ on the stick then copy the file to the stick by:
- go to a UEFI PC with Windows 7/8 x64, copy from C:\Windows\Boot\EFI for the file 'bootmgfw.efi to \EFI\BOOT\BOOTX64.EFI on the USB.


May NOT need to use Bootsec
- Mount the Windows ISO and access the ISO contents.
- cd to "boot" subdirectory
- type: bootsect.exe /nt60 X: where X is the drive letter for the USB key.
- this infuses boot manager code into USB key to make it bootable.


Ref: http://support.lenovo.com/en_AU/detail.page?DocID=HT076615
https://blogs.technet.com/b/home_is_where_i_lay_my_head/archive/2012/10/02/how-to-install-windows-7-or-8-from-usb-using-uefi.aspx?Redirected=true
http://www.thomas-krenn.com/en/wiki/Creating_Windows_UEFI_Boot-Stick_in_Windows
http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/problem-using-win7-usbdvd-download-tool-concerning/37eadf15-85dd-4e56-a89c-fa0a3339b92e
http://www.maximumpc.com/article/howtos/how_to_install_windows_7_beta_a_usb_key



Windows 7/8 Install - Installing from USB
=============================================

UEFI vs BIOS
With new Windowss and new Motherboards there is an option to use BIOS or UEFI.
Please consider this first.


1. Prepare a USB by first making it bootable, see - "Windows 7/8 Install - Creating Bootable USB"

2. Access the installation DVD for Win7/8.

3. Dump all the contents of the DVD onto the USB drive.
xcopy SRC_DRIVE:\* DST_DRIVE:\ /s /e

4. Use the USB to install on a new machine.


Windos 8 - Startup
===================
http://www.howtogeek.com/126016/three-ways-to-access-the-windows-8-boot-options-menu/

UEFI and Windows 8 Update on Windows/Linux dual-boot systems
http://www.zdnet.com/uefi-and-windows-8-update-on-windowslinux-dual-boot-systems-7000028217/

Seven ways to set up multi-booting with Windows 8 and Linux
http://www.zdnet.com/seven-ways-to-set-up-multi-booting-with-windows-8-and-linux-7000026392/

How to dual boot Windows 8 and Linux
http://apcmag.com/how-to-dual-boot-windows-8-and-linux.htm


Windows 8 - Startup Folder
=============================
Unlike previous versions of Windows, the Windows 8 startup folder is typically located at:
         C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Put any *.bat files here to make it run automatically at startup


Removing Rogueware
===================
- create restore point
- Use the following tools to scan and remove rogueware
AdwCleaner (www.bleepingcomputer.com/download/adwcleaner) to run scan
Junkware Removal Tool (www.bleepingcomputer.com/download/junkware-removal-tool) and run scan.
RogueKiller (www.bleepingcomputer.com/download/roguekiller) and run scan

Hidden Windows Devices
=======================
Some USB devices which have been unplugged or not active cannot be seen via Windows' Device Manager. However the following command will make Windows show the Hidden Devices. Open a CMD terminal, and enter the two lines:
- set devmgr_show_nopresent_devices=1
- start devmgmt.msc

No comments: