Technical Notes: Windows

From Mediawiki-1
Jump to navigation Jump to search

Misc Tasks[edit]

Moving home directory of users[edit]

Mounting a disk read only[edit]


   Switch off "automount" by running mountvol.exe /N
   Connect disk to Windows (do not mount the disk)
   Run diskpart
       Enter list volume
       Enter select volume X (where X is the correct volume number from the previous command)
       Enter att vol set readonly
       Enter detail vol and ensure the read-only bit is set

Now you can mount the volume and it will be read-only.

See also: http://crawlmsdn.microsoft.com/en-us/magazine/cc302206.aspx

Multi boot setup[edit]

Check out

 bcdedit

Misc Fixes[edit]

Useful Commands[edit]

Time Synchronization[edit]

H:> w32tm /query /peers
#Peers: 1

Peer: SCUSINF9U020.us.americaswh.intranet
State: Active
Time Remaining: 1775.1702553s
Mode: 3 (Client)
Stratum: 4 (secondary reference - syncd by (S)NTP)
PeerPoll Interval: 14 (16384s)
HostPoll Interval: 14 (16384s)

File & Disk Manipulation[edit]

 copy /b filename.ext +,,        => updates timestamp of a file (equivalent to "touch")
 diskmgmt.msc

Power Related Stuff[edit]

Run this as administrator:

 powercfg -lastwake               => shows details about event which woke computer
 powercfg –devicequery wake_armed => shows device which can wake up computer

AD Group Membership[edit]

 gpresult /user <UserID> /R
 gpresult /V
 whoami /groups
 net localgroup "TEST-MediaSharing" /domain   ... shows members of some groups
 net group /domain TheGroupName

Remote Code Execution[edit]

 psexec ... part of Sysinternals toolkit pstools

Hardware Diagnostics[edit]

 dxdiag  ... displays Direct X Video Card and other HW info

Software[edit]

Firefox[edit]

Disable updates: Set registry key HKEY_LOCAL_MACHINE\Software\Policies\Mozilla\Firefox\DisableAppUpdate to 1

Windows Updates[edit]

Windows updates and patches get stored in:

 %windir%\softwaredistribution\download

Clean up of this directory structure:

 net stop wuauserv
 rmdir %windir%\softwaredistribution  /s /q
 net start wuauserv

Check update log file

 c:\Windows\WindowsUpdate.log