Wednesday, July 18, 2012

Swann SW111-EU1 - DRIVER

I have a Swann SW111-EU1 USB 10/100 Ethernet adapter, and I've been struggling to find a driver for it. The Swann website (http://www.swann.com/s/products/view/?product=443#download) says that the driver should be this: ftp://ftp.swann.com.au/drivers/network_USB/WinME2kXP.zip But that file doesn't exist on their ftp server, and the file name is so generic it's nearly impossible to find it mirrored anywhere else on the net. It turns out that the adapter itself is actually a Realtek RTL8150 chip. If you go up a directory on that FTP server to here: ftp://ftp.swann.com.au/drivers/network_USB/ You will see 8150_INST_5_126.zip in that folder. This is the driver you need for the Swann USB NIC. You can also find this driver on the realtek website: http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=14&PFid=8&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true Hope this helps someone, as it's taken me a while to figure this all out for myself!

Saturday, May 19, 2012

How to reset your windows 7 password from the installation CD

My cousin came to me this week with an odd problem: She had "protected" her Windows 7 laptop from her sibling with a password. Except she did it months ago and can't remember what the password is now.

Windows 7 by default doesn't enable the Administrator account any more, so using a blank password on Administrator is out (this design feature is probably a good thing for the majority of cases).

After a bit of searching around the internet I found this article:
http://www.sevenforums.com/tutorials/85657-password-reset.html

It was very helpful, and worked perfectly.

The only thing I would add is that if you don't know the username of the account you want to change, at the very last command prompt before you reset the password simply type "net user" and it will list the user accounts on the machine.



For my sake:

Let's get Started!

1) The Boot Priority in the BIOS needs to be set to boot first from the optical drive; insert your Windows disk and re-start the PC. At the first screen select your language then Repair your computer then it'll do some searching, at System Recovery Options dot Use recovery tools then select the OS and click next; while there make note of the OS drive letter, it may not be C: like mine is D:.

2) At the next screen select "Command Prompt" then in the Command window type "regedit" (without the quotes) and hit enter.

3) In the Registry Editor window that opens click to select "HKey_Local_Machine" then at the "File" menu select "Load Hive".

4) In the "Look In" in the "Load Hive" window that opens navigate to (in my case) LocalDiskD:\Windows\System32\config\SYSTEM and click "Open".

5) In the "Load Hive", "Key Name" box give the new key a name e.g. " 123 " (it can be whatever you like) and click OK.

6) In the left pane of the registry Editor window click the " + " sign to expand the "HKey_Local_Machine" key then click the " + " sign to expand the "123" key then click to select the "Setup" key.

7) Now in the right pane right click "SetupType" and select "Modify", set the "Value data" to " 2 " and click OK.

8) Again in the right pane right click "CmdLine" and select "Modify" and set the "Value data" to "cmd.exe" and click OK.

9) Now just as a precaution, close the Registry Editor at the "File" menu click "Exit"; then in the Command window that's still open type "regedit" and hit enter to open the Registry Editor again.

10) In the Registry Editor click the " + " sign to expand HKey_Local_Machine and click to select the new "123" key, at the "File" menu select "Unload Hive" and click "Yes" for the "Are you sure ..." question.

11) Now close the Registry Editor at the "File" menu click "Exit" then in the Command window type "exit" and hit enter to close the Command window, then remove the Windows disk and restart the PC.

12) When the PC restarts a Command window will open, in that window type "net user " mine is (net user "Bare Foot Kid" Test6) be advised: if you have a username like mine, with spaces, you must use " " quotes around the user name; when you get the "Command Completed Successfully" type "exit" in the Command window and hit enter; at the logon screen use the new password you chose.

Enjoy!

Saturday, March 31, 2012

Big companies don't learn

The article here on slashdot talks about the PS4 and the next XBox restricting the re-sale of used games.

I think the 'suits' in charge of these companies are simply not learning, and adding restrictions like these to their new consoles will not only put off seasoned game playing customers, but give the platform a bad name.

I have a XBox and a Wii, I own games on these platforms and they are not cracked at all. I have on several occasions, leant games to friends. Mario Kart, Wii-Fit, Forza 3, etc. I have also been leant games like Forza 4.

Very often, this lending will result in the friend or myself going out and buying my own copy brand new.

Disabling this sort of "sharing" will do several things:
- Motivate people... to fight back!
- Inspire people... to find ways to crack the platform, and download the games from the internet
- Get people excited... about PC games, and platforms like Steam. Moving them away from the standard console. It's just too easy to build a PC, connect it to your TV with HDMI and use an XBox controller to play PC games just like a console. With the added advantage that you can surf the web, watch tv, you tube, do your homework, listed to music, watch movies and TV shows.

Microsoft, Sony, you need to wake up and realise that trying to scrape money out of the backsides of naive and unaware people will NOT increase your profit margins. It's the existing base of loyal customers who want more freedom, openness, and sharing from their platforms, that will make you the big bucks you're after.

Lastly, don't TELL people what they can and can't do. Don't lock them down. Don't restrict them. This just motivates them to fight back harder. To find ways around your bs restrictions. To strike back at you by moving away from your platform or simply cracking their console and getting their content for FREE!

Actually, since I don't really like SONY that much. MS, do me a favour, listen to everything I said above. Do the right thing by your customers:
- Allow them to buy 2nd hand
- Allow them to share games around their circle of friends
- Allow the new platform to play existing games from the XBox 360 as best you can
- Get your new platform out before Sony does, and steal the market away from the Playstation

You won't regret it.

Sunday, February 26, 2012

Microsoft Multimedia Keyboard and the Function Lock Key

I have a microsoft multimedia keyboard with a function lock key.
Each function key does other tasks, e.g. F2 is UNDO.
However, F2 is also the "Rename" shortcut for Windows which I use very regularly to rename files. F6 is the shortcut to jump to the URL bar in Internet and Windows Explorer, etc.

Annoyingly, the F keys are OFF by default so every time I go to rename a file, I end up undoing the last action that I performed. Quite often this can be a file move and I then have to remember which file I last moved and re-move it! I suppose I could press F3 to "Redo" but that's not the point!

You can of course, turn on the function keys by pressing the Function Lock key - but usually by the time I realise I have not pressed it the damage is already done!

Anyway, others have had the same frustration that I have and created a registry hack that reverses the button functionality. So that by default, the Function Keys are the Function Keys and not whatever arbitrary functions the Microsoft engineers decided I needed instead.

The registry hacks are here:
http://jtsang.mvps.org/scancode_method.html

As with any registry hack, you should always backup your registry, take a system restore point, pray to your god(s) and of course EDIT the file to make sure it does nothing terrible (if you know what you're looking for).

As of the time of writing, these files work fine and are safe. I used 2gflockelim-w-perma-prtscn.zip. But there are others there that might be more helpful.

In fact, this is all it is:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,0e,00,00,00,3b,00,3b,e0,3c,00,08,e0,\
3d,00,07,e0,3e,00,3e,e0,3f,00,3f,e0,40,00,40,e0,41,00,41,e0,42,00,42,e0,43,\
00,43,e0,44,00,23,e0,57,00,57,e0,58,00,58,e0,37,e0,52,e0,00,00,00,00


Feel free to make your own .reg file with the above code.

Make sure to reboot after applying the registry fix. If you want to undo all of this. Simply delete the "Scancode Map" entry and reboot.

Friday, February 17, 2012

Access Remote Server Resources in asp.net

I am writing an asp.net page for work that needs to access files on servers in remote offices, and serve those files to the user who requested it.
The asp.net app knows the path to the file, and in testing a simple command like this works:

Dim FileExists As Boolean = My.Computer.FileSystem.FileExists(filePath)

The problem is that in testing, the user account being used to execute the above code under is my own. But on the production web server, the iis worker process is running under "NETWORK SERVICE" and that account is not on the domain and does not have access to resources...well anywhere.

The solution to this problem was to impersonate a user with domain privileges, and use NTFS permissions to allow that user account access to the resources I need to access.

Using code I found here: http://support.microsoft.com/default.aspx?scid=KB;EN-US;306158#4

I used the code under the "Impersonate a Specific User in Code" section and it worked perfectly!

I basically just copier the code in to my user control with the exception of the code in the form_load sub, and used this where I needed it:

If impersonateValidUser("Username", "Domain", "Password") Then
'Insert your code that runs under the security context of a specific user here.
FileExists = My.Computer.FileSystem.FileExists(filePath) = True
undoImpersonation()
Else
'Your impersonation failed. Therefore, include a fail-safe mechanism here.
Throw New Exception("Unable to access KD files. Security failure.")
End If


Be sure to undo the impersonation after the code you need elevated has executed.

Note: I tried to use the Domain Administrator account for testing, and it seemed to impersonate it, but the code did not execute with elevated privileges. I used a normal domain user account and that did the trick. There must be some failsafe to disallow the use of the Administrator account in this way.

Monday, February 6, 2012

I am cursed

Woke up this morning to find that somebody had broken in to our unit, rummaged through my Wife's handbag and found her wallet. Took all her cash and then left.

This is getting a bit out of hand.

Thursday, February 2, 2012

Am I cursed?

I genuinely think I might be cursed. Any ideas?


Evidence:

Late November 2011:
I crash my car, my pride and joy. I write it off, and two other cars with it. Other parties lie to cover their butts, so I get found to be at fault and lose a bunch of points off my license.

Early December 2011:
Get a speeding fine in a state I've never driven in before, on a road I've never driven on before, in a car I've never driven before, which I later find out has a faulty speedo. While interstate on a work trip!

Early January 2012:
First day back at work, and it turns out the night before our NSW Head Sales office was struck by lightning. Twice.
Strike fried almost every VoIP phone, almost every Switch, the only server, and all of the VMs that were running on it, the Cable Modem, 8+ motherboards in workstations, 5+ PSUs in workstations.
Residual damage from the strike destroys several further switches in varying degrees of sparks and electrical smoke.

Two weeks ago, I get cut off by some jerk in a white van who pretends to let me merge (I have right of way) and then speeds up at the last second to try and make me run out of road and crash in to a gutter.

Last Week, nearly get killed by a courier truck almost crushing me while driving through North Ryde.

Last night, after cooking dinner I seriously burn my finger and now there's a massive blister on it that is annoying the hell out of me.

For the last 3 weeks one of my customers has had a problem that I simply cannot figure out how to fix. It's stressing the hell out of me.

Work keeps piling up faster than I can complete it, and people keep hassling me for things that I just don't have time to do.

I keep getting woken up at 5:30am by the guy across the road doing a burnout on his way to work.

Two nights ago, my SSD in my PC dies completely!

Last night, I get woken up at 1:30am by the MD's assistant because the MD is overseas and needs a file deleted on the network.

Tonight, the night before I go quad biking with by Brother-In-Law, the power at our Head Office goes out and all the servers go down. Now I have to wait for the power to come back on and go in to work to turn everything back on that doesn't turn on by itself. My off-sider is at a medical appointment in the morning and won't be around tomorrow. What's the bet I miss quad biking altogether?

I think I missed a couple things.

FML