DriverIdentifier doesn’t show anything after running the scan or it open Notepad

By default, after you clicking on “Scan” button, DriverIdentifier will scan and it will open your default browsers ( Internet Explorer or Firefox or Chrome..) to open the scan result. In some cases , this does not happen , it might open Notepad , or Microsoft Word … which you just see some text.

Here are the steps to fix it.

1. Click on your Start button

Click Start , then Run

2. Enter %temp%\driveridentifier\ and click OK



3. You  will see a file driver.html , right click on it , select Open With , then select Choose Program


4. Select your default Browsers

Read More

Too many connections in TIME_WAIT state when using netstat -na

Applications that handle a huge number of TCP connections, either as a server, or as a client, will often see a large number of sockets in TIME_WAIT state.
The sockets in TIME_WAIT can be seen with the “netstat -epn –tcp ” command.
If the number of TIME_WAIT sockets gets too large, your address space will be exhausted, causing a disruption of TCP traffic.
If you try a little Googling, you may be find tcp_fin_timeout option .
Do not be confused by the /proc/sys/net/ipv4/tcp_fin_timeout config item. The FIN TIMEOUT is not the same as the TIMEWAIT length.

You can force the kernel to reuse the TIME_WAIT buckets though, by setting the /proc/sys/net/ipv4/tcp_tw_recycle entry to 1. I have tested this, and it works: very few TIME_WAIT entries will be present when using this setting.

# echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
or
add net.ipv4.tcp_tw_recycle = 1 to /etc/sysctl.conf .

Read More

Linux: Move mysql data files to new location

Want to change the default mysql data_dir  (/var/lib/mysql) to new location (new partition, new disk ?)

Steps to do:
1. stop mysql ( /etc/init.d/mysql stop)
2. copy your mysql data directory to new location ( mv /var/lib/mysql/ /newlocation/mysql/)
3. chown -R mysql:mysql /newlocation/mysql
4. edit file /etc/mysql/my.inf ( change data_dir location)
5. edit file /etc/apparmod.d/usr.sbin.mysqld (change /var/lib/mysql to your new location)
6. start mysql (/etc/init.d/mysql start)

Read More

Accessing files from System32 directory using 32 bit application on 64 bit machine

Problem:

I am trying to access few files from C:\Windows\System32\Winevt on Windows 7 – 64 bit machine through .net application.

When I build my application in 32 bit , I am not able to access this Winevt directory. It complians about directory not found.
But If I build my application in 64 bit mode, I am able to access this directory without any problem.

Do I have to do anything special to access this directory using 32 bit application on 64 bit machine?

Reason:

a computer that is running a 64-bit version of Windows Server 2003 or of Windows XP, a 32-bit application cannot access the following folder: %WinDir%\System32

This behavior occurs because Windows on Windows 64-bit (WOW64) provides file system redirection.
In a 64-bit version of Windows Server 2003 or of Windows XP, the %WinDir%\System32 folder is reserved for 64-bit applications. When a 32-bit application tries to access the System32 folder, access is redirected to the following folder:
%WinDir%\SysWOW64
By default, file system redirection is enabled.

Solution:

As a walk-around solution, 32-bit applications can access the native system directory by substituting %windir%\Sysnative for %windir%\System32. WOW64 recognizes Sysnative as a special alias used to indicate that the file system should not redirect the access.
So, if we want to access C:\Windows\System32\Winevt folder from 32-bit application, we can use C:\Windows\Sysnative\Winevt instead.

Read More

How to disable email with cronjobs

By default cron jobs sends a email to the user account executing the cronjob. If this is not needed put the following command At the end of the cron job line .

>/dev/null 2>&1

For example:
* 1 * * * php /www/daily.php >dev/null 2>&1

Read More

How to export a query to csv format ?

Here is the simple sample

mysql -uusername -ppassword databasename -B -e “select * from mytable” | sed ‘s/\t/”,”/g;s/^/”/;s/$/”/;s/\n//g’ > filename.csv

Read More

apt-get on ubuntu

before running apt-get , you should update its repository

Update the Package Index: The APT package index is essentially a database of available packages from
the repositories defined in the /etc/apt/sources.list file. To update the local package index with the latest changes made in repositories, type the following:

sudo apt-get update

Read More

How to take a screenshot ?

Ever see something on your screen that you’d like to email or save for later? With Microsoft Windows , you can take a screen shot and capture an exact image of what’s on the screen.

Following the steps below to  take a screen shot and save it as a picture

1. Click the window you want to capture. Press Alt+Print Screen by holding down the Alt key and then pressing the Print Screen key. The Print Screen key is near the upper-right corner of your keyboard. (Depending on the type of keyboard you have, the exact key names on your keyboard may vary slightly.)

You can take a screen shot of your entire desktop rather than just a single window by pressing the Print Screen key without holding down the Alt key.

2. Click Start, click Accessories, and then click Paint.

3. In the Paint window, click Edit, and then click Paste.

4. When the image appears in the Paint window, click File, and then click Save As.

5. In the Save As dialog box, in the File name box, type a name for the screen shot, and then click Save.

You can now print or email the saved screen shot just like you would any other picture.

Read More

Lotus Notes: Look for a database when open mailbox

When you open a mailbox in lotus notes , it pop up a small windows saying that a <database> is not found and gives you a list of servers to look for.  Click on OK or Cancel is ok.

To avoid this annoying message , open your workspace and remove some database shortcut that is no longer valid.

Read More

10 email tips for preventing problems and avoiding aggravation

1: Address the email only when it is ready to send
Have you ever sent an email prematurely? The best way to avoid such a mistake is to leave the addressee field blank until you are positive the note is ready for sending. That way, even if you accidentally click the Send button, nothing will happen because the software won’t know where to send it. In fact, the Send button probably will be grayed out.

If you are replying to an email, follow the same procedure. In this case, however, before starting your message, cut the recipient’s name from the addressee field (this person was the original sender) and paste it into the body of your note. Then, when are ready to send, cut that address from the body and re-paste it into the addressee field.

2: Attach any files before composing your note
How many times have you gotten an email that referenced files that you never received because the sender failed to attach them? How many times have you meant to attach a file, but forgot? Avoid this embarrassment and annoyance by attaching these files first, before you even start composing your note.

3: Tell the other person which email you used when sending
Is someone saying your email was never received? Don’t answer by simply saying, “I did send you an email.” Be specific and spell out the user name and the domain name of the address. Even if you typed the address correctly, that address might not be the main one the other person uses. In addition, of course, you could have mistyped the address or used the wrong syntax, such as typing an underscore instead of a period between first name and last name.

Likewise, if you are planning to send someone an email in the future, tell that person which address you will use.

4: Reply to a new person from the same address that received that person’s note
Let’s say you get an email from someone for the first time, but you expect to exchange more in the future. When you reply to that person, do so from the same address to which your sender addressed his or her note.

Your sender probably is using a spam filter. Such filters often will assume that any recipient of outgoing mail from that sender is good and will whitelist that recipient address. Therefore, when you reply from that address, your sender’s spam filter will allow your reply to get through.

Suppose, however, that you reply to that sender from a different email address, perhaps because the one that received the message is your less commonly used one. The sender’s spam filter might not recognize this other address, and your note could be trapped in the spam filter’s junk/spam mailbox. For this reason, the best approach is to reply from the same address that originally received that note.

5: If you want the other person to use a different address for you, say so first
What if you really would like that person to send to an alternate email address? In this case, simply say so. However, do so via phone, or via a note from the “old” address, i.e., the one your sender originally used. If you tell the sender via an email from that new address, you run into the same potential spam filter problem.

6: Send a test message first
You may get an email address from a new client or associate who dictates the address to you verbally or you might type it in by hand from a business card. To be safe, especially if you will be sending sensitive information, send a test message first to make sure you didn’t mistype while entering the address. If the person replies with a confirmation, you know that you entered the address correctly.

7: Copy and paste the address instead of manual typing
Copying and pasting an address instead of manually typing will eliminate potential mistakes. Just be aware that the address to be copied still might be wrong, so sending a test message even in such cases still is desirable.

8: Be careful with addressee auto-complete
A friend once told me of an experience she had one summer. She had written an actual hard-copy letter to her then-boyfriend. She also had written a letter to one of her girlfriends, in which she talked about some new guy she had just met. She mailed the letters, then a few days later got a call from the girlfriend telling her she had gotten the boyfriend’s letter.

Your email program might predict the name of an addressee and complete that field for you. While convenient, this feature carries with it the risk that you will send an email to the wrong person. If you can live with the risk of what happened to my friend, at least verify the addressee name before clicking Send. If you’d prefer to eliminate the risk, go into your email program’s options menu and disable the auto-complete feature.

9: Point recipient to “subject line messages”
Some guides on email advise you put a short message solely in the subject line to save time for the recipient. Be aware, though, that doing so may cause your message to be missed. Just this morning, I emailed a client with a request that he send me a check to cover mailing expenses. I put the dollar amount right in the subject line. Twenty minutes later, he emailed me back and asked for the amount. Now, this client is a good person, and I am not criticizing him. However, like many of us, he might be conditioned to click on the inbox entry and look for information in Putting the message in the subject line is still is a good idea. However, to be safe, I would put a short line in the body that says “see subject line for message.” I know it partially defeats the purpose of using the subject line this way, but it lessens the chances of missed information.

10: Be careful about too-large attachments
Network speeds and bandwidth have increased dramatically over time. Maybe these days a 1MB attachment would not cause the problems it would have 10 years ago. Nonetheless, be sensitive to sending attachments that are too large. You still could cause problems for your co-workers and anger the network administrator, both on your side and your recipient’s side.

Ask your help desk about any limits on file sizes. Also, make sure you have to send an actual file. For example, could you merely send a Web page address instead? If you really do need to send large files, consider an FTP service such as http://www.send6.com

Bonus tip: Check and verify Web links you send
After I typed the above Web page address, I copied it and pasted it into my Web browser to make sure I got to the right page. The same principle applies here as for email addresses: You want to make sure you didn’t mistype or use the wrong domain name extension in Web addresses. If you are giving information about the White House Web site, for example, be aware that it is www.whitehouse.gov. Use of any other extension might lead to embarrassing results for your recipient and hence problems for you.

Read More