Posted by: nowiremember | June 9, 2009

Create a file of a certain size in Windows XP and later.

If you need to create a file of a certain size and the file contents don’t matter, you can use the Fsutil command as follows:

fsutil file createnew <name of file> <size in bytes>

For example,

fsutil file createnew d:\temp\1mbfile.txt 1000000

creates a 1MB file named 1mbfile.txt in the d:\temp folder. I’ve successfully used this command to create a very large file to reduce the amount of free space when I was using a buggy installation program that couldn’t address too much free space.

Here’s a hardware tip for you. A colleague who had an older computer with Windows Vista installed bought a new computer with no operating system installed, and he wanted to move the system hard drive from his old computer to his new one to take advantage of the improved hardware in the new system. Unfortunately when he tried doing this and booted the new computer, a Stop message 0×7b was displayed that indicated “Inaccessible Boot Device.” So he returned the hard drive to his old computer and investigated this further.

After some additional investigation he discovered a way to resolve his problem: he opened Device Manager and configured his old computer to use the generic Microsoft Standard IDE Controller driver instead the currently installed vendor’s IDE controller driver. Once this was done, he shut down his old computer, removed the system drive, inserted it into his new computer, booted his new computer, and everything worked. He had to reactive Windows of course because of the hardware changes.

Posted by: nowiremember | December 18, 2008

Removing Terminal Server licenses from an RDP client

Thirty-two bit RDP clients store their license under the key HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensing.

To clean the client’s license cache, just delete this key and its subkeys. The next time the client connects to the server, it will obtain another license.

Original Microsoft KB article

Posted by: nowiremember | December 3, 2008

Fixing an messed up EnterpriseDB installation

Lately, I have come across a messed up installation of EnterpriseDB. Basically, the EnterpriseDB install was done on a second hard drive that eventually failed. The EnterpriseDB un-installer was located in the EDB folder, on the failed drive, so it was impossible to use the standard Add/Remove control panel applet. Trying to re-install EDB resulted in the following error:

“A version of EnterpriseDB 8.3.x already exists. Please back up your database and uninstall this version.”

In order to remove EnterpriseDB manually, delete the following directory :

Linux:

/root/InstallShield/Universal/<Version>.vpd

Windows:

C:\Program Files\Common Files\InstallShield\Universal\<Version>.vpd

After that, I was able to re-install EDB without problems.

Posted by: nowiremember | October 21, 2008

How To Quickly Check IP Address on Remote Computers?

Windows does not ship with a command which can be used to quickly check the IP Address information on all the remote computers. You need to use third party tools or a utility to do so. I use Psexec.exe to get this information.

Steps:

  • Create a Text file named Servers.txt
  • Paste all the computer names in the Text file
  • Run the following command to store IP Information to a Text file:

Psexec.exe -@Servers.txt Ipconfig > Result.txt

Posted by: nowiremember | September 17, 2008

How to run your own application when Windows Starts?

This article explains a registry entry which you can use to run your application instead of Windows default Shell (Explorer.exe).

By default, the Windows default Shell (Explorer.exe) is initiated to show the user desktop. You can change this behavior by replacing the Explorer.exe with your own application name at the registry.

Key: HKEY_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

Entry Name: Shell

Value: Explorer.exe

Replace Explorer.exe with your application name. Please make sure you enter the exact path of the application. You need to ask your users to log off and log on for the changes to take affect.

Posted by: nowiremember | September 12, 2008

Use netsh to Change Network Configuration Settings

Here’s how it works. First, you dump your network settings to a text file
through the command line, as follows:
netsh -c interface dump > NetworkSettings.txt
This command stores your current network settings in a text file named
NetworkSettings.txt. Now, let’s say you have to reconfigure your machine’s
network settings to repurpose the machine or move it to a different part of
the network. Then, later, if you need to restore your machine’s original net-
work settings, you can simply type the following command and load back in
the previously dumped settings:
netsh -f NetworkSettings.txt
Note that the destination filename is not important, so you can effectively
create multiple configuration files. You can create and name one for each
network configuration you need. For example, you can use Work.txt for the
office, Home.txt for your home configuration, and something like Client.txt
to hold the values for a network you are temporarily visiting.

Posted by: nowiremember | August 21, 2008

Use the command line to change a system’s DNS suffix

The following command (and resulting output) will set the DNS suffix by updating the NV Domain value, which is found in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters subkey

If you don’t want to change the default DNS suffix, but instead modify only the DNS search list, you can change the SearchList value, which is found at the same registry-subkey location. The value can contain multiple entries separated by commas, such as dom1.com,dom2.com” First, let’s view the current value using the following command (with the resulting output):

Next, use the following command (with the resulting output) to update the SearchList value:

Posted by: nowiremember | August 21, 2008

Create a list of the most-recent computer logons

The following script will create a list of your computers’ most-recent logons by determining the LastLogon value

The following example shows the code input and resulting output on my savilltech server

Posted by: nowiremember | August 21, 2008

Obtain a report of recent logon values in Windows Server 2008

A Server 2008 domain controller (DC) can log successful and failed logon attempts. The following code will create a report of the last logon of the users in the specified containers

The following example shows the code input and resulting output on my savilltech server

Older Posts »

Categories