Archive for the ‘OS’ Category


Click link to access file

userDefineLang.xml


Mar 23

If you have to update your Linux and you are behind a proxy, you can do the following:

export yourproxyserver:port

from your command line. After you have issued that command, you are free to use yum (or whatever web command you need) as usual.

For a more permanent solution, put this in /etc/profile.d and every user on your system can benefit from it.


Most Recently Used

posted by Knut Torgersen
Dec 26

All of a sudden I got a Most recently used icon on my desktop in W7. It turned up when I emptied the list using Windows Explorer. Nice. Not. Even better, this was not a shortcut, so I could not just delete it.

I right-clicked the desktop and selected CustomizeChange Desktop icons and then cleared the only tick mark I could find – the waste basket – and both the waste basket and the annoying MRU vanished. I turned the basket back on and could close down the windows – no more MRU. Good.


Random number in your batch files?

posted by Knut Torgersen
Nov 24

If you need a random number no larger than 32767, you can use the reserved environment variable %random% to generate one. Try this in a command window:

echo %random%

This should return a value between 0 and 32767. If you need larger, create another random number and multiply them. If you need less, figure out a formula. It is actually quite easy…


Nov 24

To customize the logon screen wallpaper, you can do one of the following:

  • Find a freeware program to create it for you

or

  • DIY

Since doing it yourself is so much more fun… do the following:

  • Click Windows-key+R and type regedit
  • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background
  • Create (if it does not exist) the DWord OEMBackground and set the value to 1
  • Close regedit and open Windows Explorer
  • Navigate to %windir%\system32\oobe
  • Create (if they do not exist) the subdirectories \info\backgrounds so that the full path is %windir%\system32\oobe\info\backgrounds
  • Put your desired logon screen image into this directory and call it backgroundDefault.jpg. This image must be less than 256KB. Thanks, Christian, for pointing out the slip as of the quantifier.

Log out and you have a new background on the logon screen.

…aaaaaand – if you happen to change the theme in W7, the OS reset the OEMBackground to 0. So, you have to set it back to 1.


Annoying user accounts?

posted by Knut Torgersen
Nov 24

So, you have several users on your PC at home – and all those accounts showing like zits on a teenager’s face on the logon screen. Well, you can get rid of them! The following tip works on Vista and W7.

  • Press Ctrl+R and type in regedit and hit Enter
  • Go to the following key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  • Right-click the free area on the right-hand-side window and add the key SpecialAccounts and then under that one UserList. The full path (well, technically the key) is now HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList
  • Right-click in the empty area in the right-hand window and create a new DWord with the exact name of the account you want to hide. Repeat for all accounts you want hidden.

When you log off or reboot now, the unwanted accounts are hidden. To log on, press Ctrl+Alt+Del if you need to type in the account name. If you want to re-enable the click-and-drool-icon for one or more users, either delete the corresponding DWord or set the DWord value to 1.


Nov 1

In an earlier post I wrote how to get around the locked-out root user on Linux flavors that feel root should never be used. Well, there is an even easier way:

sudo passwd
<enter your password>
<invent a secure password for root>

and that’s all.

…One more thing: Linux’es using this mechanism will prompt for your password, not the newly generated root password when you as yourself do things requiring root access.


Oct 28

If you want to resize the disk under VMware, you have to do some of the steps in a command window on your computer (the host), some of it in the VMware GUI, some in gparted – and finally observe the results in your guest OS to see if everything went as planned.

Step 1: Remove any snapshots you might have. This will take time. It does not take a long time to create a snapshot, but removing them is slow. Press Ctrl+M on your powered-down machine and mark the snapshots you want to remove and then click remove. Go for a cup of coffee.

Step 2: Resize the disk using the supplied vmware-vdiskmanager tool:

vmware-vdisktool -x 20GB YourVMdisk.vmdk

where disk size is the new, absolute, size you want. Add appropriate paths to the above, of course.

The resizing will take time, so go for another cup of coffee. When this finishes, go into the VM and observe that you in Disk Manager now have a raw disk corresponding to the difference between your old disk and the size you requested. To put this new size to use, you must use a partition manager, for instance GParted. Downoad the ISO file.

Step 3: Mount the GParted file you downloaded in Step 3 and start your VM. Be quick and press Esc on the POST to enter the boot menu. Select the CD player.

Step 4: Answer all the boot questions.

Step 5: I had problems controlling the mouse, so be prepared to use the keyboard. Experiment… Select the partition you wish to expand and select Resize/Move. I changed the new Size to be the max allowed – and had to try twice to get this working. You might want to leave one MB after the resized partition, to avoid problems later. Accept changes and ask it to process this.

Step 6: Restart the VM and log into Windows. Windows may ask for you to reboot after it has applied changes to the hardware. Do that and then log in again and go into Disk Manager (MMC snap-in) to check the size. if the Windows report corresponds to the one reported from Disk Manager and this again corresponds to what you expected, you’re done. If not …

Step 7: Restart GParted and confirm that Free Space following is indeed 1MB and not 0. If so, do a resize – and accept its complaint that you do not really contribute any changes.

Step 8: Reboot. When Windows starts, it may ask for a file check. Let it. Then, when fully restarted and logged in, you mayfinally see the numbers add up in Disk Manager.


Removing system restore data

posted by Knut Torgersen
Oct 26

If you have used your PC for a while and your HDD isn’t the largest on the market, your C: may go full without you excactly understanding why.

The hidden and protected (from you) directory C:\System Volume Information contains the system restore data in a sub directory alongside other files needed for the job to get done. If your computer works like it should – except for the lack of disk space – you can temporarily turn off system restore. Note: You can no longer restore your system to a previous state after performing this step!  This will within a minute or two completely empty the system of restore information and you free some valuable GB.

Here is how you do it:

  • Start Windows Explorer
  • Right-click My Computer
  • Select Properties
  • Click the tab marked System Restore
  • Click Turn off System Restore
  • A confirmation dialog appears. Click Yes.
  • When this box closes by itself, reopen it and turn System Restore back on

You have now effectively removed all system restore points and freed a few GB doing so.


Oct 24

Got the following tip from a colleague at work.

Most PCs support the wmic command. This one spans a huge number of parameters – so, experiment and see what it can do. But do read the instructions to each parameter first! You don’t want to end up with an empty hard drive or something!

Try these from a command prompt:

Serial number:
wmic bios get serialnumber

Product ID:
wmic csproduct get name