Microsoft Windows

Microsoft Windows, Tech Tips, Web Development/Programming

Re-Register Apache and Mysql as Services After Moving Zend Server Directory to a New Computer

I recently got a new Toshiba A665-S5183X Core i7 laptop and I really love it.  The only thing about getting a new computer (especially if you’re a geek) is transferring files and settings from the old machine to the new one. I used Windows 7’s Easy Transfer to move over all the usual documents (pictures, papers, etc), and I also transferred about 15 GB of programs that are not registry dependent. One of the folders I transferred was my Zend Server CE installation. Zend Server includes the Apache Web Server as well as Mysql Server. I wanted the two installed as a service, but I didn’t want to have to reinstall, since I had customized many settings in several places in the installation and didn’t want to start over. So how hard is it to reinstall the two servers as a service? As it turns out, not hard at all.

First, open an Administrative Windows Command Prompt. The rest is as easy as follows.

Install Apache As a Service

cd into your Apache2 bin directory and type

httpd -k install -n “Zend-Apache2” -f “C:\program files (x86)\C:\Program Files (x86)\Zend\Apache2\conf\httpd.conf"

This command will install Apache 2 as a service named Zend-Apache2 in  your services.msc service control utility (where you can start/stop your Apache service). Additionally, it will tell the service to use the specified httpd.conf file (which can be anywhere you want). The service installer will even be nice enough to warn you of errors or warnings in your specified conf file.

Install Mysql As a Service

cd to your Mysql bin directory and type:

“mysqld” –install MySQL-Zend –defaults-file=”C:\Program Files (x86)\Zend\MySQL51\my.cnf”

As above, whatever the word you type after the install directive will be the name of your service in services.msc. The defaults file represents the path to your Mysql cnf file.

Happy web developing with Zend framework running as services on your new box!

Microsoft Windows, OS X, Tech Tips

Should You Buy a Mac or a PC?

In the last couple years, more and more folks have been asking me whether a Mac or a PC is the better computer. In case you don’t know, a Mac is a type of computer made by Apple, the same company that makes iPods and iPhones. A PC, on the other hand, refers to a computer that runs Microsoft Windows. When you’re standing there holding your credit card deciding which to buy, which is best?

Apple would have you believe that Macs are far superior to the old stalwart PC. You may have seen the Apple ads on TV that portray the Mac as a coolguy 30-something with all the answers. He has conversations with PC, who is a middle-aged nerd in an ill-fitting business suit that is always having problems.  According to Apple, the purchase of a new Mac will change your life forever.

Well, Apple’s claim is true in some ways, but it’s mostly marketing hype. The truth is that for 95% of computer users, all tasks they want to do can be done on either a Mac or a PC. The difference lies in how the total cost of each of the machines is spread out. Macs are great for creating audio, video, and DVDs right out of the box. It’s easy to make your own custom recordings or photo albums. Also, you don’t have to buy antivirus software for Macs. The catch to all this is that Macs cost about twice as much (or more) than a PC with the same amount of processing power, memory, and storage space.

PC owners won’t pay as much up front, but they will have to spend $400-$500 to buy software that offers features equivalent to what a Mac can do out of the box. (Some users won’t spend a dime on extra software because they will never need these capabilities.)  Then, there’s the $30-$50 per year you’ll have to spend on a good antivirus program, since Windows PCs are vulnerable to many types of viruses and other malware. PCs outshine Macs in the area of choice. For any given thing you might want to do on a PC (such as create scrapbooks), there may be 4-5 good programs to choose from for getting it done. On the other hand, a Mac might only have 1-2 programs for any given purpose. Macs and PCs can’t run the same software, so any software you want to use has to be written for one or the other.

Which Do I Think is Best?

I have used PCs for 15 years and Macs for 8 years. My personal take on it is as follows:

Buy a PC: If you favor a lot of choices, buy a PC. As for software, there still is no where near the amount of software available for Macs as PCs. Why? Apple makes up 10% of the computer market, so there aren’t as many people buying software for Macs. Therefore, more developers (the people who create computer programs) write code for PCs. I would feel guilty if I didn’t state outright that I think Windows 7 is great. It’s the best thing Microsoft has cranked out in a long time. As an example, AreoSnap and the way Libraries work allow me to get more done faster. It’s all the small touches like this that makes Windows 7 great.

On the hardware side, Apple doesn’t offer a lot of variation in hardware configuration or style. When’s the last time you saw a red or blue Macbook? Some people love the clean, white lines of a Mac. Others abhor them. Unless you buy a PC, you’re out of luck.

Buy a Mac: If you are willing to pay a little more and don’t want to worry about so many choices, a Mac is the way to go. Most of the software that’s available for the Mac is pretty high quality, as long as it always has the features you need.  Macs come with iLife, which comes with some of the best consumer-grade audio and video creation tools out there.  More and more developers are being drawn to write software for Macs, because there market share is growing very quickly (due in part to the iPod, iPad, and iPhone). Also, Macs are easier to maintain. Macs do get slower over time like PCs, however, it  takes much longer. As of now, you really don’t have to worry about viruses on a Mac, though I suspect that will change as more and more people buy Macs. The more people using a system, the more appealing it is for virus programmers to get to work.

With the Web, Who Cares?

I can’t really say a Mac or a PC is better. It all depends on what you value. Each is great in its own way. Mac vs. PC has been, is, and will be one of the biggest geek holy wars.

Most PC users I know right now are really into sharing things on sites like Facebook, Flickr, or Twitter. All this communal goodness takes place in a web browser. The sites don’t care what browser you use, and both Macs and PCs have several great browsers available. So, for most people, the choice of Mac or PC is moot. Both cost about the same in the long run, and both do a good job getting things done, howbeit in different ways. Some things are easier on a Mac and some things are easier on a PC, but you really can’t go wrong either way.

In the last couple years, more and more folks have been asking me whether a Mac or a PC is the better computer. In case you don’t know, a Mac is a type of computer made by Apple, the same company that makes iPods and iPhones. A PC, on the other hand, refers to a computer that runs Microsoft Windows. When you’re standing there holding your credit card deciding which to buy, which is best?

Apple would have you believe that Macs are far superior to the old stalwart PC. You may have seen the Apple ads on TV that portray the Mac as a coolguy 30-something with all the answers. He has conversations with PC, who is a middle-aged nerd in an ill-fitting business suit that is always having problems.  According to Apple, the purchase of a new Mac will change your life forever.

Well, Apple’s claim is true in some ways, but it’s mostly marketing hype. The truth is that for 95% of computer users, all tasks they want to do can be done on either a Mac or a PC. The difference lies in how the total cost of each of the machines is spread out. Macs are great for creating audio, video, and DVDs right out of the box. It’s easy to make your own custom recordings or photo albums. Also, you don’t have to buy antivirus software for Macs. The catch to all this is that Macs cost about twice as much (or more) than a PC with the same amount of processing power, memory, and storage space.

PC owners won’t pay as much up front, but they will have to spend $400-$500 to buy software that offers features equivalent to what a Mac can do out of the box. (Some users won’t spend a dime on extra software because they will never need these capabilities.)  Then, there’s the $30-$50 per year you’ll have to spend on a good antivirus program, since Windows PCs are vulnerable to many types of viruses and other malware. PCs outshine Macs in the area of choice. For any given thing you might want to do on a PC (such as create scrapbooks), there may be 4-5 good programs to choose from for getting it done. On the other hand, a Mac might only have 1-2 programs for any given purpose. Macs and PCs can’t run the same software, so any software you want to use has to be written for one or the other.

Which Do I Think is Best?

I have used PCs for 15 years and Macs for 8 years. My personal take on it is as follows:


Buy a PC: If you favor a lot of choices, buy a PC. As for software, there still is no where near the amount of software available for Macs as PCs. Why? Apple makes up 10% of the computer market, so there aren’t as many people buying software for Macs. Therefore, more developers (the people who create computer programs) write code for PCs. I would feel guilty if I didn’t state outright that I think Windows 7 is great. It’s the best thing Microsoft has cranked out in a long time. As an example, AreoSnap and the way Libraries work allow me to get more done faster. It’s all the small touches like this that makes Windows 7 great.

On the hardware side, Apple doesn’t offer a lot of variation in hardware configuration or style. When’s the last time you saw a red or blue Macbook? Some people love the clean, white lines of a Mac. Others abhor them. Unless you buy a PC, you’re out of luck.


Buy a Mac: If you are willing to pay a little more and don’t want to worry about so many choices, a Mac is the way to go. Most of the software that’s available for the Mac is pretty high quality, as long as it always has the features you need.  Macs come with iLife, which comes with some of the best consumer-grade audio and video creation tools out there.  More and more developers are being drawn to write software for Macs, because there market share is growing very quickly (due in part to the iPod, iPad, and iPhone). Also, Macs are easier to maintain. Macs do get slower over time like PCs, however, it  takes much longer. As of now, you really don’t have to worry about viruses on a Mac, though I suspect that will change as more and more people buy Macs. The more people using a system, the more appealing it is for virus programmers to get to work.

With the Web, Who Cares?

Most PC users I know right now are really into sharing things on sites like Facebook, Flickr, or Twitter. All this communal goodness

Microsoft Windows, Tech Tips

Right-Clicking with a Broken Right-Mouse Button

I was working on the Health Science teacher’s laptop yesterday and discovered the right mouse button on the touch pad is broken. Since the Commonwealth is broke, replacing the out-of-warranty laptop is out of the question just to enable right-clicking again. (And no, the keyboard for this laptop is devoid of a right-click button.)

I started Googling to find a utility that would simulate a right click. Come to find out, Windows 2000/XP/Vista/7 all support right-clicking using the keyboard without having to do anything special. The magic command is to simultaneously press Shift + F10 at the same time. The right-click will register wherever your mouse cursor happens to be.

Obviously, this isn’t something you’ll need to do all the time, but in a pinch with a busted mouse, this tidbit can come in very handy!

Microsoft Windows, OS X, Personal Updates

A Welcome Old Feeling

Recently, I’ve been feeling something I haven’t felt in a really long time: A sense of excitement about technology. For the past 8 years or so, it seems as though innovation and competition in the tech industry has slowed to a trickle. Microsoft killed Netscape and left us with the dead Internet Explorer 6 code base for nearly seven years. In the wake of the ever-exciting browser wars, we’ were left with what felt like a wounded soldier with a wooden leg. Then, the wizards in Redmond heap Vista on us, which did absolutely nothing to excite me. (In fact, it lead to a great deal of screaming and renting of garments in the Smith household.) On the hardware front, Intel and NVidia thwarted the lackluster AMD/ATI combination. Sure, we got faster CPUs and GPUs out of ’em, but who cares…Speed does not equal more fun or innovation. What’s a geek to do?

Thankfully, there are plenty of reasons to celebrate these days. For the first time in a long time, nerds everywhere are buzzing about a choice of quality operating systems. Apple has done a great job continuously improving OS X, which, for my money, is very stable and user friendly at version 10.6. In the wake of Apple’s ever-improving market share in both the laptop and desktop segments, Microsoft has gotten its act together to bring us Windows 7. The interesting thing to me is that neither OS X 10.6 nor Windows 7 are revolutionary products. The improvements are small on both fronts, and at first glance, it seems as though the OS upgrades are nothing more than marketing fodder. But, in the midst of all this, it’s easy to tell that both Microsoft and Apple are seriously trying to one-up each other by making systems more stable and user friendly. In short, end users are being treated to the fruits of healthy market competition. (On top of the OSs that are here now, rumor has it Google is launching its own low-power OS soon!)

Even more exciting to me is that the browser wars are back. Thank God for Mozilla, which delivered the first stable version of Firefox in 2003 and hasn’t looked back since. Again, Microsoft had to wake up and do something. Out of this panic, we were treated to Internet Explorer versions 7 and 8, which actually do a pretty good job at following standards.  But the fun doesn’t stop there: The WebKit folks have given us Safari and provided Google with the foundation it needed to launch Chrome. What we’re left with are fast, secure, standards-compliant browsers. And, more importantly to me, we have several choices in browsing for the first time in a long time!

There’s less to be excited about on the hardware front, but notebook makers are doing a great job making specialized laptops for just about any purpose. The buzzword soup actually has a lot of differentiated products behind it: notebooks, business-class, ultra-portables, netbooks, media stations, and desktop replacements. No matter what your personality or needs, there’s probably a sweet little portable out there to suit you.

To sum up, I’m simply pumped about all this competition. If I don’t like one thing, I can jump ship to another option. Now, if we can only keep the lawyers from stifling all this…But that’s a rant for another day.

Microsoft Windows, Tech Tips

What to do if Cygwin Does Not Work Properly in Vista

So, I tried to install Cygwin on my Windows Vista Business machine today.  The install, via the setup.exe that downloads what you want to install, launched and completed as it always had in WIndows XP. I was pleasantly surprised considering how Vista has refused to install things normally before. Just when I was about to be happy, I clicked on the Cygwin Bash Shell shortcut, the prompt came up, but no commands worked.  Not ls, not dir, not anything! I let out my usual sigh of annoyance and cursed Vista (for the millonth time).

I then proceeded to Google to find a solution.  Nothing. The forum posts pleading for help were responded to with the usual worthless suggestions (such as “Don’t use Vista“) and RTFM talk. I don’t really want to use Vista, but it has been forced upon me and I have little recourse but to use it.  Anyway, after trying a few things that didn’t work, I finally figured out what to do: Set your system path environment to the Cygwin bin directory and everything works fine!

To do that, all you gotta do is follow these simple steps:

  1. Install Cygwin normally with the setup.exe program, selecting what you want to install.  For the purposes of this walkthrough, I’m going to assume you installed Cygwin in the default C:\cygwin location.
  2. Click on the Start Menu (or Windows Orb, for those of you Vista fanboys).
  3. Right Click on Computer, and choose Properties.
  4. Click Advanced system settings in the left-hand context sidebar (and accept the UAC prompt to go proceed as an Administrator).
  5. Click the Advanced tab
  6. Click the Environmental Variables button at the bottom of the dialog.
  7. In the Environment Variables list box, find the variable Path and double click on it
  8. In the resulting Variable Value box, move your cursor to the end of the line of paths already there and add ;C:\cygwin\bin Do not forget the semicolon before the path!

That’s it! Remember, if you installed Cygwin somewhere other that C:\Cygwin, you’ll have to change your path to be different from my example. I’m hoping that if you did a non-standard install that you can figure out how to adjust the path!  I hope this helps somebody!

Microsoft Windows, Tech Tips

Using MS Server 2003 Admin Tools with Vista

Today I tried running the Windows Server 2003 Admin tools with Vista Business and was a little surprised when I got the error message:

MMC could not create the snap-in.

I guess the only reason I was shocked was that I got no errors whatsoever. The install went just fine. Normally, when you attempt to install an older Microsoft tool that isn’t compatible, Vista will freak out and let you proceed no further.

After a some Googling (and several leads that did not work), I found a fix on the Microsoft Knowledge Base: http://support.microsoft.com/kb/930056

The fix was actually quite easy: Finding the fix was another story!

Microsoft Windows, Tech Tips

Use Your ATI TV Wonder USB 2.0 with Windows Vista’s (and Windows 7’s) Media Center

Recent Update (May 30, 2009): According to a poster below, these instructions work for Windows 7 also.  Just keep in mind, these instructions will only work with 32-bit Vista or Windows 7.

Important Note for 64 bit users: This procedure WILL NOT work for Vista 64-bit because the drivers mentioned above are 32-bit. If I were guessing, there will be no 64-bit drivers produced for the device since it is about 4 years old, as of November 18, 2008.

I have an ATI TV Wonder USB 2.0 for about two years and it has worked very well for me. I originally bought it for use with my 1.5Ghz Compaq Presario so I could watch TV or play my PS2 while on the road. I recently bought an HP Pavilion dv2210us with Windows Vista Home Premium. So far, I really like my purchase, but sadly, neither ATI nor Microsoft seem interested in supporting the TV Wonder USB 2.0 in Vista. I really wanted to test out Media Center, but what to do?

I wasn’t deterred because I have fooled ATI devices before by using drivers I wasn’t supposed to in order to enable features. Follow the steps below and you’ll be watching TV with your TV Wonder USB 2.0 in Vista in no time at all.

  1. Lou (see his post below) says that removing all the installed ATI software before starting this install process is the only way he could get the installation to work. So, your first step is to use Add/Remove programs to uninstall all existing ATI software.  (Thanks Lou for the advice!)
  2. It’s best not to plug in the TV Wonder USB 2.0 until you have installed the software first. If you have done so, Vista won’t properly install anything. Unplug the device, go in to Device Manager (Windows Key + Pause, in case you don’t know how to get there), and delete all the unknown hardware.
  3. Go here, http://ati.amd.com/support/drivers/xp/tvwonderusb2-xp.html , and download the Windows XP drivers for the TV Wonder USB USB 2.0. At the time I’m writing this, the driver version is 5.01.6317. I doubt that’ll change because the drivers were last updated in March 2005.
  4. Then go here, http://ati.amd.com/support/drivers/common/mmc9-16.html , and download only the Encoder Package (which right now is version 6.12). This lovely package contains a transcoder that links to Media Center. You can’t use and won’t need anything else on this page. (Note: The next steps involve actually installing what we just downloaded. Now, neither package has a unified installer that will work with Vista, however, if you simply run the installer as Administrator, you can unpack the files and run the installer for individual components you need to make this work. )
  5. Now, we’re going to run tvw-usb2-5-01-6317.exe, which is the first file you downloaded. (Remember, User Account Control will ask for administrator rights.)  This will unpack the drivers to C:\ATI\SUPPORT\tvw-usb2-5-01-6317. At some point, the installer will start throwing errors and may even tell you to plug in the device. At this point, Ctrl + Alt + Delete, open Task Manager, and terminate the installer. All we needed are the unpacked files.
  6. Plug in the TV Wonder USB 2.0. Vista’s hardware installer should kick into action. Tell it to search in a specific location and point it to C:\ATI\SUPPORT\tvw-usb2-5-01-6317\WDM_XP . Vista will then install about six or seven devices that all have to do with the tuner. Good news: We’re almost there!
  7. Next, run the Encoder Package, 6-12_xcode_38463.exe which will again unpack the files, this time to: C:\ATI\SUPPORT\6-12_xcode_38463 . The installer will choke, just like a minute ago, and you might even have to kill it with Task Manager. As long as the files unpacked, that doesn’t matter anyway.
  8. Run the following setup files that were just unpacked:
    1. C:\ATI\SUPPORT\6-12_xcode_38463\ATIPCE\setup.exe
    2. C:\ATI\SUPPORT\6-12_xcode_38463\ATITrans\setup.exe
    3. C:\ATI\SUPPORT\6-12_xcode_38463\AVIVO\setup.exe
  9. Reboot! (Thanks, Keith, for pointing out this omission.)

At this point, you have all neccessary encoders, decoders, and Media Center hooks to enable your TV Wonder USB 2.0 to talk to Vista’s Media Center with no problem.

When you actually open Media Center for the first time after doing all this, you’ll have to setup the tuner there, but it’s basically a channel search and choosing which input to use. Happy TV surfing.

Proposed Solution to “IR Hardware not detected” error

Poster Zeffrey Rodrigues shared the following exciting piece of information that may help anyone getting the error message “IR Hardware Not Detected.” Thanks Zeffrey!

The solution to ATI TV Wonder USB 2.0 worked perfectly. However, ran into a problem with the Media Center TV tune up. The message was “IR Hardware not detected”. The solution for this is posted on the following website”

http://forums.techarena.in/mediacenter/63056.htm

Thought you may want to add to your solution list just in case someone runs into the same problem.

The Answer

Go back in to Windows Media Center setup

Select: Tasks -> Settings -> TV -> Setup TV Signal

Answer YES to popup questions – are you sure??

Continue normally through TV Signal Setup UNTIL:

Select -> I WILL MANUALLY CONFIGURE MY TV SIGNAL

Select -> ANTENNA – I dont care what you are plugged in to

Select -> ANALOG-ONLY ANTENNA – I dont care what you are plugged in to

Select -> RETURN TO TV SETTINGS – unless you really want Guide Listings

Select -> FINISH

SORRY – You have now by-passed the IR control device. you have to use a cable input and not a S-Video or composite input

But IT WORKS

Cheers from the Cisco Production Support Team

Microsoft Windows, Tech Tips

Open a Command Prompt with Administrator Rights in Vista, Windows 7, and Windows 8

Update for Windows 8: It turns out that Windows 8 has an administrator command prompt just a right-click away!

In Windows Vista, when you open a command prompt using the good ol’ cmd command from the Run box, you get a command prompt just like in XP. This command prompt, however, won’t allow you to do anything that requires administrative rights: User Access Control will commence to giving you plenty of non-graphical text feedback.

Lucky for us, there’s an easy solution to opening a command prompt with administrative rights that doesn’t even require you to use a mouse!

  1. Press the Windows key.
  2. Type cmd (which will appear in the Windows Search box) [Update for Windows 8: In Windows 8, you just start typing cmd at the Start Screen after hitting the Windows Key]
  3. You’ll see cmd show up in the search results. If it is not already highlighted, use the arrow keys to do so.
  4. Press Ctrl + Shift + Enter

That’s it! You’ll have a command prompt with administrative rights. Note: You’ll know you have the admin-enabled prompt because your current working directory will be C:\Windows\System32 instead of the regular default of C:\users\%username%.

Microsoft Windows, Tech Tips

Controlling/Stopping/Disabling Startup Programs in Windows Vista

I’ve been using Windows Vista for three days now. While I’m not sure it’s a must -have upgrade for most people, there are some interesting features in Vista that are very cool and useful (once you find them, that is). One such feature is the new Software Explorer, which is part of Windows Defender. Software Explorer allows you to see several categories of programs, including: Startup Programs, Currently Running Programs, Network Connected Programs, and Winsock Service Providers.

My favorite is Startup Programs, which allows you to see all programs that load at startup. For the first time ever, Vista allows you to see if the program starts up for all users or just the currently logged in user. The information provided about each program is more thorough than msconfig (which is still present in Vista). Best of all, you can disable or remove a startup program. To get to to Software Explorer, do the following:

  1. Search for or use the start menu to navigate to Windows Defender.
  2. Click on Tools in the Windows Defender menu bar.
  3. Click on Software Explorer.
  4. If you want to ensure that you can Enable/Disable/Remove any of the startup items listed, click the Show for All Users button at the bottom of the Window.
  5. Click continue to give the User Account Control permission to change the registry entries required to disable startup programs.
  6. Click on any program in the list and you’ll have the option to Disable/Remove the startup items.

If nothing else, Microsoft may finally realize how important controlling startup programs can be.

Update (December 28, 2010): Windows 7 does not have the Software Explorer. As a commenter mentioned, going to Start > Run and typing in msconfig, then clicking the Startup tab will allow you to remove startup items with the click of a button.

Personally, I use a program called WinPatrol, which is available in a free and paid edition. I have used the free edition for years and love all the options it provides for changing startup options. It is a bit more complex than the built in offerings, however, if you want lots of control and lots of information regarding what’s starting up, it’s definitely the way to go.

If msconfig and WinPatrol are so great, why did I make mention of the Software Explorer feature? Basically because I like to know as many ways of doing something (such as disabling startup programs) as possible on a computer. You never know when when one method or the other won’t work or be allowed, so it helps to know as many ways to do certain things as possible!

Microsoft Windows, Tech Tips

Show Extended Boot Information when Windows Vista Boots

Note: This article applies to Windows 2000, Windows XP, and Windows Vista.

I stumbled across an interesting Windows feature that you can enable with N-Lite that will show extra boot messages when you login to Windows. I didn’t want to format my computer and do a fresh Windows install just to be able to see a message that says "Playing Logon Sound," so I searched around on Google and found that enabling this feature is an extremely easy registry hack. Do the following:

  1. Go to the Start Menu and click Run…
  2. Type regedit in the box and press Enter. This will open the Registry Editor.
  3. Click on the folder structures on the left (which are known as hives and keys) in the following sequence.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system

  4. In the right hand side of the window, look for a value called named VerboseStatus.
  5. If it exists, double-click on it, type a 1 in the box, and click ok. Once you reboot, you will see extra boot messages.
  6. If it does not exist, right click on white space in the right-hand pane, choose New, then choose DWORD Value. You’ll see a key that says New Value #1. Type VerboseStatus and press Enter.
  7. Double-click on your new VerboseStatus value, type a 1 in the box, and click OK.
  8. Reboot, and you should see new boot status messages.

For some reason, I get a great deal of satisfaction out of seeing Playing Logon Sound before it happens. On a more practical note, these messages can allow you to see at what point your Windows logon becomes slow (if it ever becomes a problem).

Scroll to Top