Monday, April 8, 2013

Automatic login and lock in Windows

Lock n' Load

Difficulty: beginner

Yes.  Cheesy title, but effective little tweak I discovered recently.  You know how you start up your computer... wait to get to log in... then enter password... then wait even LONGER as Windows loads up all your startup items?  This is probably one of the reasons why people just prefer to put their computer to sleep/standby all the time or even hibernate.  A few issues: 1) power consumption, 2) time it takes to hibernate (It writes everything on RAM to your hard drive.  It is slow on a mechanical drive and is destructive on a solid state drive.) 3) Even with a SSD, the screen takes a second or two to initialize and show you the login screen -- wasted idle time!  4) Windows seems to behave better when you restart often.

I like to turn on my laptop and then go grab a cup of water or something and I would very much like to have my computer ready to go when I get back.  Even better is if you have startup programs do their thing when you turn on your computer (torrenting, virus scanning, etc.).  The problem with automatic login is it usually requires having no password at all or you can't walk away once you first boot up your system (security risk in public).

*Note: this was done in Windows 7.  It should also work on Vista.  For XP, visit http://support.microsoft.com/kb/315231 in lieu of the first few steps.
Anyway, here we go:

Step 1:  Hit the start button and type in "netplwiz".  Click the program.

Step 1.  I just cropped out all the whtie space here.

Step 2:  Uncheck the box next to "Users must enter a user name and password to use this computer.  See below.  *At this point you will be prompted to enter your current password to authorize this change.  Yeah - go ahead and do it and hit "OK" to finish.

Step 2.

Step 3:  Go to your start menu and find the "Startup" folder under "All Programs".  Right click it and press "Open".  

Step 3.

Step 4:  Right-click in the window, go to "New >" and click "Shortcut".

Step 4.
Step 5:  In the text field "Type the location of the item:", enter "C:\Windows\System32\rundll32.exe user32.dll,LockWorkStation".  Click "Next", enter a name like "Lock computer" in the next window, and click "Finish".

Step 5

Step 6:  Double check that the new shortcut is working by double-clicking it.  Your computer should be locked.  If this step is successful, try restarting your computer.  You'll notice now on the login screen, it says "Locked" under your username.  SUCCESS!  Your computer has already started loading your items!

OPTIONAL:

Change the icon of the new "Lock computer" shortcut:
1) Find that shortcut again.  (Step 3)
2) Right click it, click properties.
3) Click the "Change Icon..." button.
4) Choose an icon.  I use the yellow square key icon.  I also like the padlock there!  If you don't see any items, enter this into "Look for icons in this file:"  "%SystemRoot%\system32\SHELL32.dll"
5) Hit OK and you're done!

Change the lock/login screen in Windows 7:
http://www.julien-manici.com/windows_7_logon_background_changer/

Do more to improve bootup times:
1) 'Tis easy: download CCleaner and install.
2) Go to "Tools", then "Startup".
3) Weed out programs that you don't need to start up every time you start your computer.  I disable pretty much anything that isn't "Intel" related.  I keep "F.lux" and "Skydrive" enabled -- very small programs.

*Disclaimer:  I haven't tested this out on a slow system so I'm not 100% sure there isn't a window between automatic login and locking that proves to be a vulnerability.  It happens instantaneously on my laptop.

Thursday, January 31, 2013

Fixing a mouse click switch (Right click on a Logitech VX Nano)

Intermediate/Advanced level guide to fixing a problematic mouse click:


Do you have a randomly unresponsive left or right mouse click?  Do you run into problems holding the button down? It is common for switch contacts to oxidize and no longer conduct well.  A symptom is sporadic mouse clicks when you try to drag or hold the button down.  I'm in the middle of right-click dragging a file somewhere and all of a sudden in mid drag, the button "lets go" and clicks again.

Being even a mildly active PC gamer means tons of clicking.  My mouse is now almost 5 years old.  I played tons of League of Legends and Diablo II and Torchlight... all VERY clicking-intensive.  I was playing Path of Exile where you hold the mouse button on an enemy to lock on and attack.  Needless to say, I kept dying when my mouse failed to register my attacks... Anyways, let's jump right in!

Please note:  this repair requires fairly steady hands and involves small parts.  Please have good lighting and have a container/cup to hold all the parts.  

You will need: Philips/flat screwdriver, razor blade, lint-free microfiber cloth (for cleaning eyeglasses for example), rubbing alcohol, tweezers.


This is my mouse.


On the bottom of pretty much any mouse, you will see what I think are teflon pads or "feet".  These cover the screws usually.  If you can access the screws without taking these off, great!  Otherwise...

1) If applicable, turn off your mouse and remove the batteries.  Otherwise, unplug it.

2) Use a small flat screwdriver or razor blade to pry off teflon feet.  Be careful to not cut them up or damage them excessively.  They are attached with a medium strength adhesive.  Try using a hairdryer to soften up the adhesive if it is being stubborn.  Don't overheat the whole mouse!


My mouse with rubber feet removed and screws exposed.  Looks like my mouse is displeased with me.

3) Remove the screws with a suitably sized Philips screwdriver.


*TIP: For ANY electronics work, please use a screwdriver set that looks like this.  You can get it from any dollar store.  I paid $1.50 at Daiso for this set.  Why is this important?  It is very easy to accidentally overtighten and strip the screws or the plastic.  These small screws are all meant to be tightened with only a small amount of force.  The narrow body of these screwdrivers prevents you from overtightening.  (Remember "mechanical advantage" from physics?  Any screwdriver with a normal/big grip will give you too much!)  Plus you can put one finger on the top and rotate the screwdriver with the others.  Trust me, you'll know what I'm talking about once you get these.  (I also have a plastic spudger made out of a cut credit card.  Useful for prying things open without damaging the surrounding material.)


4) Check in the battery compartment for more screws.  In my case, I had two more here.  I had 5 in total.


5) Crack 'er open!  Spudger (just something with a blunt, non-damaging edge like a credit card) might be useful here, but usually once you remove the last screw, the two halves will separate readily.


Exposed in all the glory.  If you have a dirty mouse wheel, now is a good time to clean it!  Wipe it good.  The black rectangles with white nubs are what we are interested in.  These are the click switches.  I will refer to the black piece as the switch box.  It is literally a plastic box covering the metal switch with a hole for the white plastic nub that pushes it.


6) Locate the offending mouse click switch.  Mine are Omron branded as seen here.  High quality stuff in my opinion.  NOTE the orientation of this switch!  You need to reassemble it later and you don't want to put it back on backwards!  There will be tabs on both short sides of this switch box.  Use a razor blade to pry the tabs outwards and then upwards.  It can be frustrating, so take your time and do this carefully.  Try to pry from the bottom center rather than just a corner.  Once free, lift it up and off!  BE CAREFUL and do not lose the clicking button! (white bars on the switches in my pictures)  It will probably fall out unless you hold your mouse sideways while removing the outer shell. 
Edit: You can stick a piece of tape on the top to prevent losing it also.  See picture below when I use tape to hold things in place when reassembling.  Thanks, Johan for the suggestion!
Keep these safe and out of the way!



**ALTERNATIVE:  If you can't remove the switch box, don't have a click switch with a removable box, or don't feel like getting more involved, do this:  Use rubbing alcohol (isopropyl alcohol) and apply it with a Q-tip (cotton swab).  Dab it directly on to the top of the white nub where it clicks and get some alcohol in there.  Work it in by clicking furiously.  Do this several times to try to clean out the contacts.  Important:  Let the mouse dry out for at LEAST a couple hours!  If possible, I would give it a whole day to be on the safe side.  In a warm room, it might only need 2-4 hours, but please be cautious.  (You can try to smell the residual alcohol.  Noses are pretty sensitive.)


Don't let these guys escape.  Keep them away from your hands so you don't accidentally knock it on to the floor or something.  Better yet, keep these in a cup or small container with all the screws!


My camera's macro isn't that great so here's a slightly zoomed out shot of the actual copper contacts in the mouse.  

7) TAKE NOTE of how it is arranged.  Make a drawing if you have to!  Nothing is more frustrating than removing this only to not know how to put it back on.


8) Using tweezers, slide this top piece of copper "foil" sideways to free it from the contacts.  (I'm just going to call it the "foil".  It is thin enough.  Don't accidentally bend it!)


9) Look at where my screwdriver is pointing.  You need to clean both the top and bottom of these contacts.  Use a lint-free microfiber cloth (I used the cloth made for cleaning my eyeglasses) dabbed in a rubbing alcohol solution.  I like to use diluted rubbing alcohol (70% diluted to half strength) because it works just as well and isn't as harsh.  Pure rubbing alcohol will be fine, however.

Optional: Use a small flat-blade screwdriver to scrape the bottom of the contact a bit.  Usually you can see a small nub where the foil touches the contacts.  Scraping it removes oxidation and exposes new copper which is VERY bright and shiny!  Clean this again with alcohol.



Use a 50/50 mixture of rubbing alcohol solution / water to clean just about anything.  It is great for cleaning any sort of screen and keyboard.  Oh, might as well wipe your mouse down with it while you're here! :)  For screens, dry with a lint-free cloth to prevent water spots from forming.  I use filtered water to minimize such deposits.


10) You also need to clean these contacts where my screwdriver is pointing.  This is the two-position contact area.  The foil is up at rest and touches the bottom piece when clicking.  Same as before, use alcohol and a lint-free microfiber cloth.  However, I absolutely recommend that you take a screwdriver to scrape the bottom contact!  You will see fresh new copper under the layer of oxidation.  It is beautifully shiny... Wipe with alcohol.


11) Reassembly time!  Slide the foil back in to position like the picture above.  Next, press down the curved piece in the middle until it snaps back into position using tweezers or a screwdriver.  This curved piece is what gives the switch tension.  If your mouse isn't as "clicky" as it used to be, go ahead and bend this upwards a bit (make it flatter).  This gives it more tension and will give you a really nice feel to the button.  I tensioned my foil a bit because I really find that tactile feedback to be extremely satisfying.

TEST: Press down on the metal bridge in the middle of the foil and see if it clicks.  You should see the (left) end of the foil move to touch the bottom contact.  If you press it right, it should make a clicking sound.  You could also try turning on your mouse at this point and plug it in to test it in the same way.  Your clicks should work again at this point!


12) Put that clicking nub back in the box/cover.  Use a piece of tape to hold the two together like pictured above!  This will prevent the white piece from falling out while you put the cover back on.  IMPORTANT:  Make sure you put the cover back on the CORRECT way!  SNAP!  If you haven't already, test your mouse at this point.  Try clicking.  If it works, great! 

13) Reassemble your mouse by following the guide in reverse.  At this point, it should just be putting the two mouse halves back together, put all the screws back in, and put the teflon feet back on.  

If it didn't work... you probably have the foil on in the wrong orientation or it isn't completely dry.  If you did the full disassembly and cleaning, you shoudn't have a problem with it still being wet.  Take a look at the 11th picture right above step #7.  This is a very common design and should be the same.

Congratulations!  I hope you feel like how I did when I did this repair - so freaking proud of myself.  Such a simple fix (relatively) for one hell of a common problem.  Buy some boba milk tea with the money you saved not having to buy a new mouse!

Got questions?  Leave a comment below!  :)