Tech That!

The rantings of a mad scientist

Posts Tagged ‘windows

Windows 7 login screen only showing last logged-on user and “Other user”

with 59 comments

Ever since my initial install of Windows 7, there has been one thing nagging me. The Windows welcome screen only ever displayed the avatar for the last logged on user and a blank image with the label “Other users”. When the latter was clicked, two text fields would appear prompting for username and password.

I have tried numerous solutions, but none have worked until very recently when a user with the nickname “SaySay” came up with the following solution:

Legal disclaimer: Modifying REGISTRY settings incorrectly can cause serious problems that may prevent your computer from booting properly. Neither I nor Microsoft can guarantee that any problems resulting from the configuring of REGISTRY settings can be solved. Modifications of these settings are at your own risk

  1. Open regedit
    1. Press Windows+R
    2. Type regedit + enter
  2. Navigate to [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList]
  3. You will probably want to right-click on “ProfileList” and click export to save the entire subtree in case something goes wrong.
  4. You will find several subfolders or “keys” named something like “S-1-x-xx…”, open them one at the time
  5. Each should contain at least the three value-sets, “Flags”, “ProfileImagePath” and “State”, some will contain more
    1. Look at the end of ProfileImagePath for the name of the user represented by the key
    2. You will usually have one for each user on the system, and one for each of the three system entries ‘systemprofile’, ‘LocalService’ and ’NetworkService’
  6. Delete any key (i.e. the whole “S-1-x-xx” folder) that does not contain at least those three values
  7. The welcome screen should now work as expected, showing the avatar for all registered users; enjoy!
UPDATE 2011-08-05: I’ve been made aware that the .DEFAULT directory should also be deleted if present (if it is a subdirectory of ProfileList that is…). Thanks to Shawn Melton.

Written by Jon Gjengset

June 24, 2010 at 16:23

Downloading a mms://video stream

leave a comment »

Have you ever wanted to watch a video online, but due to a slow connection or frequent dropouts, streaming is impossible to watch. In these cases, there is rarely a “Download” button that allows you to download the entire thing and watch it in full when it’s done. Evidently, this is a real-world application of Murphy’s law.

Here at Bond University, some lectures are streamed and saved for later viewing. These are available to all students from an online interface. The problem is that these videos are streamed (in the proper sense of the word – that is, not that they just play as you download, but as in that the browser has to play back a continuous video stream which causes problems on slow connections since the browser cannot keep up, and has to stop the video all the time and request that the server restart from a previous point in time) even when the lecture has been completed. Even when sitting in the on-campus accomodation, the connection or the server (I don’t know which) is too slow to cope with playing these videos in real time, and such, it is a nightmare trying to watch any of these lectures.

The streaming plays in Windows Media Player and uses a protocol called mms:// (Multimedia stream). VLC and Mplayer can both play this as well, but take ages to load for some reason.

In my frustration, I decided to find out how to download the stream so I can play it without delay, and rewind and fast-forward as much as I wanted. Turns out this is not as straight forward as one would expect with streams.

First of all, the file is never present as a file from the server, only as a stream. This means that you cannot download the video faster than the actual length of the video. A two hour lecture therefore takes at least two hours to download. Furthermore, you cannot simply right-click the video and attempt to get the URL and download that because this will only give you a tiny text file with more URLs.

So, here is what you have to do:

  1. Get Mplayer
  2. Go to the page with the streaming video on it and right click the video
  3. Select properties and copy the URL from the window that opens
  4. Open a new tab in your browser and navigate to the given URL
  5. Press Ctrl+S, or otherwise save the page
  6. Open the downloaded file with notepad, you should see something like this:
    [Reference]
    Ref1=http://straumod.nrk.no/disk02/Lovebakken/2009-09-11/?MSWMExt=.asf
    Ref2=http://10.103.0.56:80/disk02/Lovebakken/2009-09-11/?MSWMExt=.asf
  7. Copy either of the URLs
  8. Start mplayer with the following parameters: “-dumpstream -dumpfile stream.wmv <URL>”
    For those of you who are not familiar with MPlayer and run Windows, here is how you do that:

    • Press Win+R or press the Start menu and click “Run”
    • Type “cmd” and press enter
    • In the new window, type “cd \”, press enter, type “mkdir stream”, press enter, type “cd stream” – The previous commands made a new folder in the root of your main drive called “stream”
    • Next, to run mplayer: type “C.\Program Files\mplayer and press tab (with the opening quote at the beginning before pressing tab), type “\mplayer” (without the quotes) and press tab again
    • Write a space, followed by the parameters written above (starting with “-dumpstream”), replacing “<URL>” with the URL you copied in step 7
    • Press enter and wait
    • When the program finishes (i.e. the last line says something like “C:\stream>”), you should find the video in the folder “C:\stream” as “stream.wmv”.
    • Rename, play and enjoy!

Written by Jon Gjengset

December 13, 2009 at 14:43

Recovering data from a Mac drive from Linux

leave a comment »

The Mac of a friend of mine crashed the other day – complete harddrive failure. He turned it into the Apple store, and they decided to give him a new disk because they said they couldn’t recover the old one. Somehow, he managed to talk them into leaving him with the old drive so he could try to get at least some of his data back. My friend then came to me, and asked me to have a look at what I could find.

He had already tried to hook the drive into another mac, but it just froze every time he tried to enter a folder on the drive. The same happened when I used my SATA docking station, and attempted to either access or repair the drive through a piece of software called MacDrive. It seemed as though all hope was lost.

I decided to give it another shot from Linux, just to see if I could somehow avoid the corrupt files, and copy only those that could be properly read. Turns out, Linux didn’t even break a sweat when seeing the corrupted harddrive. All I had to do ( using Arch Linux that is ) was this:

  1. Attach drive to my SATA dock
  2. Mount the drive: “mount /dev/sdg2 /mnt/ext”
    • This assumes the external drive is sdg, check “fdisk -l” to find attached drives
    • Mac-formatted drives have at least two partitions ( one is the boot partition ). Therefore, you must mount partition two ( or whichever is formatted as HFS+ )
    • Because Apple decided to use journaling on their HFS+ drives, these are not writable from Linux. Either live with it, or insert the drive into a Mac, open up the terminal ( usually Applications/Utilities/Terminal ) and run “diskutil disableJournal /dev/disk#” where # is the drive number. Find the drive number by running “diskutil list”. For more info, see: http://castyour.net/node/40
  3. Run “cd /mnt/ext/”
  4. Navigate to whatever folder you want to copy and run “cp -R <folder> <destination>”
  5. The cp command will then dutifully copy all the files it can read properly into your destination folder, and tell you if it can’t read a file. It will automatically skip them.
  6. Your files are saved!

Written by Jon Gjengset

November 15, 2009 at 19:29

Hot-swapping drives in Windows 7

with 5 comments

I have recently bought two external SATA docking stations – one internal ( i.e. it fits in a 5.25″ bay, and loads the drive from the outside like a large floppy ), and the other one completely external and connected through eSATA. For the first couple of weeks, I thought hot-swapping was not possible with these, and kept rebooting if I wanted to swap out a drive, however one day I came across a setting in BIOS describing how SATA drives should be treated. It was set to “IDE compatible”.. The other options were “Enhanced” and “AHCI”. I tried googling this, and soon found that AHCI is actually a technology that enables plenty of the cool features of the SATA technology – most notably hot-swapping!

I enabled AHCI, booted up the computer, and Windows 7 presented me with a BSOD… Again, Google was my friend, and I found several other people who got the same problem when enabling AHCI after install. It seems as though Windows 7 checks for AHCI when installed, and determines then whether to load the AHCI drivers or not.. It then never checks again…. Smart…

Luckily, there is a solution.. First you have to get back into Windows my resetting the SATA drives to “IDE compatible” mode. Next, open up the registry explorer, and follow this guide: http://support.microsoft.com/kb/922976. If it is already set to 0, set it to 1, then to 0 again, and reboot. Now, set the drives to AHCI in BIOS, and reboot again. Hopefully your Windows should start up without a bluescreen.

Now, all your SATA drives will appear  when you use the “Safely remove device” icon near the clock in the bottom right corner. If you choose to remove a drive, you can eject it from there and then take it out and put in a new one. This is where the problems start to arrive though. Sometimes, this approach works without a problem, but sometimes Windows simply goes silent, and acts as though nothing has been connected at all. Other times, it tells you that it has found partitions, but that they are in RAW format, and have to be reformatted!

After living with this for a couple of days, I decided that there had to be a more stable way of doing this, and that was when I came across HotSwap!. This piece of software is made for managing hot-swap drives in Windows, and once installed, allows you not only to scan for new drives ( and load them properly! ), but also to safely remove them AFTER doing a spin-down.

After running this stand-alone .exe, you can set it to autostart with Windows. After that, whenever you want to swap a drive, just right-click the hotswap icon at the bottom right near your clock, safely remove the device you want to swap, exchange the drives and choose “Scan for changes” in the HotSwap! menu and up comes your drive!

Happy hot-swapping!

Written by Jon Gjengset

November 9, 2009 at 12:43

Posted in References, Tech

Tagged with , , , , , ,

Using a multi-monitor wallpaper in Windows 7

leave a comment »

Ever wanted to use a multi-monitor wallpaper / background image in Windows 7 ( or perhaps Windows Vista ), and found that it ends up showing a scaled down version of it of both screens? I did, and for a long time, I tried to find a piece of software that would enable me to stretch the image across both screens instead. For a while I gave up, finding no viable solutions. A couple of days ago though, I was playing around with the wallpaper controls in Windows 7, and just for fun I tried setting the background to “tiling”. And guess what? Suddenly, my multi-screen wallpaper stretched across both screens! “Stretch” and “fit” both seem to stretch the image across each screen individually, so you end up with the same image on both screens, but when tiling, if the image is large enough, the image will actually be put across both screens the way it is supposed to!

So, step-by-step you say?

  1. Right click your desktop
  2. Choose “Personalize” ( usually at the bottom )
  3. Click “Desktop background” at the bottom of the window
  4. Select your multi-monitor background image
  5. Select “Tiling” as the wallpaper placement mode ( usually sets “stretch” or “fit” by default )
  6. Enjoy your beautiful multi-monitor desktop!

Written by Jon Gjengset

November 9, 2009 at 12:16

Dual booting Windows 7 and (Arch) Linux, and the hassels involved

with 4 comments

This week I have been setting up my new computer – a complete beast with Intel Quad Core i7 processor, 12 GB memory, 4 * 1TB drives in RAID 1+0, etc. On this computer, I decided to put both Windows 7, which is provided for free through the MSDN Academic Alliance and Arch Linux ( which I fell in love with the first time I tried it ).

Since getting an account with MSDN took a while, I decided to put Arch on the box first, even though the Windows bootloader is known to foul up GRUB and make it impossible to boot into linux.

First step was installing Arch.. Usually, this is quite hassle free, but because of the slow internet at the accomodation center at Bond University, I downloaded the Net Install CD so that I could install and download only what I needed. Sounds logical, right? Well, not when I tell you that, as I discovered, you have to login to access the wired network. When opening a browser, you’re presented with a login screen though HTTPS, that has to be completed every time your IP changes. Problem is, the netinstall CD has no browser installed as it is command-line only, and as such, I had no way of authenticating with the network, which again lead me to being unable to download any packages for my system. So, what do you do?

Logging into an HTTPS proxy through command line tools

My first though was to use links or lynx ( text-based unix browsers ), however neither were available on the netinstall CD, and I couldn’t compile either from source since the build tools and dependencies were not there. At this point, I was certain I would have to download the full Arch install CD, and start all over again, however, I was not prepared to give up that easily. There is a reason I use Arch – to understand how things work from the ground up, and to force myself into exploring Linux.

At first, the only solution I could think of was to telnet into the login server over HTTPS, send the proper POST headers by hand, and thereby become authenticated. Finding the correct headers on my laptop was not a problem, however hand-typing them onto the linux shell posed a problem. Not in getting it right, but because the HTTPS connection of the login server had a timeout for requests at about 10 seconds… The end request looked something like this:

POST /login.pl HTTP/1.1
Host: login.bond.edu.au
Connection-type: keep-alive
Keep-alive: 300
Content-type: application/x-www-form-urlencoded
Content-length: 112

_FORM_SUBMIT=1&which_form=reg&source=<my IP>&destination=&error=&bs_name=<Student ID>&bs_password=<URL encoded password>

As you can probably imagine, hand-typing that in 10 seconds is not an easy task. Evidently it was not going to work, which was why I started exploring the unix philosophy of separation of tasks. Why should I type all that text, why couldn’t the computer type it for me? I created a file with the request, and used the unix command “cat” to print the file. I then piped the output through my telnet connection as such:

cat request | telnet login.bond.edu.au 443

To my surprise, this just caused the connection to time out without any error message… After trying a multitude of alternative versions of the above, I concluded that parts of the request was probably printed to the server before the connection was actually established, which caused the server to disconnect the session.

I felt quite lost, and was very close to getting a full Arch install ( and thereby have to wait for about 5-6 hours for the download to complete… ), when I remembered the “wget” command. This is a command that allows you to download files from the web through HTTP/HTTPS/SCP/SFTP/FTP. Maybe it could also send a POST request?

Not only was wget included in the netinstall CD, but after looking at the manpages, I also found the argument “–post-file”, which allows you to send urlencoded data through POST when submitting the request. I was saved! I stripped everything except the data from my request file, and issued the following command:

wget --post-file request --save-cookies s.cookie https://login.bond.edu.au/login.pl

Looking at the downloaded HTML file, I soon found that I had successfully been logged in, and I could start the actual installation!

Both the installation, and the subsequent configuration ( installation of GNOME, setting up drivers, etc.. ) posed no problem as usual, though it all took quite a while having to download it all though the 1 Mbit/s throttled connection at the student residences. Next morning however, my computer was up and running just the way I wanted it. Windows 7 next…

Windows 7

First of all, I had to download Windows 7 from MSDN, which proved to be impossible from linux. It provided a downloader, which, when run through wine, simply refused to download the file properly.. In the end, I had to download the ISO on my laptop ( running Vista ), and burn the DVD from there. From here, the ride was smooth. Installation of Windows 7 was both painless and fast, and I was up and running in 30 minutes. Great!

Next was getting GRUB back on the MBR, since Windows overrides all other bootloades when installed. At first, I tried looking for a windows installer that could restore GRUB to the MBR, but this does not seem to be available, so I had to get down and dirty with the unix command line again. Hooray! =D

I rebooted, and started up from the Arch installation CD. From there, you have two options to restore the grub. Both involve getting your original Linux partition mounted, and then running grub-install from there.

1. Boot the Arch Linux Live CD, mount your linux partition using “mount /dev/sd** /media/fl” where ** is the device and partition of your Linux boot partition. Next, you have to run: “grub-install –root-directory=/media/fl /dev/sd*” where * is the device you wish to boot from..

2. Open the “More Options” selection on the boot screen of the CD, and then highlight the option “[EDIT ME] Boot Linux Directly”. Next, press ‘e’ to edit the line. Here, edit the line “root (hd0,0)” to match your device and partition. Next, edit the two other lines, and change /vmlinuz and /kernel ( can’t remember the exact filenames ) to read “/boot/vmlinuz” and “/boot/kernel” respectively. Due note that these are the default paths, but yours might differ. Also, you might have to change the line that contains “root=/dev/sda3″ to fit your setup. Finally, press ‘b’ to boot the linux partition. You will now find yourself in your normal Linux install. From there, you can run “grub-install /dev/sd**” as in 1.

Why the two options? For some reason I didn’t think of the first option until after I did #2. Maybe it will come in useful at some time…?

Now, to get Windows available from GRUB, edit “/boot/grub/menu.lst”, and uncomment the Windows lines at the bottom, and input the correct device and partition.

And then, you’re done! Congratulations! You’re dual-booting Windows 7 and Linux

Written by Jon Gjengset

September 18, 2009 at 16:18

Follow

Get every new post delivered to your Inbox.