Friday, November 28, 2008

[tips] Sharing a folder from the command line

Ever had a (windows) laptop screen or graphics card died? (ie. the 'headless' computer effect). Well it just happened to me. Now, here is where it becomes tricky: How do you get to the files without taking the laptop apart? (you don't want to void the warranty, you don't trust support when they swear your data will be just fine).

One idea is to share folders so that you can access the files through the network. But that does not seem too easy without a screen... Well, usually you can get to log into windows without visual feedback. It is also fairly easy to launch a command line (CTRL-R (run) on XP; on Vista use the 'windows' key, type "cmd [enter]" and your are in). But, how can you share a folder from the command line, so that it will show up on the network?

I found the answer here: http://support.microsoft.com/kb/295622. There is a command line tool, WMIC, which lets you do many things, such as sharing a folder, from the command line. In principle you can even create the shared folder remotely. In my case it did not work out (password was refused for some reason) but I could do it 'blindly' from the command line.

Hope it helps!

No comments:

Post a Comment