How To Solve The Problem Of Always Having To Log On To A Network Drive In Windows

If you try to map a network drive in Windows, and use different user credentials, you’ll realise that you’ll need to always type in the username and password every single session. If you shut down your computer everyday, that means you’ll need to do this on a daily basis.

This is horrible too, if you have programs that automatically try to connect to your network drive, as it’ll most likely just fail.

The official solution from Microsoft is to make sure your user credentials on your local computer matches with that of the network drive that you’re trying to connect to. However, that’s hardly practical and probable in real-life.

The following solution is a simple line of code that you can save as a batch file that when run, creates a drive (Z: in this case) and automatically logs in for you. Set it to run whenever you log in by placing this batch file in your Start Menu/Startup folder.

net use Z: “\\\yourfolder” PASSWORD /USER:”yourusername” /PERSISTENT:YES

Note: You’ll have to disconnect your existing drives and make sure that the drive letter isn’t being in use for this batch file to work properly.

​Read More

SingTel 3G Mobile Broadband Internet Settings

Following up on my previous post on getting the setting for Starhub 3G APN settings, I got an Android phone with Singtel, and had to play around with the APN settings.

If you need the APN settings for Singtel 3G network, then these will work. You can use it in case you’ve loaded a new firmware on your smartphone and lost the APN settings, or if you have a new 3G router that you want to setup a 3G internet sharing with. Here you go:

Connection/APN name: Singtel Internet
Access point name: internet
Username: None
Password: None
Authentication: Normal
DNS 1:
DNS 2:

​Read More

How To Reset The MySQL Root User Password and Privileges

Problem: I was developing using PHPMyAdmin when I added a new root user (with a host value of %), and removed the rights of the default root user.

When you do that, you’ll get a gut-wrenching feel that you just made a huge boo-boo, find that suddenly everything will not work, and kick yourself in the ass.

Fortunately, you have a fix. It’s in the mysqld –skip-grant-tables command, but you can’t just run it directly. First of all, fire up terminal (applications > utilities > terminal), you’ll be using this exclusively to fix your problem.

For me, the I was using MAMP, and the path to my mysqld is within MAMP, so it was found in /Applications/MAMP/Library/libexec/mysqld

You can’t just perform a mysqld –skip-grant-tables command from the terminal though, because you’ll just see this error message:

[ERROR] Fatal error: Please read “Security” section of the manual to find out how to run mysqld as root!

So what you need to do is to run this command instead:

mysqld -u root --skip-grant-tables

And you’re good! That terminal window is now running the mysqld instance, so open a new window by pressing CMD+T.

In this new window, type and run mysql. You should be able to get in now, because MySQL is now open to everyone. If you got into MySQL fine, you should see this:


Great! You can’t grant any privileges now that you skipped the grant tables, but you can modify the users database. Run these commands – what they do is to use the mysql database, remove the root user, and insert a new root user (but with all privileges), and then flush the privileges to reset it to the new state.

mysql> use mysql;
mysql> delete from user where user='root';
mysql> insert into user (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv,Index_priv, Alter_priv, Super_priv, Create_user_priv) VALUES ('localhost', 'root', PASSWORD('root'),'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
mysql> flush privileges;
mysql> quit;

And that’s it! You have just reset the root user, its password and its privileges, and you can now enter PHPMyAdmin. If you want to change the password, just change the part that says PASSWORD(‘root’) to PASSWORD(‘whateveryouwant’).

On a side note, if you are having trouble with a running mysqld process that you need to kill, simply type top to see the list of running processes on your system, then take note of the process number of mysqld. For e.g. mine was 3977.

Now type :q to exit, and type sudo bash to go to superuser mode. Next type kill -9 3977 (or whatever number your mysqld process is taking), and you’re good to go.

​Read More

How To Enable Macros With A Password-Protected Workbook in Microsoft Excel 2007

Well, guess what, you can’t. Microsoft Office 2007. A brand new way to create frustration in your life.

microsoft excel 2007

I was trying to create a macro in Microsoft Excel 2007 and nearly tore out my hair. The thing with macros in Excel 2003 was that it was relatively easy to accomplish, but it’s a whole different ballgame in Excel 2007. Here’s an account of what I did, only to discover that there’s no sane way to have macros run in Excel 2007.

So firstly, my setup: I’m using Excel 2007, and I’m on Windows XP SP 2.

I created an Excel workbook, and thinking that newer is better (Oh so wrong), I chose to create it under the new Excel 2007 format. Then I wrote my basic macro in that workbook, tested it, and all was fine. However, the workbook contained sensitive information, so I wanted to password-protect it. So I encrypted the file, choosing to have it prompt for a password before it would open.

Once that was done, I saved and closed the file as a macro-encrypted workbook in the trusted folder location that I supplied. Like any other normal person, I re-opened the file immediately to see if everything worked. I was actually almost 100% certain that nothing would go wrong. Hoho if only I knew.

I was surprised with a message in the message bar saying that the macro has been disabled. There was the Options button on the message bar, so I clicked that, and was faced with a prompt that said:

“This file contains macros that have been disabled because there is no antivirus software installed that can scan them. To run these macros, remove the encryption or permission restrictions on the file”

At this point, you’re given a comprehensive list of choices that allow you to resolve this issue in the most efficient manner possible. Well, actually, I wish. You’re just given a radio button list of ONE choice that says, “Help protect me from unknown content (recommended)”. Well it looks like it’s not only recommended, but it’s the only option.

So I meddled around, and lost about one year of my life in frustration and annoyance. My meddling led me to the Trust Center, where apparently I thought I had to put my macro in a trusted location. “Okay, for the sake of better security,” I thought. So I made these changes:

  • Message bar: “Show Message Bar in all applications when content has been blocked”
  • Macro settings: “Disable all macros with notification”

Looking at that, I had the impression that I should get some notification if Excel blocks something (Oh so wrong again).

I also figured that I should also add a trusted folder location in the Excel trust center. So I go add my current working directory to it. A little bit annoying, but if it means better security, I guess it’s okay right? (Oh so wrong – it doesn’t do crap).

When I opened the Excel workbook, I immediately noticed that macros were silently disabled. Remember how I set the Trust Centre settings above to show some notification? Well yeah, no notifications, nothing on the message bar at all, and I couldn’t find any way to enable macros.

Weird, I thought. So I used the Developer tab (some newfangled contraption only found in the fabulous Excel 2007), and tried to run the macro that I created. But, whoops! You’ll see this message: “Because of your security settings, macros have been disabled. To run macros, you need to reopen the workbook, and then choose to enable macros.”

Well, that’s weird, because I just opened the workbook and I was NOT given any choice to enable macros. So why was the message telling me to enable macros??

So, let’s summarise:

  1. If you try to run a macro-enabled Excel workbook (an xlsm file) in a location that is not trusted, you are told that macros have been disabled, and you can’t enable them.
  2. If you put that workbook in a trusted location, your macros are silently disabled.


The conclusion then? In Excel 2007, you can’t have a workbook with usable macros if it’s encrypted with a password. The ONLY way that I found was to save the workbook under Excel 2003.

I hope this has saved somebody some grief and frustration.

​Read More

Password Protect Sensitive Applications (SMS, Mail) on the iPhone

I have the iPhone, and I’d like to have the functionality to password protect certain applications on it, such as SMS/Text and Mail. It’s just something about me, because sometimes people borrow my phone, and I don’t feel comfortable having my personal information seen and read.

iphone lockdown app

Well if you have a jailbroken phone with the Cydia application, then you’re in luck. There’s an application called “Lockdown” that allows you to put a password on any application that you want — and that includes applications such as Photos, Mail, and SMS 🙂

​Read More

Starhub 3G Mobile Broadband Internet Settings

It’s possible to buy a wireless router, and share your 3G mobile broadband connection. This is great for people on the move and need to share an 3G internet connection.

It’s also great if you have a small office or a small network setup, and want an ad-hoc network, or want a backup to your landed cable/DSL/fibre connection.

I’m not sure about the other carriers/ISPs, but the settings for Starhub are:

Connection/APN name: StarHub Internet
Access point name: shwapint
Username: None
Password: None
Authentication: Normal
DNS 1:
DNS 2:

​Read More