xcopy problem – Invalid drive specification – 0 File(s) copied

Recently I started getting the following errors from one of my batch files.

Invalid drive specification
0 File(s) copied

The problem was, that I didn’t have specified drive at all, because I was using UNC path (\\ComputerName\SharedFolder\Resource).

So, xcopy is reporting with the wrong error message.

One possibility is, that it is possible to disable UNC paths in xcopy altogether – see the Microsoft KB Q192808.

In my situation, error was caused by broken network connection. Issuing:
net use \\ComputerName\SharedFolder\Resource /USER:user_name password
right before xcopy, fixed the problem.

Logon user into Windows Server 2008 R2 automatically

To bypass log on screen in Microsoft Windows 2008 R2, run the following .reg file:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"AutoAdminLogon"="1"
"DefaultUserName"="YourUserName"
"DefaultPassword"="YourPassword"

You must change YourUserName to your desired user name, and YourPassword to corresponding password.

To import .reg file use:
regedit.exe /s filename.reg

This will import registry values without confirm dialog box. More on importing .reg.

Source taken and more options / registry values: Automatic Logon from windowsnetworking.com

Tested on Microsoft Windows 2008 R2 (Datacenter and Webserver editions).

October 2010, links

Ten caching mistakes that break your app from CodeProject.

Stuxnet is a Windows-specific computer worm. It is also the first known worm to target critical industrial infrastructure. The complexity of the software is very unusual for malware. The attack requires knowledge of industrial processes and an interest in attacking industrial infrastructure. It is digitally signed with two authentic certificates which were stolen. These capabilities would have required a team of people to program. Writing the code would have taken many man-months, if not years. Stuxnet: A possible attack scenario.

Video Introduction to the STL, Part 1 to 5.

TechNet Magazine (September 2010) writes about Top 10 Virtualization Best Practices.

Larry Osterman: It’s a bad idea to have a TEMP environment variable longer than about 130 characters

Wired.com interviews Bjarne Stroustrup.

SOLID (Single responsibility, Open-closed, Liskov substitution, Interface segregation and Dependency inversion).

Ed Guzman: Delegates in C# – attempt to look inside.