Serial bar code scanning in Windows

BarcodeScanner

We have several of these barcode scanners that are serial port based. The current software we are using them with has been written to accept data coming from the serial port. You can get a version of these scanners that connects inline with your keyboard. Using a keyboard type means the software doesn’t need anything special to scan into Windows applications.
We are converting over to new software that is not written to recognize serial based scanners. Someone mentioned a software solution and it’s turned out to work very well. It’s called BC-Wedge. It’s a small application that sits in the background and sends scans from the bar code scanner to any Windows application. There might be some other solutions out there, but this one is reasonably priced and easy to install.

Scroll Wheel in Visual Basic 6 IDE

Geekerz

This is exciting, it’s long been a pet peeve of mine that the scroll wheel never worked in the user interface for Visual Basic 6. I managed to get it working once awhile ago but it quit working soon after and I couldn’t ever get it back. I tried mouse drivers and a ton of other things. Well, while searching the web for tips on capturing extra mouse button events in Visual basic (which I still don’t have down yet) I ran across a blog called Unhandled Exceptions and a link to an article on Microsoft’s website for a fix. In his blog he mentioned the fact that the link on Microsoft’s site was broke, so I’m putting the fix on my site for future downloads in case Microsoft’s quits working. Of course now I can goto Microsoft’s support site and search for “scroll mouse visual basic 6” and the article with the fix is the first one in the list. For those of you who this is old news, I swear I tried searching Microsoft’s site, honestly I did. :)

VB6 Image Resizing and more with FREEIMAGE

I have an application that I’m working on. As a side note it’s related to a previous post here on MISGuys. I wrote awhile back about RSS readers and the fact that I couldn’t find a single one that did what I wanted or that was priced reasonably. So I decided to make my own. It’s called squatRSS.

Cutting

Not sure why I chose that name, it just jumped out at me and I stuck with it. I’ve got a pretty good start but it’s not ready to be released yet. I hope to release it at a later date. While I’m not trying to get rich on it I do plan on charging $10 for it because I have spent around 25 to 30 hours so far and I’m sure I’ll spend that much or more before I am ready to release it. We’ll see if anyone is interested in buying it and if not then I have a cool RSS reader and that much more experience in VB. $10 doesn’t seem like too much to charge for a good little application. Anyways, while I’m pretty proficient in VB6 I’m not guru enough to write my own code for taking a bunch of image files and batch resizing them. So I searched the web and after considerable looking found a good solution. The FREEIMAGE project is an open source library project that supports many different image formats and is able to perform many different image manipulation routines like rotating, resizing, flipping, color adjustments and more. I’m just using the image resizing part of it, so I can’t speak to the other functions, but resizing works really well and is quick.

Run an application as a NT Service

Have you ever had the problem of an application that needs to be running on a server that accidentally doesn’t get turned on because the server wasn’t logged into a user? We have one such animal.
Every now and then we’d reboot the server and forget to log it back in so that the application would launch. Then it’s Saturday and we get a phone call wondering why such and such isn’t working. So I did a little Googling and found a couple of solutions that will install an application as a NT Service. The one I ended up going with is from Eltima Software. It was super easy to get up and running. There are a few free options out there but they weren’t quite as easy to setup. This one is $79.95 for a single license and they have cheaper prices for more licenses, so the price is reasonable. One note of caution is that the account that is used to run the application is an important setting. It looked as though the application was running, but I wasn’t getting some of the results that I should have been and there were no error messages. After some tinkering and thinking it through I realized that it was using the system account to run the application and then trying to use that application to gain network access to some resources and wasn’t able to. Now if either of us MIS Guys forgets to logon the server, which is actually a security risk anyways, the needed application will still sit there and run faithfully.

Realtek HD Audio crackling

Ok, it’s kinda funny how things go. I wrote the previous post about 6 hours ago, telling you how I really liked the new laptop and no problems so far. 2 hours later I started having problems with my laptop. I have a DVD I’m going to play tommorrow. I’m going to hook the laptop up to a TV and run it through there using the S-Video out function. I found that it’s really easy to turn on the S-Video output on this laptop by using the fn key and the key that has lcd/tv on it. Cool, works great. I planned on running the sound out of the laptops audio output into the TV. Here’s were the problems begin. The laptop has two 1/4″ jacks. One is labeled mic the other s/pdif. I pause for a minute because spdif is Sony Philips digital interface. I want a normal analog output from this, but I figure it probably has a setting to make it analog or digital and I plug it in. Nothing, no sound. I grab some headphones, nothing. Hmm. I grab the drivers cd that came with the laptop and run the audio install. A couple of reboots later I have audio out of it. I pop in the DVD and it’s messed up. There’s popping and it seems like the DVD is running at 1/2 speed or something. Hmmmm. I uninstall the DVD software, it’s called ASUS DVD. Basically it’s a LE version of Cyberlink’s Power DVD. I re-install it and audio is the same. MP3s work fine, DVD not so fine. I install a copy of WinDVD, no audio at all now. Install a regular version of Power DVD 6, popping and crackling. Hmmmm. I do a Google (is that really a verb?) on Realtek and find their site and download their HD Audio driver. A couple of reboots later, pop the DVD back in and voila it’s working. So, if you are having wierd audio problems with a Realtek HD audio soundchip head over to their website and download the latest driver. Why is it that laptop manufacturers are so bad about keeping updated drivers on their sites? My Gateway laptop was the same way. Thank you Realtek for not making me rely on my laptop manufacturer! :)

Essential Firefox Extensions


One of the great things about Firefox is the ability to add extensions. Themes are cool and I love tabbed browsing and the stability and consistency at which it works is awesome as well. The extensions are what really sets it apart from Internet Explorer. I’ve tried Opera, but not long enough to know if it supports plug-ins/extensions in this manner. Here are the extensions I always install.
1. Download manager tweak – this one I like to tweak so that my downloads show up in the side bar.
2. PDF Download – I like PDF files, but I don’t like PDF files when they try and load inside the browser. This makes it easy to download the PDF or go ahead and view it in the browser.
3. Adblock – Easily block ads and images from whole domains.
4. IEView – There are still websites that just don’t work right in any other browser but IE with this you can easily right click and open the current page in IE.
5. Stumble Upon – Basically it’s channel surfing for the internet. You can only find so much stuff through Google or other search engines. With this you give it topics and it randomly gives you sites others have recommended.
6. Opanda IExif – With this you can right click images and view the Exif data stored in the image. Many images have the exif data totally removed from them, but on those that still have it intact you can get interesting info about the image.

There are tons of extensions out there and you have to be careful about installing some of them. Some have caused Firefox to crash or have long wierd pauses before loading pages. But if you have trouble uninstall the extension and you are back to happy browsing. You can find all of the above extensions and more at
Mozilla Update.

Server 2003 Active Directory replication problems

We just replaced one of our domain controllers with a brand spankin new rack mounted IBM eServer. We were like kids at Christmas time opening the huge box and gawlking at the beautifull insides. Installation went well, for the most part.

The server we replaced had Microsoft Exchange running on it, DNS and IIS hosting a website. The Exchange database had some corruption to it and had to be repaired but it went well. Once we got it up and running and made it a domain controller, installed Exchange, restored the Exchange database, got the website up and running and a couple of other applications it needed it purred away and was right at home. Then a couple of days later we added the first user to our domain since the upgrade and for some reason we couldn’t log on with it. After some looking and checking out the event viewer we noticed errors with the Active directory replication service. Apparently the two domain controllers were not on speaking terms with one another. Research was pointing to DNS as the cause and how Windows Server 2003 handles active directory replication following an unsuccessful DNS lookup.

From Microsoft’s support site it appears that Server 2003 with Service Pack 1 (which I thought was on both boxes) handles this much better. So after I figured out that one of the servers didn’t have Service Pack 1 I installed it rebooted and the two Servers decided they were on speaking terms after all. I think we need to do some diving into the workings of the DNS problem but for now it’s working!

Enable and disable domain user accounts with VBScript

How to enable and disable a Windows domain account using vb script. In our network there are only 2 people who are able to add or manipulate domain users. Every now and then I have wanted to give a non administrator user the ability to enable or disable a user account.

Keys

In our case we have a couple of domain user accounts used for external software support companies that VPN into our network to perform tasks. I didn’t want that account being open and accessible all of the time. I realize I could have used logon hours within the account properties to specify what hours the user could and couldn’t log on, but I wanted to the account to only be enabled when the support personel asked for access. I didn’t want to add the person I wanted to be able to enable and disable this account to the domain administrator’s group and I didn’t want to have to install the domain administration tools on their PC so they could do this locally.
After some research I found a really easy way to accomplish this using VB Script. The user that will be running the script will have to have security privileges on the user that they are going to be able to enable or disable. Create a text file and name it whatever you want with .vbs as the extension. Edit the following text in the appropriate places and copy this text into the .vbs file.

Set objUser = GetObject _
(“LDAP://cn=accountname,ou=organizationalunit,dc=domain,dc=domainextension”)
objUser.AccountDisabled = FALSE
objUser.SetInfo

Replace accountname with the user account name, replace organizationalunit with the appropriate organizational unit, domain and domain extension. Save the text file.
Just double click it to execute and viola! Now this is just the bare minimum coding to enable a disabled account it doesn’t come back and let you know it worked or didn’t work. You could get fancy and make it display a message box when it’s finished, but I didn’t feel like going that far.
The following code disables the specified account.
Const ADS_UF_ACCOUNTDISABLE = 2
Set objUser = GetObject _
(“LDAP://cn= accountname,ou= organizationalunit,dc= domain,dc= domainextension “)
intUAC = objUser.Get(“userAccountControl”)
objUser.Put “userAccountControl”, intUAC OR ADS_UF_ACCOUNTDISABLE
objUser.SetInfo

For added security I took the disable account code and made a scheduled task on one of our servers to automatically run this script every day at 4:30pm. That way I know the account gets disabled and don’t have to worry about someone forgetting to disable it.