windows.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 31 Mar 2010 18:16:15 +0300
changeset 360 ddf042e3a518
parent 324 5dfdb1a97f34
child 361 633200cc03c3
permissions -rw-r--r--
Path limitation on Windows.

-*- outline -*-

* Determining windows version.

Run winver.exe: <Win> + R winver <RET>.

Or type: <Win> + <Break>.

Under cmd.exe use built-in command ver.

For Win 2000 and upper check registry key:

  cmd> reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion

To check 32/64-bit OS use PROCESSOR_ARCHITECTURE env var (it has such values:
x86, AMD64, IA64).

* XP.

** Check system files integrity.

  cmd> sfc /Scannow

To complete repair you may need original installation CD (you can mount it
from .iso image for example with DemonTools).

Works for Windows 2000, Windows XP, Windows 2003.

See

  http://support.microsoft.com/kb/222471/
  http://support.microsoft.com/kb/310747/ru

** Repair boot.

If you only damage boot sector of master or system partition boot from Windows
XP installation CD, enter to recovery console and run:

  cmd> fixboot
  cmd> fixmbr

See

  http://support.microsoft.com/kb/307654/ru

** Automatically connect to shared resource.

Add to autorun such .bat file:

  net use x: \\server\share /user:username password

See

  http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_use.mspx

** Activate windows.

  http://www.microsoft.com/genuine/selfhelp/XPPkuinst.aspx?sGuid=bab9e103-6365-44dd-9337-93f0cd9dd4b7&displaylang=en
                Windows Product Key Update Tool Instructions

* Vista

** Samba.

By default, you cannot authenticate and share files to and from Mac OS X or
Linux Samba due to a well known authentication method turned off by default.
To enable this,

*** Only for Windows Vista Ultimate/Business/Enterprise Editions.

Goto Start->Run and open gpedit.msc or secpol.msc

Select Continue on the User Account Control prompt. This will launch the Group
Policy Object Editor for the Local Computer Policy.

In the Group Policy Object Editor, expand:

-> Computer Configuration
-> Windows Settings
-> Security Settings
-> Local Policies
-> Security Options

Open the "Network security: LAN Manager authentication level" policy and
change the Security Setting to:

Send LM & NTLM - use NTLMv2 session security if negotiated

*** Windows Vista Home Edition.

Since Windows Vista Home Edition does not feature the Group Policy Editor, you
may do the following to enable this feature:

Goto Start->Run-> and type regedit.

Select Continue on the User Account Control prompt.

Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa

Create the following DWORD value (if it doesn't exist): LmCompatibilityLevel

And set its value to: 1

* Map dir to disk.

To create:

  cmd> subst [to-disk: [from-disk:]path]

To remove:

  cmd> subst disk: /d

* CMD.

** How run cmd on 64-bit OS.

From 64-bit process:

  %windir%\System32\cmd.exe (for 64-bit)
  %windir%\SysWOW64\cmd.exe (for 32-bit)

From 32-bit process:

  %windir%\System32\cmd.exe (for 32-bit)
  %windir%\Sysnative\cmd.exe (for 64-bit)

  http://msdn.microsoft.com/en-us/library/aa384187%28VS.85%29.aspx
                File System Redirector

* Standard scripts.

  compmgmt.msc - Computer management
  devmgmt.msc - Device manager
  diskmgmt.msc - Disk management
  dfrg.msc - Disk defrag
  eventvwr.msc - Event viewer
  fsmgmt.msc - Shared folders
  gpedit.msc - Group policies
  lusrmgr.msc - Local users and groups
  perfmon.msc - Performance monitor
  rsop.msc - Resultant set of policies
  secpol.msc - Local security settings
  services.msc - Various Services
  msconfig - System Configuration Utility
  regedit - Registry Editor
  msinfo32 - System Information
  sysedit - System Configuration Editor
  win.ini - windows loading information(also system.ini)
  winver - Shows current version of windows
  mailto: - Opens default email client
  command - Opens command prompt

  appwiz.cpl - Add & Remove Programs
  timedate.cpl - Date/Time Properties
  desk.cpl - Display Properties
  inetcpl.cpl - Internet Options
  mmsys.cpl - Sound Settings
  sysdm.cpl - System Properties
  password.cpl - Password Options
  main.cpl - Mouse and Keyboard Options
  control fonts - Fonts Folder
  control printers Printers Folder

* Path.

** Max path length.

260 chars. Use MAX_PATH macros from 'windows.h'.

** Allowed characters.

Not allowed:
 * characters from 0 to 31
 * < (less than)
 * > (greater than)
 * : (colon)
 * " (double quote)
 * / (forward slash)
 * \ (backslash)
 * | (vertical bar or pipe)
 * ? (question mark)
 * * (asterisk)

  http://msdn.microsoft.com/en-us/library/aa365247.aspx
                Naming Files, Paths, and Namespaces