Monday, 28 May 2012

Top 3 fixes for: Internet Explorer won't start, IE7, IE8, IE9 opens then closes immediately

I have been having this issue for years and I found the final solution just yesterday! So I thought I would post it here and hopefully help out thousands of other people like me.

Before I explain the solution let me describe the problem in detail. For some unknown reason, I have always had this problem on my main computer with Internet Explorer 9: whenever I want to run it, a blank window appears for 0.1 second then closes instantly, without any error message or anything. The solutions I describe are valid for Internet Explorer 7 (IE7), Internet Explorer 8 (IE8) and Internet Explorer 9 (IE9). I am running Windows 7 but the solutions also work for Windows Vista and Windows XP.

There are three solutions here, among which two are the official solutions proposed by Microsoft. Let me tell you right off - Microsoft's solutions had no effect, so you might want to skip to the last one immediately.

  1. Solution 1: deleting all IE settings so as to remove potentially blocking add-ons
  2. Solution 2: uninstalling and reinstalling IE completely
  3. Solution 3: running a script that cleans your registry and re-registers missing DLLs
Read on for a detailed description of each of these three solutions.

Solution 1 (by Microsoft)

The problem is perfectly described on a support page entitled "Internet Explorer opens, flashes, and then closes immediately when you start it". That's exactly what happens here, except their solutions had no effect for me. Maybe you'll be luckier than I was?

So the first solution is to reset Internet Explorer to its default settings. After all, the problem you are having might be caused by an add-on that causes IE to crash or something. In order to proceed, either click the above link to download a tool that will clean up your IE settinsg, OR run the tool from your machine (yeah, the tool should already be installed on your machine):
1) Open the Internet Options applet from the control panel
2) Go to the Advanced tab
3) Click the "Reset Settings" button
4) Make sure the "Delete personal settings" box is ticked and press OK.
5) Try running IE again and see if that fixed it.



Solution 2 (by Microsoft)

If that didn't help, you can try their second recommendation, which is basically to uninstall and reinstall Internet Explorer. The process is simple and there is actually no installer to run.
Uninstalling:
1) Open the Programs and Features applet from the control panel (Add/Remove programs in XP)
2) Click the "Turn Windows Features on or off" link on the left
3) Untick Internet Explorer in the list of programs that shows up
4) Restart your computer
Reinstalling: do the exact same, except you tick the box.
If you have an older version of Internet Explorer, I recommend downloading Internet Explorer 9 (offline installer, not one of those stupid web installers that always fail).



Solution 3 by Kai Schätzl - the ultimate fix!

If like me none of the above worked, you must try Kai Schätzl's delicious script. You have no idea how thankful I am, Mr. Kai. Basically, all you have to do is download one of the below scripts:
- If you are running Windows 32-bit, download this: Internet Explorer 7/8/9 repair script for Win32
- If you are running Internet Explorer 32-bit version on Windows 64-bit, download this: IE 7/8/9 repair script for IE 32bit on Win64
- If you are running Internet Explorer 64-bit on Windows 64-bit, download this: IE 7/8/9 repair script for IE on Win64

Once you have that downloaded, extract the ZIP archive, you will find a .cmd file (command-line batch file). It contains instructions that will repair your system and allow Internet Explorer to finally work again. DISREGARD the filename: it's called "IE8" but it works with IE7, IE8 and IE9. To run it, right-click the file and click "Run as administrator".



After it finishes running, start Internet Explorer and voila! You can now use the world's worst web browser again. Download Google Chrome now!

Monday, 23 January 2012

Chinese OCR: translating scanned or photographied Chinese text to any language


Having lived in China for almost 3 years now I am able to recognize a good bunch of characters, I can type in Chinese on the computer too but writing is much easier than reading since it doesn't require you to actually memorize the characters, you just type in pinyin (phonetics). That is not enough to understand a full, complex text.
After months of research I've finally figured out how to recognize chinese characters automatically from a picture, in order to copy/paste the text into a translator such as Google translate or others. The solution was right under my eyes all this time: Microsoft Office 2007. I had no idea that Office 2007 came with such features. I've always known of expensive solutions such as Ominpage Pro, but I refused to resort to purchasing the app considering its price and how little I would need it.


OCR, which stands for Optical Character Recognition, is the principle of proceeding to the digital analysis of an image to extract the characters/text that it contains, in order to be able to manipulate the text on a computer.

The solution I describe is for PC/Windows users only. If you're interested on doing the same, real time and in a much simpler way directly from your iPhone, I recommend the excellent Pleco. I've tried out the demo version and am seriously considering purchasing the full version.

TLDR: there are basically four steps involved in the process:

  1. Take a photo with your digital camera, or scan your document with your scanner
  2. (Optional) Convert your photo to a TIF image
  3. Open the TIF image with Microsoft Office Document Imaging, run the OCR
  4. Export the text to Microsoft Word then translate it

This tutorial requires the following software to be installed on your computer:

  1. Microsoft Office 2007 (though this supposedly works with Microsoft Office 2003): installed with "Document Imaging" and "Picture Manager", both are components that you can select during the setup process. If you don't have those two installed on your computer, modify your Office setup to include them.
  2. Chinese language support for Microsoft Office, which isn't exactly something you come across easily. I have the chance to work in China and we have licenses for the Chinese version of Microsoft Office, so I've had no trouble. As an alternative you can get the Microsoft Office 2007 Multi-Language pack and install Chinese support as well as a bunch of other languages if you're interested.
Step 1: Taking a picture or scanning a document
I don't need to remind you how you take pictures with a digital camera. Nor how to save pictures from a website with your favorite web browser. If you are going to use a scanner though, and that is probably the solution that will get you the best results, you can probably skip the next step if your scanner supports saving as TIF/TIFF documents.

To illustrate this tutorial I've chosen to work with a photo taken with my iPhone 4S. It's a document I've taken from a random advertisement booklet found at a friend's place. I tried to get a clear shot of the text to make sure OCR works as accurately as possible.


Step 2: Converting to TIF/TIFF image
Unfortunately, and I must admit I find this quite odd myself, the tool we're going to use for performing the OCR does not support anything other than the TIF format. So if your picture was saved under any other format (JPG typically, like mine) you'll have to convert it. There are plenty of ways to do so.

Since you have Microsoft Office installed on your computer, you should have everything it takes. Right-click your JPG image and "Open with..." - "Microsoft Office Picture Manager". Go to "File" - "Export..." and select the TIF format.

Step 3: Performing the OCR
The actual OCR (Optical Character Recognition) is performed by Microsoft Office Document Imaging. Open the tool, which should be located in your Start Menu under Microsoft Office / Microsoft Office Tools / Microsoft Office Document Imaging.

Before performing the OCR you need to specify the document language. To do so, open the "Tools" menu, go to "Options" - "OCR" and select "Chinese" in the drop-down list. The next steps are simple...

Open the file... Click on the OCR button... Click on the "Send Text to Word" button... press OK and you're done!
The text should be more or less faithfully transcripted depending on the quality of the original picture. Now onto translating it to something actually legible to the average westerner :-)

Step 4: Translation to English or other languages
There are tons of translators out there but I'm going to stick to Microsoft Office since that is what we've been using from the start. Yes, you can translate Chinese directly from within Word 2007 if you follow the simple instructions described below:
  1. Select the text you want translated
  2. Right-click the selected text and in the menu, go to "Translate" - "Translate..." 
  3. Select the input and output languages and click the little green arrow
  4. You'll be taken to Microsoft's online translation service, which provides a surprisingly accurate translation of my original text.
Before:

After:
Note: the original document IS about shady management techniques. That's all I had.

Voila, you've successfully translated a document written in another language, based on a simple photo and Microsoft Office. Ah, isn't technology wonderful?

Tuesday, 8 November 2011

Outlook 2007: replying to multiple emails or senders

Today, I received about 60 emails from my students who were handing in their assignments. Normally, I would just ask them to assume that I have received their emails correctly, but since we had trouble with the Internet connection, most of my students wanted to make sure I had received their work in due time. So I decided to send a kind confirmation reply to all the students that emailed me their work.
So here I go, opening Microsoft Outlook 2007, selecting multiple emails, right click to find the option "Reply to all" ... horror! It's not there! There's no apparent way to reply to all my students at once. What's worse is there isn't even an option to collect email addresses from people who emailed me (I would then have created one email with all recipients in BCC).

How it works, in a nutshell
After Googling it for about an hour, turns out there is no regular solution to perform such a basic operation. All the solutions I found involved installation of 3rd-party software OR installing and running complex macros. Uh, no thanks. I found some kind of simple workaround that requires no third-party software or macros. It's all in there, using advanced features.

Before I detail each step, here is the principle:

  1. We create a "Message Template". This template will contain the email to be sent to everyone.
  2. We place emails we wish to reply to into a specific category
  3. We create a rule that automatically sends the email template we created in 1) to all the senders of the emails we selected in 2)
  4. We apply that rule and send out the emails.
All of the above four steps are extremely simple and require no technical skills. Read on.

Creating a message template
Follow the simple instructions given below. 

Instructions, as described on the image:
1) Write a regular email without a recipient
2) Click "Save As"...
3) Save it on your file system, making sure to select "Outlook Template" as a file type ("Save as type...")

Categorizing emails
The next step is to select the e-mails you want to reply to, and place them into a category.

As you can see, all you have to do is:
1) Select some emails
2) Right-click on the selection
3) Unfold "Categorize" and select a category, for example "Red Category".

Creating a rule
This is the trickiest part so I'll write more detailed instructions. Creating and managing rules is done from the "Rules and Alerts" window. In order to access this window, on the main menu bar of Outlook 2007 go to "Tools" then "Rules and Alerts..."

To create the correct rule, follow the rule creation wizard which shows up when you click the "New Rule" button:
  1. Selecting a Template. Under the "Start from a blank rule", select "Check messages when they arrive". Click next.
  2. Selecting Conditions. Locate the "Assigned to category category" item and check it. As you check the box, a new item appears in the rule description. Click the underlined word "category" to be able to select which category of emails should be replied to. Click next.
  3. Selecting Actions. Locate the option "Reply using a specific template" and check it. As you check the box, a new item appears in the rule description. Click the underlined part "a specific template", which will reveal the template selection window. At the top of this window, in the "Look in" drop-down list, select "User Templates in File System". Then you will be able to browse for the directory containing your template created in the first part of this tutorial. Once your template is selected correctly, click Next.
  4. Selecting Exceptions. If you want to exclude certain emails from getting replied to, select your conditions here. Click Next.
  5. Specify a name for your rule. Below the rule name input box, you will find two checkboxes: "Run this rule now..." which you must enable; it will apply the rule to the folder currently selected in Outlook. Make sure to disable the "Turn on this rule" box, unless you want to automatically reply to similar messages in the future. Click Finish.
Upon clicking Finish, the rule will be applied: all the emails that you categorized will be replied to with the email template you selected previously. Click "Send/Receive" to send out the emails.

Conclusion
Voila! Was it so hard? I don't believe so. But Microsoft should have made it a lot easier to reply to multiple emails, it seems to me that this is quite basic functionality and it should have been available from the start.

Monday, 31 October 2011

Windows 7: restoring old-style logon screen tutorial

I've found a lot of information on the subject on various blogs and forums, strangely everyone seems to come to the conclusion that it is impossible to get back to the old style logon screen that appeared like this under Windows XP:
Why would anyone do this?
Why would you go back to something like this? There could be thousands of reasons. The default logon screen of Windows 7 looks like this:
If, like me, you work in a computer-unfriendly environment such as a school, you'll find that a lot of people are unable to locate the "Switch user" button or simply wouldn't just dare to click it. All they were told is to enter their username and password and they never expected to have to do anything else.

So how do you restore the good old logon screen with a simple text box for the user name, and a simple text box for the password? It's actually a lot simpler than some people would think.

Local security policy management console
Press Windows+R to get the "Run" dialog, and enter "secpol.msc" in the text box then click OK. You are opening up the Local security policy management console.
In the option tree on the left, go to "Security Settings" / "Local Policies" / "Security options".
In the list of settings on the right, locate "Interactive logon: Do not display last user name". Double click this setting and in the box that shows up, select "Enabled" and click OK. Restart your computer... and voila!
You can also change a couple of other settings, such as disabling the annoying "Ctrl+alt+del" screen, the option right below the one I just described.

Once you're all done you'll be seeing a screen like this when you start up your computer. If you didn't join a domain obviously you won't be seeing the domain part.

Monday, 24 October 2011

Nginx market share soon to hit 10% mark

According to multiple sources such as:

the amazing and lightning-fast web server known as nginx is just about to hit the 10% market share mark in the next couple of months. This is a fantastic milestone for the author, Igor Sysoev, who probably didn't imagine that the application (which he originally developed on his own) would meet such fame.
Diagram courtesy of W3Techs.com (article linked above). Its market share went from a little over 5% to almost 10% over the last year as you can see. 

I wouldn't go so far as to say that the release of my Nginx HTTP Server book (released Summer 2010) was one of the factors that contributed to the popularity of the Russian web server. It is my belief that the sole quality and efficiency of the software is what made its success.


The book was and is being translated into three languages:
  • In Japanese
  • In Chinese (to be published soon)
  • In Korean (release date unknown) 
Nginx is already a popular web server in Russia and Asia; some of the most popular websites in these regions are powered by nginx; namely Yandex, 163 (China's #1 e-mail platform), Soso.com, Renren.com, and more internationally Wordpress, among many others. My own websites GBAtemp.net, FileTrip.net, ShopTemp.net are powered by nginx as well.

Wednesday, 12 October 2011

PPTP server fix for iOS problems (pptpd/PopTop)

Ever since I was offered an iPod touch 4th gen I have been unsuccessful in my attempts to connect to PPTP based VPN servers from iOS. Apparently this is a well known issue since iOS 4.3.3 or earlier, that did not get fixed in the iOS 5 update.

Having set up my own PPTP-based VPN servers using Poptop (also known as pptpd) under CentOS, I always found it strange that my servers would function perfectly fine under all versions of Windows, but completely refuse to work under iOS and reportedly MacOS X as well.

Symptoms were the following:
  • Initially, the connection to the server starts ("Connecting... Starting... Authenticating... ") and appears successful for a second but then immediately drops, with a vague error message.
  • After a few tweaks that I read on DD-WRT's PPTP server configuration page (pertinent given that DD-WRT uses poptop as well) the situation changed but still failed to solve all of my problems: I was able to connect normally, without any error message, however any network communication failed and timed out. Whenever I tried loading a page it would just keep loading forever. Any app that connects to the Internet did the same- loading forever.
 Finally after a combination of multiple tweaks I finally got it to work! The solution is given below but I'd like to credit people first. First I used the DD-WRT tweaks as I previously said, then I followed the tips of two users who posted on this page, sid2 and jeremy207. Massive thanks to both of them!

Here's what got it to work for me. You need to open up the options file for pptpd usually located here: /etc/ppp/options.pptpd
At the very bottom of the file, insert the following lines:
nopcomp
noaccomp
mtu 1400
mru 1400
default-asyncmap
After saving the file, make sure to restart pptpd properly (I stopped it and started it again completely) and try connecting from iOS again. Worked for me! Hope it will for you as well.

Thursday, 1 September 2011

How Paypal rips off online businesses

Paypal has just "resolved" a dispute that a customer filed against our small-scale online business and I am absolutely disgusted by the outcome. Not because of the amount that they've stolen from us (11.25€, we will survive without it), but for what it represents and the inherent risks. I should never have been charged that fee. Let me explain.

A regular purchase?
A few months ago a customer purchased the most expensive VPN plan (72€) on my website VPN1Euro.com. The account was immediately set up, and the customer started using it. A few months later, the customer requested a full refund for the payment (through an automated Paypal dispute), without contacting me prior to sending the request to Paypal. I responded to the dispute by telling the entire truth:
  • the customer purchased the account legimitately (IP address matches the location entered in the Paypal billing address, nothing indicates that there was some kind of Paypal account fraud)

  • the customer used the account for a while

  • the customer never contacted our services to request anything

  • we offer refunds on prorated basis. Basically if you purchase a 1-year plan, you can get a refund after a while. But if you've already used your account for 2 months, you'll only be refund of the remaining 10 months (why would anyone refund a service that has been duely consumed?). That's what happened here. Had the customer contacted us to obtain a refund we would have sent it without question.

Buyers abusing the system
From the moment the customer filed the dispute, Paypal froze the money (the whole 72€). I replied immediately, but it took over 3 weeks for Paypal to process my response. The outcome was just unveiled to me today: not only the customer is getting ALL of their money back, but I am ALSO being charged for a complementary fee called "settlement fee".

So let's summarize what happened here:
  • customer purchases expensive VPN plan

  • customer makes use of VPN plan

  • two months later, customer gets all of their money back

  • seller pays an additional 11.25€

Not only have we provided the service correctly, but we are also being charged for the payment reversal! This is completely absurd and Paypal won't budge on the matter.

A flawed system
With such a system any ill-intended customer can just purchase anything, THEN get their money back, THEN have the seller charged for, well, whatever we're being charged for ("settlement fee"). So I'll say it again: the amount lost in this case is obviously neglectable. But what if it happens again? We haven't receive a single cent for a service that was correctly provided, and we've also been charged for it. What can businesses do against such malpractices? The only answer I'm thinking of right now is: don't use Paypal. As if the 4.5% transaction fees weren't enough, they're now stealing money from us. That's great.