Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

2012-09-30

Moving Windows 7 user homedir

A brand new Windows 7 install puts the Users folder on the C drive.
My C drive is an SSD, so space is at premium.
I moved my homedir to the secondary HD this way:
  • Create a new administrative account called "admin".
  • Reboot (just to close file locks) and login as "admin"
  • Open a command prompt with administrative privileges

mkdir D:\Users
robocopy C:\Users\myaccount D:\Users\myaccount /mir /copyall /xj
rmdir /s C:\Users\myaccount
mklink /j C:\Users\myaccount D:\Users\myaccount

  • Logoff an login back as the migrated account.
  • Remove the now useless "admin" user.
Note: while deleting the source directory, Windows may complain about CurrentDatabase_372.wmdb beeing in use.
Just stop service WMPNetworkSvc and repeat.

2011-12-25

Move the Start button to a better place, please

Redmond, UI Drawing Board committee, early nineties:

"Where should we put the menu bar?"
"Top border!"

"Where should we click the window to drag it?"
"Top border!"

"Where should we put the close button?"
"Top right!"

"Where should we put the minimize and maximize buttons?"
"Top right!"

"And finally, where should we put the Start button?"
"mmmmh... Bottom left!"



Who made that decision may be the Inspector Clouseau of UI Design.
He's responsible for billions of km of useless mouse travel between to most important elements of the user interface.
A better place would be the top row of the screen, as the Mac did in '84:


But I suspect that it wasn't done due to a possible legal issue.

Now that widescreens are the norm, there's a better place to put the taskbask: the right side of the screen:
It's closer to the menu, the gadgets and, by taking up some vertical space, it allows more 4:3-like space to the windows.



Even Unity has its deadly sins too...

2011-12-04

Expanding the C drive of a VM

This was tested on Windows 2003 R2

Here's a VM that need its C drive expanded:


Edit VM Setting and set the new VMDK size (this can be done online).


Rescan disks, and you'll see extra free space at the end of the partition.


Now boot into Parted Magic.
Select the first partition, click Resize and set the new size.


You will have to select Apply to actually do the resize.

Reboot into Windows.
CHKDSK will run automatically and finally you will have your expanded C drive.

2011-12-02

Windows networking reconfiguration script

If you happen to travel a lot, you'll find yourself changing the ip configuration of your windows laptop more than you'd like to.
Here are a couple of scripts that may come handy.

This script sets your ethernet to DHCP:

@echo off

set INTERFACENAME="Local Area Connection"
ipconfig | findstr Connessione >nul:
if %ERRORLEVEL%==0 set INTERFACENAME="Connessione alla rete locale (LAN)"

netsh interface ip set address %INTERFACENAME% dhcp
netsh interface ip set dns %INTERFACENAME% dhcp

ipconfig /renew %INTERFACENAME%

Note that the script tries to detect the windows language and sets the ethernet interface name accordingly.

This one sets a static IP 1.2.3.4:

@echo off
set IP=1.2.3.4
set MASK=255.255.0.0
set GW=1.2.3.1
set DNS=1.2.3.10

set INTERFACENAME="Local Area Connection"
ipconfig | findstr Connessione >nul:
if %ERRORLEVEL%==0 set INTERFACENAME="Connessione alla rete locale (LAN)"

ipconfig /release %INTERFACENAME%

netsh interface ip set address %INTERFACENAME% static %IP% %MASK% %GW% 1
netsh interface ip set dns %INTERFACENAME% static %DNS%