Category Archives: Windows Administration

Making a USB flash drive for Window setup

This article demonstrates how to copy a Windows installation source to a USB flash drive (UFD), and make that UFD bootable, without using any third-party app. Every now and then, such an article must be re-written to update the sum of knowledge. Only the tools included with the operating system are used. This article assumes you have at least Windows 7. Also, it assumes that the OS you’d like to copy to a UFD is Windows Vista, 7, 8, 8.1 or 10 and is already available to you on DVD or in folder somewhere.

Read the rest of this entry

Where can I find BootSect.exe and BootRec.exe?

BootSect.exe and BootRec.exe are both components of Windows Vista and later. They help make disks bootable.

Both are included with a Windows DVD or ISO but are not installed.

BootSect.exe features /nt60, /nt52 and /mbr switches. It can be found in the “boot” folder, at the root of the Windows DVD.

BootRec.exe features /FixMbr, /FixBoot and /RebuildBCD switches. However, it is harder to find. It is only exposed if a computer is booted into Windows Setup or Windows Recovery Environment. Otherwise, one has to extract it from the “boot.wim” file in the “sources” folder of Windows setup disc, or  the “winre.wim” file in a subfolder of “C:\Recovery” folder (although you might not find such a file), via DISM or 7-Zip. Once either of the two images of “boot.wim” are mounted or opened, BootRec.exe can be located under “Windows\System32” subfolder.

The definitive guide to stopping forced Windows 10 upgrades (GWX) permanently

Screenshot: Forced upgrade to Windows 10 in progress

Screenshot of the Get Windows 10 (GWX) app, which forces users to upgrade to Windows 10

So… are you annoyed by the Get Windows 10 (GWX) app which hogs your bandwidth and tries to persuade you to upgrade to Windows 10? And you want to put a stop to it? You are in the right place.

Read the rest of this entry

Unregistering and deleting an event log

Today, I’ve decided to write about unregistering and deleting Windows event logs, because searching the web about this subject brings up some very dangerous results with dangerous consequences.

Event Viewer in Windows Vista: In comparison to its predecessor in Windows Server 2003, it has become several times more elaborate to accommodate the vast logging infrastructure introduced in this version of Windows.

Event Viewer in Windows Vista: In comparison to its predecessor in Windows Server 2003, it has become several times more elaborate to accommodate the vast logging infrastructure introduced in this version of Windows.

Problem: A user notices redundant event logs in Event Viewer or PowerShell, i.e. the program with which they were associated are now gone and their contents is irrelevant. These event logs might be occupying valuable disk space, e.g. 128 MB. Deleting them is tempting.

This article requires Windows PowerShell 2.0 or later, which comes with Windows 7 and Windows Server 2008 R2.

Cautious approach

If reclaiming disk space is the goal, then empty the log and forget about it. An empty log that occupies a just few bytes is not a problem on a computer that has 165,606 files.

Unregistering and deleting the log file only makes sense when the sheer number of these logs is causing a slowdown (e.g. when there are 100 redundant logs) or when eliminating all traces of an app from a computer is important (e.g. mandated by a corporate policy).

A word of warning

The following event logs are part of Windows; if you unregister them by accident, the ensuing dire consequences may force you to reinstall Windows. You can empty them if you wish, but never unregister them:

  • Application
  • HardwareEvents
  • Internet Explorer
  • Key Management Service
  • Security
  • System
  • Windows PowerShell

Unregistering and deleting via PowerShell

To see a list of registered event logs in PowerShell, issue a Get-EventLog -List order. Here is an example of the result:

PS C:\Windows\system32> Get-EventLog -list

Max(K) Retain OverflowAction        Entries Log
  ------ ------ --------------        ------- ---
  20,480      0 OverwriteAsNeeded      32,288 Application
     512      1 OverwriteOlder              0 Autodesk REX
     512      7 OverwriteOlder              1 COMODO Internet Security
     512      7 OverwriteOlder            142 GhostBuster
  20,480      0 OverwriteAsNeeded           0 HardwareEvents
     512      7 OverwriteOlder              0 Internet Explorer
  20,480      0 OverwriteAsNeeded           0 Key Management Service
     128      0 OverwriteAsNeeded         671 OAlerts
  20,480      0 OverwriteAsNeeded       6,362 Security
  20,480      0 OverwriteAsNeeded      55,179 System
     512      7 OverwriteOlder          1,211 TuneUp
  15,360      0 OverwriteAsNeeded         387 Windows PowerShell

To delete an event log from the list, use Remove-EventLog -LogName command, as follows:

PS C:\Windows\system32> Remove-EventLog -LogName "Autodesk REX"
PS C:\Windows\system32> Remove-EventLog -LogName GhostBuster

There won’t be any message indicating success, but failure would be reported. Below is an example of what happens if you try to delete a non-existing log or try deleting an existing log without administrative privileges.

PS C:\Windows\system32> Remove-EventLog -LogName System2
Remove-EventLog : The Log name "System2" does not exist in the computer "localhost".
At line:1 char:1
+ Remove-EventLog -LogName System2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Remove-EventLog], InvalidOperationException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.RemoveEventLogCommand
PS C:\Windows\system32> Remove-EventLog -LogName System
Remove-EventLog : Requested registry access is not allowed.
At line:1 char:1
+ Remove-EventLog Security
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [Remove-EventLog], SecurityException
+ FullyQualifiedErrorId : NewEventlogException,Microsoft.PowerShell.Commands.RemoveEventLogCommand

Installing Windows 8.1 Update 1 demystified

This article assumes you have heard about the new features of Windows 8.1 in Update 1 and decided to give it a try. So, you’d install a stock Windows 8.1 from a DVD and then proceed to Windows Update to install Update 1.

But you don’t find it there.

Find out why…

Copying NTFS permissions between folders

Let’s assume you have created a folder called “Programs” in your D: volume and now you want its NTFS permissions to match that of “C:\Program Files”, thus having the same level of security.

Basic NTFS permission of "Program Files" folder in Windows 7

Basic NTFS permission of “Program Files” folder in Windows 7

There are more than one ways:

  1. Via icACLs and Notepad
  2. Via Windows PowerShell
  3. Via XCopy
  4. Via Robocopy

This article only elaborates on the first two. Since the subject of NTFS security is one that requires intermediate knowledge of Windows, I will skip elementary details such as how to run a certain program with elevated privileges. Read the rest of this entry

Finding wallpaper location in Windows 7 and Windows 8

This article introduces two PowerShell scripts that help you find the wallpaper location in Windows 7 and Windows 8.

View of Garachico, Tenerife, Spain by Diego Delso

View of Garachico, Tenerife, Spain by Diego Delso

Read the rest of this entry

Windows 8.1 – An update fiasco

Windows 8.1, advertised as a free update, has arrived. But it is neither free nor an update.

Windows 8.0 in comparison to Windows 8.1.

Windows 8.0 in comparison to Windows 8.1

Read the rest of this entry

OneNote 2013 jumplist missing

OneNote 2013 should have a jumplist/task list like this when you right-click on its pinned icon in Windows 7 or later:

OneNote 2013 jumplist

OneNote 2013 jumplist

If it did not appear, make sure you have the correct (official) OneNote icon pinned. After that, open Run… dialog box (press Windows + R key combination), type the following and press Enter key:

onenote /initjumplist

It works in Command Prompt too, only you have to prefix “start ” (without quotation marks and with the trailing space character) to it.

Windows 8.1 Preview: Hits and misses

Windows 8.1 Preview has both new features and flops, some of which are bugs that will be solved by the time it is released to manufacturing (RTM) and some are flops by design and will never get fixed.
Screenshot: Windows 8.1 error  on small screen
Here is the first: Windows 8.1 Preview still does not run Metro-style apps on screens whose vertical resolution is lower than 768. That means, they do not run on your 720p High Definition TV (1280×720) .

Read the rest of this entry

%d bloggers like this: