My Tech Scrap
Flipkart.com

Translate

Monday, 22 November 2010

Add google.com search engine to google chrome, How can I change the default search language to english

It annoyed me too. Here is my fix, its not pretty, but it works.

1) Open "Edit search engines"
2) Select "Google" and hit "edit"
3) Now select the 3rd row ("URL") and copy it and close the window
4) Hit "Add". Type whatever you like in "Name" and "keyword".
5) In "URL" paste the copied text and replace "{google:baseURL}" with "http://www.google.com/" the click OK
6) Select your new google engine and make it default
7) Done!




Read More

Thursday, 23 September 2010

Nokia c5 Disable power saving mode

Brightness in C5
Adjust the brightness of the display in C5.... I tried to do in the personalisation>display section, but it says  "Unable to change, Power saving mode active" .


Solution


Press the power on /off button
a list will pop up scroll to the end of list you will see powersaving



Please deactivate the powersaving mode, after that you will be able to adjust the brightness of your c5 mobile phone...

Sunday, 18 July 2010

Find multiple words in a webpage using Firefox

Some time you may need to find all occurance of words in a sentence in a web page
For example there is a web page with a list of addresses, you want to find all occurance of either kochi or delhi or mumbai

This can be accomplished using regular expression, hearing the word regular expression some of you may stop reading and browse to other stuffs, dont worry I will teach you how to do the same, its really easy

First of all install the firefox extension /Find Bar/ from
https://addons.mozilla.org/en-US/firefox/addon/99836/
After success full installation, restart firefox
Load the web page that you want to search for words
press Ctrl+F or Edit >> Find
As you had installed new addon, you can see one "Regular Expression"  Checkbox, please check that box and
Enter the words in the find textbox separated using "|"
For example, for finding kochi or mumbai or delhi
enter   "kochi|mumbai|delhi" and press next next next , he he :)
Thats all, now you can find multiple word in a single page

Wednesday, 14 July 2010

Turn your Nokia smart phone to Wireless presenter

Most of you may searching for a wireless presenter for your laptop, for showing powerpoint presentations, for controling your desktop, media player and winamp.

Here is the solution

Minimum requirements:
  • Both PC and Presenter (phone) components of the Nokia Wireless Presenter software
  • Windows XP or Windows 2000 (Windows 2000 Service Pack 2 or higher)
  • A Bluetooth (version 1.1 or greater) compatible device providing an incoming virtual serial port
  • 1.2 MB free hard disk space
  • A screen resolution of at least 800x600 and a mouse or similar pointing device (recommended)
Please download and Install
Nokia Wireless presenter Mobile client from
http://www.cellsea.com/application/detail/AP1194483400304.htm
and Nokia Wireless presenter Windows/PC component from
http://europe.nokia.com/support/product-support/nokia-6131/pc-software/wireless-presenter

After installing both Go ahead to your Bluetooth settings in control panel and add one COM port by following these steps

Start >> settings >> Control Panel>> Bluetooth devices
Select the COM Port Tab
Click Add button
Select the type of port as
Incoming (device initiates the connection)
and click ok
Please note the COM port number that you had created ( for egs:- COM8 )
Start Nokia Wireless presenter on PC from start menu
Start >> Programs >> Nokia >> Nokia Wireless presenter >> Nokia Wireless presenter
When running it for the first time it may show the error

"Nokia Wireless Presenter failed to open serial port COM99. 
Please make sure that this is the Bluetooth (incoming)
serial port defined in your Bluetooth configuration software
and that is not resevered by some other application.
Consult the help for detailed instructions"

For fixing this error, just select the correct COM port that you had created in the previous step (egs:- COM8)
and press OK

Now your PC Side configuration is finished.

Then start your Nokia Wireless Presenter from your mobile  and select connect search and find your Laptop/PC and press select it may prompt you to Allow application to use connectivity application, select allow for this session. Then it will show the active services running on your PC.

If you open desktop, you can use your mobile phone as mouse :)
If Powerpoint is running in your computer, then you can control the slide show, in power point mode, there is one pointer option too
You can do more using the configuration of wireless presenter

Thursday, 1 July 2010

How to Batch Convert WMA files to MP3

Most of you may got stuck with organizing your audio files library. You may want to convert from wma format to mp3, change bit-rate to reduce file size etc at the same time as  the number of files is huge you needs batch processing. At the same time you need all those converted mp3s in the same destination folder as same as the source files.

Here is the solution, yep free software from sourceforge :)
Just download winLAME from http://winlame.sourceforge.net/download.php
For older versions of winLAME just try http://sourceforge.net/projects/winlame/files/

In winLAME there are different options like,
You can select the bit-rate
You can change the output quality,
There is option to delete or keep the source files after converting it to mp3
You can turn off/hibernate after successful l conversion
Really a cool MP3 batch file converter

Saturday, 26 June 2010

Lord Rahul Cool removal

Thats the virus you can remove by following these steps...i will 3 solutions to remove that virus..k if you bored to try that one.just use the sofware named quick heal it wil remove the virus... 
Followed below steps: 
1. Click on Any folder. 
2. Click Tools - Folder Options - View - Hidden Files & Folders 
3. Mark Show hidden files and folders 
4. Unmark Hide extensions of Known file types 
5. Unmark Hide protected Operating system 
files (Recommended) 
6. First two files were seen on my flash drive : Rahul’svirusprotection.vbe & autorun.inf 
7. Click on the properties of both file and unmarked Read only. 
8. Clicked Apply & deleted both files. 
9. Searched for Rahul*.* on hard drives. 
10. Click on the properties file and unmarked Read only deleted the file. 
11. Now LORD RAHUL COOL is out of my browser. 


(OR) 


actually this is a VB script file and located in System32 
directory, first you delete this file from this location 

do it 
In Windows Explorer…. following this steps 
Tools — > Folder Options —> View(tab) 
check this one 
Show hidden Files and Folders … 
Uncheck this one 
Hide prorected operating system files (Recommended) 

Now you can view all system files and Hidden files into your drives…. 
go to this system directory 
C:windowssystem32 

find this file one “Rahulsvirusprotection.vbe” 
and delete it…..then following the REGEDIT clear steps….it’s really very simple. 

if u can not found this file, please search word like *Rahul*.* 

if u can not delete this file, please search the software name like UNLOCKER 1.8.8 in google 
this small utility can delete this file very easily 
and finally you will get a error message while logging in ..to remove that..just do 

after deleting the virus in the logon you will receive the message cannot run the script like that..follow this procedure…start–>run–>regedit..and go to the following path.. i will give you…heykey_local machine–>software–>microsoft–>windows NT–>current version–>windows logon…go there and delete the second path..thats for rahul cool virus..keep the first one alone and delete the rest..for ex:keep like C:WINDOWSsystem32userinit.exe..save then exit..thats all..next time it wont show the message 

================================= 

Delete this values into registry 
1--- Start>>Allprograms>>RUN 
2---- and type REGEDIT into run window 
3----- goto this KEYS into registry editor 

HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\INTERNET EXPLORER\MAIN\ 
------------------------------------------------------------- 

delete the key value 
******************** 

Window Title : LORD RAHUL COOL '''delete this value or change it.


Friday, 18 June 2010

How to Import multiple .vCard files in Outlook ?

This can also be done using a VBA macro. First create a folder on the root of the C: drive and name it VCARDS. Next copy all your individual vCard files (.vcf) to this newly created folder. Next open Outlook and click ALT + F11 to open the VBA editor. 

Click TOOLS --> REFERENCES and then select Microsoft Scripting Runtime andWindows Script Host Object Model from the list and place checks in the box next to each and click OK. 

Next click INSERT --> MODULE and copy and paste the code below into the blank module. Save and run the macro to automatically import and save all the individual files into Outlook.


Code:
Sub OpenSaveVCard()
    
Dim objWSHShell As IWshRuntimeLibrary.IWshShell
Dim objOL As Outlook.Application
Dim colInsp As Outlook.Inspectors
Dim strVCName As String
Dim fso As Scripting.FileSystemObject
Dim fsDir As Scripting.Folder
Dim fsFile As Scripting.File
Dim vCounter As Integer
    
    
Set fso = New Scripting.FileSystemObject
Set fsDir = fso.GetFolder("C:\VCARDS")

For Each fsFile In fsDir.Files

    strVCName = "C:\VCARDS\" & fsFile.Name
    Set objOL = CreateObject("Outlook.Application")
    Set colInsp = objOL.Inspectors
        If colInsp.Count = 0 Then
        Set objWSHShell = CreateObject("WScript.Shell")
        objWSHShell.Run Chr(34) & strVCName & Chr(34)
        Set colInsp = objOL.Inspectors
    If Err = 0 Then
            Do Until colInsp.Count = 1
                DoEvents
            Loop
            colInsp.Item(1).CurrentItem.Save
            colInsp.Item(1).Close olDiscard
            Set colInsp = Nothing
            Set objOL = Nothing
            Set objWSHShell = Nothing
        End If
    End If

Next

End Sub
Referance >> http://forums.techguy.org/business-applications/532618-import-multiple-vcard-files-outlook.html
http://forums.techguy.org/business-applications/532618-import-multiple-vcard-files-outlook-2.html

Monday, 8 March 2010

Free Sip phone (Soft phone) for linux

Ekiga (formely known as GnomeMeeting) is an open source SoftPhone, Video Conferencing and Instant Messenger application over the Internet.
It supports HD sound quality and video up to DVD size and quality.
It is interoperable with many other standard compliant softwares, hardwares and service providers as it uses both the major telephony standards (SIP and H.323).
Would you like to know more?

Mount a Windows shared folder in Linux / MAC OS X

Press (ALT+F2) to bring up the run dialog and type smb:// followed by the IP address and the folder name. As shown below, I need to type smb://192.168.1.117/Shared. If you have your Windows account password, you will need to enter the username and password to access the shared folder.

Tuesday, 9 February 2010

Turn your phone into a webcam

Does your Phone supports java?
Do you have Bluetooth in PC or any USB Bluetooth Dongle?  or wifi ?
Then you can try Jsmartcam.
Download Two software.
One is Jsmartcam.jar/sis and install it to your phone.
Then Download Smartcam into your PC. Start the Bluetooth on PC. Start Smartcam. Then start bluetooth. Start JSmartcam on your Phone and connect to PC either using wifi or bluetooth.

Download it from http://sourceforge.net/projects/smartcam/files/

Windows Client : http://sourceforge.net/projects/smartcam/files/smartcam_windows/SmartCam_v1_4/SmartCam_v1_4.exe/download

Mobile Client :
http://sourceforge.net/projects/smartcam/files/smartcam_symbian/SmartCamS60_v1_4/SmartCamS603rdEd_v1_4.sis/download

Saturday, 6 February 2010

Documents that have attached templates take a long time to open in Word 2002 and in Word 2003

When you open a Microsoft Word Document (*.doc) file, the document may take longer then expected to open. For example, the document may take 5 to 10 minutes to open.
Back to the top
CAUSE
This symptom may occur if the document has a template attached or linked and one of the following conditions is true: The attached template, its folder, or its share is missing.
The attached template has been moved.
The attached template has been renamed.
The attached template, its folder, or its share is missing.
The attached template has been moved.
The attached template has been renamed.
When a Word template is missing, Windows XP will try to locate the missing template multiple times. The process of locating a missing template may cause a Word document to take longer than expected to open.

It will take longer to open the document when you are connected to a network compared to when you are disconnected from the network.
Back to the top
RESOLUTION
To work around this problem on a computer with Windows XP installed, use one of the following methods as appropriate for your situation: Method 1: Attach the template from a new location, or attach the global template (Normal.dot).

Tools >> Templates and Add-In.. >>Change the  value "Document Template"  field to "Normal.dot"

For more than one file you can use VBscript too
Refer this link for more details
http://support.microsoft.com/?kbid=830561
















































































































































Option Explicit

Private Const BIF_RETURNONLYFSDIRS = 1
Private Const BIF_DONTGOBELOWDOMAIN = 2
Private Const MAX_PATH = 260
Private Declare Function SHBrowseForFolder Lib "shell32" _
(lpbi As BrowseInfo) As Long
Private Declare Function SHGetPathFromIDList Lib "shell32" _
(ByVal pidList As Long, _
ByVal lpBuffer As String) As Long
Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" _
(ByVal lpString1 As String, ByVal _
lpString2 As String) As Long

Private Type BrowseInfo
hWndOwner As Long
pIDLRoot As Long
pszDisplayName As Long
lpszTitle As Long
ulFlags As Long
lpfnCallback As Long
lParam As Long
iImage As Long
End Type

Public fso As New FileSystemObject
Dim fld As Folder

Private Sub cmdEnd_Click()
End
End Sub

Private Sub cmdSource_Click()
' Opens a Treeview control that displays the directories in a computer.

Dim lpIDList As Long
Dim sBuffer As String
Dim szTitle As String
Dim tBrowseInfo As BrowseInfo

szTitle = "This is the title"
With tBrowseInfo
.hWndOwner = Me.hWnd
.lpszTitle = lstrcat(szTitle, "")
.ulFlags = BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN
End With

lpIDList = SHBrowseForFolder(tBrowseInfo)
If (lpIDList) Then
sBuffer = Space(MAX_PATH)
SHGetPathFromIDList lpIDList, sBuffer
sBuffer = Left(sBuffer, InStr(sBuffer, vbNullChar) - 1)
frmFSO.txtSearch.Text = sBuffer
End If
End Sub

Private Sub cmdTarget_Click()

' Opens a Treeview control that displays the directories in a computer.

Dim lpIDList As Long
Dim sBuffer As String
Dim szTitle As String
Dim tBrowseInfo As BrowseInfo

szTitle = "This is the title"
With tBrowseInfo
.hWndOwner = Me.hWnd
.lpszTitle = lstrcat(szTitle, "")
.ulFlags = BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN
End With

lpIDList = SHBrowseForFolder(tBrowseInfo)

If (lpIDList) Then
sBuffer = Space(MAX_PATH)
SHGetPathFromIDList lpIDList, sBuffer
sBuffer = Left(sBuffer, InStr(sBuffer, vbNullChar) - 1)
End If
End Sub

Private Sub Command1_Click()
Dim nDirs As Long, nFiles As Long, lSize As Currency
Dim sDir As String, sSrchString As String
Dim nTime
Dim ntime2
Dim nOk As Integer
Dim fileNumber As Integer
Dim oWord As Object
Dim strServer As String
Set oWord = CreateObject("Word.Application")
strServer = txtOldServer.Text
nTime = Time()
fileNumber = FreeFile

List1.Clear

Open "C:\ChangeTemplate.log" For Append As #fileNumber
Write #fileNumber, "Start:" & " " & nTime
Close #fileNumber

'Enter the top-level directory to start the search.
sDir = txtSearch.Text

'Enter the type of files, such as *.doc for Word documents
sSrchString = "*.doc"

MousePointer = vbHourglass

'The label shows the current subfolder being searched.
Label1.Caption = "Searching Folder: " & vbCrLf & UCase(sDir) & "..."
lSize = FindFile(sDir, sSrchString, nDirs, nFiles, strServer, oWord)
MousePointer = vbDefault
ntime2 = Time()
'Opens text file to show the stop time and the total numbers of
'files that were found.
Open "C:\ChangeTemplate.log" For Append As #fileNumber
Write #fileNumber, "Stop:" & " " & ntime2 & " " & _
"Time to Complete the Changes: " & _
Format(ntime2 - nTime, "nn:ss") & vbCrLf _
& Str(nFiles) & " files found in" & Str(nDirs) & _
" directories"
Close #fileNumber
' Debug.Print "Stop:" & " " & ntime2
Label1.Caption = "Done"
If Label1.Caption = "Done" Then Command2.Enabled = True
MsgBox "Done"
oWord.Quit
Set oWord = Nothing
End Sub

Private Function FindFile(ByVal sFol As String, sFile As String, _
nDirs As Long, nFiles As Long, strOServer As String, oWrd As Object) _
As Currency
Dim tFld As Folder, tFil As File, FileName As String
Dim strFileName As String
Dim fileNumber As Integer

On Error GoTo Catch

Set fld = fso.GetFolder(sFol)
FileName = Dir(fso.BuildPath(fld.Path, sFile), vbNormal Or _
vbHidden Or vbSystem Or vbReadOnly)
While Len(FileName) <> 0
FindFile = FindFile + FileLen(fso.BuildPath(fld.Path, FileName))
nFiles = nFiles + 1
List1.AddItem fso.BuildPath(fld.Path, FileName) ' Load ListBox
strFileName = fld.Path & "\" & FileName
'==

ChangeTemplate strFileName, strOServer, oWrd
FileName = Dir() ' Get next file
DoEvents
Wend
Label1 = "Searching " & vbCrLf & fld.Path & "..."
nDirs = nDirs + 1

If fld.SubFolders.Count > 0 Then
For Each tFld In fld.SubFolders
DoEvents
FindFile = FindFile + FindFile(tFld.Path, sFile, nDirs, nFiles, _
strOServer, oWrd)
Next
End If
Exit Function

Catch: FileName = ""

If Err.Number = 76 Then
MsgBox "This is not a valid path statement" & vbCrLf & _
"The program will end!"
End
End If
Debug.Print Err.Description
fileNumber = FreeFile

'Writes the error description and number to the log file.
Open "C:\ChangeTemplate.log" For Append As #fileNumber
Write #fileNumber, Err.Description & " " & Err.Number
Close #fileNumber
Resume Next
End Function

Private Sub Command2_Click()
'Use this to view the log file.
Shell "notepad.exe c:\ChangeTemplate.log", 1
End Sub



























































































































































































In a Standard module, add the following code:Sub ChangeTemplate(SourceFile As String, strServer As String, objWord As Object)

Dim dlgTemplates As Dialog
Dim strTemp As String
Dim strpath As String
Dim objtemplate As String
Dim dlgTemplate As Object
Dim x As Integer
Dim fNumber As Integer
Dim objDoc As Object

fNumber = FreeFile

objWord.Visible = False
strTemp = SourceFile

'This function determines if the document is password protected or Read Only.
If OpenDocument(objWord, strTemp) = True Then
'This assumes that there is only one document opened. It may have to be adjusted
'to look for additional document being opened.
Set objDoc = objWord.Documents(1)
'Dialogs 87 is the Templates and Addins dialog
Set dlgTemplates = objWord.Dialogs(87)
objtemplate = objWord.Dialogs(87).Template

'parse out the server name from the fullname of the attached template

If Mid(objtemplate, 2, 1) = ":" Or Left(objtemplate, 2) = "\\" Then
x = InStr(3, objtemplate, "\")
strTemp = Mid(objtemplate, 3, x - 3)
'if the parse name is the same as the stated server then
'change the attached template to the Normal

If strTemp = strServer Then
objDoc.AttachedTemplate = "Normal.dot"
'write to a log file the file name and location
Open "C:\ChangeTemplate.log" For Append As #fNumber
Write #fNumber, "Document: " & objDoc.fullName & _
"Attached template changed to Normal.dot"
Close #fNumber
End If
End If

'After the template is changed, the document is saved and closed.

objDoc.Save
objDoc.Close
Else
'Enter into the log file files that are not opened.
Open "C:\ChangeTemplate.log" For Append As #fNumber
Write #fNumber, "Document: " & SourceFile & " not opened! it's
Read Only or Password Protected"
Close #fNumber
End If

End Sub
Function OpenDocument(ByRef objWord As Object, ByVal sDoc As String) As Boolean
'Arguments:
' objWord - a valid Word Application object.
' sDoc - the complete path and file name of the document to open in Word.
'
'Opens the document specified by the sDoc variable.
'This function returns True if the document is opened and is read/write.
'Else, this function returns False if the document cannot be opened
'or if the document is opened read-only because of the "read-only recommended" setting
'in the document.
'Therefore only if this function returns True if you try to modify the document.
'If False is returned, log the sDoc into a text file and alert the user
'of the list of file(s) that could not be processed by the batch routine.
On Error GoTo EH
Dim oDoc As Object
Set oDoc = objWord.Documents.Open( _
FileName:=sDoc, _
ReadOnly:=False, _
PasswordDocument:="?#nonsense@$", _
WritePasswordDocument:="?#nonsense@$")
If oDoc.ReadOnly = True Then
OpenDocument = False
Else
OpenDocument = True
End If
CleanUp:
On Error Resume Next
Set oDoc = Nothing
Exit Function

EH:
'There was an error opening the file. Return False
OpenDocument = False
Resume CleanUp
End Function

















































































































































































































































































Open a new Standard.exe project.
On a User Form, add the following components: One list box
Two text boxes
Four command buttons
Two labels
One list box
Two text boxes
Four command buttons
Two labels
Set a reference to the Microsoft Scripting Runtime (Scrun.dll).
Copy and paste the following code in a user form:Option Explicit

Private Const BIF_RETURNONLYFSDIRS = 1
Private Const BIF_DONTGOBELOWDOMAIN = 2
Private Const MAX_PATH = 260
Private Declare Function SHBrowseForFolder Lib "shell32" _
(lpbi As BrowseInfo) As Long
Private Declare Function SHGetPathFromIDList Lib "shell32" _
(ByVal pidList As Long, _
ByVal lpBuffer As String) As Long
Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" _
(ByVal lpString1 As String, ByVal _
lpString2 As String) As Long

Private Type BrowseInfo
hWndOwner As Long
pIDLRoot As Long
pszDisplayName As Long
lpszTitle As Long
ulFlags As Long
lpfnCallback As Long
lParam As Long
iImage As Long
End Type

Public fso As New FileSystemObject
Dim fld As Folder

Private Sub cmdEnd_Click()
End
End Sub

Private Sub cmdSource_Click()
' Opens a Treeview control that displays the directories in a computer.

Dim lpIDList As Long
Dim sBuffer As String
Dim szTitle As String
Dim tBrowseInfo As BrowseInfo

szTitle = "This is the title"
With tBrowseInfo
.hWndOwner = Me.hWnd
.lpszTitle = lstrcat(szTitle, "")
.ulFlags = BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN
End With

lpIDList = SHBrowseForFolder(tBrowseInfo)
If (lpIDList) Then
sBuffer = Space(MAX_PATH)
SHGetPathFromIDList lpIDList, sBuffer
sBuffer = Left(sBuffer, InStr(sBuffer, vbNullChar) - 1)
frmFSO.txtSearch.Text = sBuffer
End If
End Sub

Private Sub cmdTarget_Click()

' Opens a Treeview control that displays the directories in a computer.

Dim lpIDList As Long
Dim sBuffer As String
Dim szTitle As String
Dim tBrowseInfo As BrowseInfo

szTitle = "This is the title"
With tBrowseInfo
.hWndOwner = Me.hWnd
.lpszTitle = lstrcat(szTitle, "")
.ulFlags = BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN
End With

lpIDList = SHBrowseForFolder(tBrowseInfo)

If (lpIDList) Then
sBuffer = Space(MAX_PATH)
SHGetPathFromIDList lpIDList, sBuffer
sBuffer = Left(sBuffer, InStr(sBuffer, vbNullChar) - 1)
End If
End Sub

Private Sub Command1_Click()
Dim nDirs As Long, nFiles As Long, lSize As Currency
Dim sDir As String, sSrchString As String
Dim nTime
Dim ntime2
Dim nOk As Integer
Dim fileNumber As Integer
Dim oWord As Object
Dim strServer As String
Set oWord = CreateObject("Word.Application")
strServer = txtOldServer.Text
nTime = Time()
fileNumber = FreeFile

List1.Clear

Open "C:\ChangeTemplate.log" For Append As #fileNumber
Write #fileNumber, "Start:" & " " & nTime
Close #fileNumber

'Enter the top-level directory to start the search.
sDir = txtSearch.Text

'Enter the type of files, such as *.doc for Word documents
sSrchString = "*.doc"

MousePointer = vbHourglass

'The label shows the current subfolder being searched.
Label1.Caption = "Searching Folder: " & vbCrLf & UCase(sDir) & "..."
lSize = FindFile(sDir, sSrchString, nDirs, nFiles, strServer, oWord)
MousePointer = vbDefault
ntime2 = Time()
'Opens text file to show the stop time and the total numbers of
'files that were found.
Open "C:\ChangeTemplate.log" For Append As #fileNumber
Write #fileNumber, "Stop:" & " " & ntime2 & " " & _
"Time to Complete the Changes: " & _
Format(ntime2 - nTime, "nn:ss") & vbCrLf _
& Str(nFiles) & " files found in" & Str(nDirs) & _
" directories"
Close #fileNumber
' Debug.Print "Stop:" & " " & ntime2
Label1.Caption = "Done"
If Label1.Caption = "Done" Then Command2.Enabled = True
MsgBox "Done"
oWord.Quit
Set oWord = Nothing
End Sub

Private Function FindFile(ByVal sFol As String, sFile As String, _
nDirs As Long, nFiles As Long, strOServer As String, oWrd As Object) _
As Currency
Dim tFld As Folder, tFil As File, FileName As String
Dim strFileName As String
Dim fileNumber As Integer

On Error GoTo Catch

Set fld = fso.GetFolder(sFol)
FileName = Dir(fso.BuildPath(fld.Path, sFile), vbNormal Or _
vbHidden Or vbSystem Or vbReadOnly)
While Len(FileName) <> 0
FindFile = FindFile + FileLen(fso.BuildPath(fld.Path, FileName))
nFiles = nFiles + 1
List1.AddItem fso.BuildPath(fld.Path, FileName) ' Load ListBox
strFileName = fld.Path & "\" & FileName
'==

ChangeTemplate strFileName, strOServer, oWrd
FileName = Dir() ' Get next file
DoEvents
Wend
Label1 = "Searching " & vbCrLf & fld.Path & "..."
nDirs = nDirs + 1

If fld.SubFolders.Count > 0 Then
For Each tFld In fld.SubFolders
DoEvents
FindFile = FindFile + FindFile(tFld.Path, sFile, nDirs, nFiles, _
strOServer, oWrd)
Next
End If
Exit Function

Catch: FileName = ""

If Err.Number = 76 Then
MsgBox "This is not a valid path statement" & vbCrLf & _
"The program will end!"
End
End If
Debug.Print Err.Description
fileNumber = FreeFile

'Writes the error description and number to the log file.
Open "C:\ChangeTemplate.log" For Append As #fileNumber
Write #fileNumber, Err.Description & " " & Err.Number
Close #fileNumber
Resume Next
End Function

Private Sub Command2_Click()
'Use this to view the log file.
Shell "notepad.exe c:\ChangeTemplate.log", 1
End Sub



























































































































































































Option Explicit

Private Const BIF_RETURNONLYFSDIRS = 1
Private Const BIF_DONTGOBELOWDOMAIN = 2
Private Const MAX_PATH = 260
Private Declare Function SHBrowseForFolder Lib "shell32" _
(lpbi As BrowseInfo) As Long
Private Declare Function SHGetPathFromIDList Lib "shell32" _
(ByVal pidList As Long, _
ByVal lpBuffer As String) As Long
Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" _
(ByVal lpString1 As String, ByVal _
lpString2 As String) As Long

Private Type BrowseInfo
hWndOwner As Long
pIDLRoot As Long
pszDisplayName As Long
lpszTitle As Long
ulFlags As Long
lpfnCallback As Long
lParam As Long
iImage As Long
End Type

Public fso As New FileSystemObject
Dim fld As Folder

Private Sub cmdEnd_Click()
End
End Sub

Private Sub cmdSource_Click()
' Opens a Treeview control that displays the directories in a computer.

Dim lpIDList As Long
Dim sBuffer As String
Dim szTitle As String
Dim tBrowseInfo As BrowseInfo

szTitle = "This is the title"
With tBrowseInfo
.hWndOwner = Me.hWnd
.lpszTitle = lstrcat(szTitle, "")
.ulFlags = BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN
End With

lpIDList = SHBrowseForFolder(tBrowseInfo)
If (lpIDList) Then
sBuffer = Space(MAX_PATH)
SHGetPathFromIDList lpIDList, sBuffer
sBuffer = Left(sBuffer, InStr(sBuffer, vbNullChar) - 1)
frmFSO.txtSearch.Text = sBuffer
End If
End Sub

Private Sub cmdTarget_Click()

' Opens a Treeview control that displays the directories in a computer.

Dim lpIDList As Long
Dim sBuffer As String
Dim szTitle As String
Dim tBrowseInfo As BrowseInfo

szTitle = "This is the title"
With tBrowseInfo
.hWndOwner = Me.hWnd
.lpszTitle = lstrcat(szTitle, "")
.ulFlags = BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN
End With

lpIDList = SHBrowseForFolder(tBrowseInfo)

If (lpIDList) Then
sBuffer = Space(MAX_PATH)
SHGetPathFromIDList lpIDList, sBuffer
sBuffer = Left(sBuffer, InStr(sBuffer, vbNullChar) - 1)
End If
End Sub

Private Sub Command1_Click()
Dim nDirs As Long, nFiles As Long, lSize As Currency
Dim sDir As String, sSrchString As String
Dim nTime
Dim ntime2
Dim nOk As Integer
Dim fileNumber As Integer
Dim oWord As Object
Dim strServer As String
Set oWord = CreateObject("Word.Application")
strServer = txtOldServer.Text
nTime = Time()
fileNumber = FreeFile

List1.Clear

Open "C:\ChangeTemplate.log" For Append As #fileNumber
Write #fileNumber, "Start:" & " " & nTime
Close #fileNumber

'Enter the top-level directory to start the search.
sDir = txtSearch.Text

'Enter the type of files, such as *.doc for Word documents
sSrchString = "*.doc"

MousePointer = vbHourglass

'The label shows the current subfolder being searched.
Label1.Caption = "Searching Folder: " & vbCrLf & UCase(sDir) & "..."
lSize = FindFile(sDir, sSrchString, nDirs, nFiles, strServer, oWord)
MousePointer = vbDefault
ntime2 = Time()
'Opens text file to show the stop time and the total numbers of
'files that were found.
Open "C:\ChangeTemplate.log" For Append As #fileNumber
Write #fileNumber, "Stop:" & " " & ntime2 & " " & _
"Time to Complete the Changes: " & _
Format(ntime2 - nTime, "nn:ss") & vbCrLf _
& Str(nFiles) & " files found in" & Str(nDirs) & _
" directories"
Close #fileNumber
' Debug.Print "Stop:" & " " & ntime2
Label1.Caption = "Done"
If Label1.Caption = "Done" Then Command2.Enabled = True
MsgBox "Done"
oWord.Quit
Set oWord = Nothing
End Sub

Private Function FindFile(ByVal sFol As String, sFile As String, _
nDirs As Long, nFiles As Long, strOServer As String, oWrd As Object) _
As Currency
Dim tFld As Folder, tFil As File, FileName As String
Dim strFileName As String
Dim fileNumber As Integer

On Error GoTo Catch

Set fld = fso.GetFolder(sFol)
FileName = Dir(fso.BuildPath(fld.Path, sFile), vbNormal Or _
vbHidden Or vbSystem Or vbReadOnly)
While Len(FileName) <> 0
FindFile = FindFile + FileLen(fso.BuildPath(fld.Path, FileName))
nFiles = nFiles + 1
List1.AddItem fso.BuildPath(fld.Path, FileName) ' Load ListBox
strFileName = fld.Path & "\" & FileName
'==

ChangeTemplate strFileName, strOServer, oWrd
FileName = Dir() ' Get next file
DoEvents
Wend
Label1 = "Searching " & vbCrLf & fld.Path & "..."
nDirs = nDirs + 1

If fld.SubFolders.Count > 0 Then
For Each tFld In fld.SubFolders
DoEvents
FindFile = FindFile + FindFile(tFld.Path, sFile, nDirs, nFiles, _
strOServer, oWrd)
Next
End If
Exit Function

Catch: FileName = ""

If Err.Number = 76 Then
MsgBox "This is not a valid path statement" & vbCrLf & _
"The program will end!"
End
End If
Debug.Print Err.Description
fileNumber = FreeFile

'Writes the error description and number to the log file.
Open "C:\ChangeTemplate.log" For Append As #fileNumber
Write #fileNumber, Err.Description & " " & Err.Number
Close #fileNumber
Resume Next
End Function

Private Sub Command2_Click()
'Use this to view the log file.
Shell "notepad.exe c:\ChangeTemplate.log", 1
End Sub



























































































































































































In a Standard module, add the following code:Sub ChangeTemplate(SourceFile As String, strServer As String, objWord As Object)

Dim dlgTemplates As Dialog
Dim strTemp As String
Dim strpath As String
Dim objtemplate As String
Dim dlgTemplate As Object
Dim x As Integer
Dim fNumber As Integer
Dim objDoc As Object

fNumber = FreeFile

objWord.Visible = False
strTemp = SourceFile

'This function determines if the document is password protected or Read Only.
If OpenDocument(objWord, strTemp) = True Then
'This assumes that there is only one document opened. It may have to be adjusted
'to look for additional document being opened.
Set objDoc = objWord.Documents(1)
'Dialogs 87 is the Templates and Addins dialog
Set dlgTemplates = objWord.Dialogs(87)
objtemplate = objWord.Dialogs(87).Template

'parse out the server name from the fullname of the attached template

If Mid(objtemplate, 2, 1) = ":" Or Left(objtemplate, 2) = "\\" Then
x = InStr(3, objtemplate, "\")
strTemp = Mid(objtemplate, 3, x - 3)
'if the parse name is the same as the stated server then
'change the attached template to the Normal

If strTemp = strServer Then
objDoc.AttachedTemplate = "Normal.dot"
'write to a log file the file name and location
Open "C:\ChangeTemplate.log" For Append As #fNumber
Write #fNumber, "Document: " & objDoc.fullName & _
"Attached template changed to Normal.dot"
Close #fNumber
End If
End If

'After the template is changed, the document is saved and closed.

objDoc.Save
objDoc.Close
Else
'Enter into the log file files that are not opened.
Open "C:\ChangeTemplate.log" For Append As #fNumber
Write #fNumber, "Document: " & SourceFile & " not opened! it's
Read Only or Password Protected"
Close #fNumber
End If

End Sub
Function OpenDocument(ByRef objWord As Object, ByVal sDoc As String) As Boolean
'Arguments:
' objWord - a valid Word Application object.
' sDoc - the complete path and file name of the document to open in Word.
'
'Opens the document specified by the sDoc variable.
'This function returns True if the document is opened and is read/write.
'Else, this function returns False if the document cannot be opened
'or if the document is opened read-only because of the "read-only recommended" setting
'in the document.
'Therefore only if this function returns True if you try to modify the document.
'If False is returned, log the sDoc into a text file and alert the user
'of the list of file(s) that could not be processed by the batch routine.
On Error GoTo EH
Dim oDoc As Object
Set oDoc = objWord.Documents.Open( _
FileName:=sDoc, _
ReadOnly:=False, _
PasswordDocument:="?#nonsense@$", _
WritePasswordDocument:="?#nonsense@$")
If oDoc.ReadOnly = True Then
OpenDocument = False
Else
OpenDocument = True
End If
CleanUp:
On Error Resume Next
Set oDoc = Nothing
Exit Function

EH:
'There was an error opening the file. Return False
OpenDocument = False
Resume CleanUp
End Function


















































































































































































































































































back to the top
Back to the top
Method 3: Create a Microsoft Visual Basic for Applications (VBA) macro that loops through all the documents in a folder and changes the old server name with the new server name
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

The following macro loops through all the documents in a folder and changes the old server name with the new server name for the location of the templates. This macro works only if the path for the templates is the same.Sub Test()
Dim strFilePath As String
Dim strPath As String
Dim intCounter As Integer
Dim strFileName As String
Dim OldServer As String
Dim NewServer As String
Dim objDoc As Document
Dim objTemplate As Template
Dim dlgTemplate As Dialog

OldServer = "<\\rsnj01\vol1>"
NewServer = "<\\rsnyc1p\vol3>"
strFilePath = InputBox("What is the folder location that you want to use?")
If Right(strFilePath, 1) <> "\" Then strFilePath = strFilePath & "\"
strFileName = Dir(strFilePath & "*.doc")
Do While strFileName <> ""
Set objDoc = Documents.Open(strFilePath & strFileName)
Set objTemplate = objDoc.AttachedTemplate
Set dlgTemplate = Dialogs(wdDialogToolsTemplates)
strPath = dlgTemplate.Template
If LCase(Left(strPath, 13)) = LCase(OldServer) Then
objDoc.AttachedTemplate = NewServer & Mid(strPath, 14)
End If
strFileName = Dir()
objDoc.Save
objDoc.Close
Loop
Set objDoc = Nothing
Set objTemplate = Nothing
Set dlgTemplate = Nothing

End Sub




































































































back to the top
Back to the top
Method 4: Create a VBA macro that loops through all the documents in a folder and changes the old server name with the global template (Normal.dot )
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

The following macro loops through all the documents in a folder and changes the old server name with the global template (Normal.dot ).

Note If a document is password protected in anyway, the template will not be changed and the code will fail.
Sub Test()



Dim strFilePath As String

Dim strPath As String

Dim intCounter As Integer

Dim strFileName As String

Dim OldServer As String

Dim objDoc As Document

Dim objTemplate As Template

Dim dlgTemplate As Dialog

Dim nServer As Integer



'hardcode the name of the old server.



OldServer = "{enter the name of the Old Server}"

nServer = Len(OldServer)

strFilePath = InputBox("What is the folder location that you want to use?")



If Right(strFilePath, 1) <> "\" Then strFilePath = strFilePath & "\"

strFileName = Dir(strFilePath & "*.doc")

Do While strFileName <> ""

Set objDoc = Documents.Open(strFilePath & strFileName)

Set objTemplate = objDoc.AttachedTemplate

Set dlgTemplate = Dialogs(wdDialogToolsTemplates)

strPath = dlgTemplate.Template



If LCase(Left(strPath, nServer)) = LCase(OldServer) Then

objDoc.AttachedTemplate = NormalTemplate

End If



strFileName = Dir()

objDoc.Save

objDoc.Close

Loop



Set objDoc = Nothing

Set objTemplate = Nothing

Set dlgTemplate = Nothing



End Sub


back to the top
Back to the top
Method 5: Rename the server, the share, or the folder to the original name
If the server, the share, or the folder that contains the template was moved or renamed, rename the server, the share, or the folder back to the original name.

If OLD server does not exist anymore, you can create DNS entry with OLD servername. Once you have the OLD servername DNS entry, you can create the same folder structure as listed in template path and copy the template to that folder.

Opera Showing Image as Blurred, Not Clear

Hi all, some of you may get stuck with Opera Browser's strange property, All images shown get blurred
Dont worry here is the Fix

Just turn of Opera Turbo thats all
Uncheck
Tools >> Quick Preference >> Enable Opera Turbo
You can also access the same from the status bar too

Sunday, 31 January 2010

Acer Serial number -> Manufacture date relation ship

Decoding the Serial Number
First 10 digits/chars refer to the part
number of the laptop (ie. model/build type)
Then digit 11 is the build year eg. 6 => 2006
Digits 12 and 13 give the week number of the build

Monday, 18 January 2010

Restoring to Dissimilar Hardware with Acronis Backup & Recovery 10 Universal Restore

You need to use Acronis Universal Restore to recover the system backup of one machine to another one with dissimilar hardware
This article applies to:
  • Acronis Backup & Recovery 10 Advanced Server
  • Acronis Backup & Recovery 10 Server for Windows (Standalone)
  • Acronis Backup & Recovery 10 Advanced Server - Small Business Server Edition
  • Acronis Backup & Recovery 10 Advanced Workstation
  • Acronis Backup & Recovery 10 Workstation (Standalone)
  • Acronis Backup & Recovery 10 Advanced Server - Virtual Edition

Introduction

With Acronis Universal Restore you can recover system backup system of one machine to another one with dissimilar hardware.
For more information see:

Solution

Before restoring the backup to a new computer with dissimilar hardware please ensure the following:
  • You have Acronis Bootable Media with Acronis Universal Restore. See Installing Acronis Backup & Recovery 10 Universal Restore;
  • The backup contains a supported Windows operating system. See Acronis Universal Restore;

  • You have drivers for the hard disk drive controller or chipset drivers for the new computer. These drivers are critical for booting the operating system. You can download the drivers for your motherboard on the Vendor's web-site. Please note, if you downloaded the drivers in *.exe, *.cab, *.zip format, you should extract them first. The driver files should have *.inf, *.sys or *.oem extensions. (!) The product does not support or install plug and play drivers.
Restoring system backup using Acronis Universal Restore:
  1. Boot the target machine from Acronis Bootable CD. (Make sure that the primary boot device is set to CD-ROM in BIOS):
  2. Once loaded, select Acronis Bootable Agent:
  3. Click Run management console (manage this machine):
  4. Click Recover:
  5. Click Change next to Archive:
  6. On the Backup Archive Selection screen choose the backup archive with system partition that you intend to recover:
  7. Enable Advanced view. Make sure that Data type is set to Volumes. Click Change:
  8. On the Backup and Items to Recover Selection screen choose partitions you want to recover:
  9. Click Change next to System C partition to specify the location where you want to recover the partition to. On the Volume Destination screen select the target partition or unallocated space to which the backup will be restored. In this case we are restoring to unallocated space:
  10. On the Volume Parameters window set the type Primary-Active for your system partition. If you do not set the type Active for your system partition, the machine will not boot. Also you can specify the target partition size here:
  11. Universal Restore should be set to Use. Click Change next to Search folder and specify the folder with the drivers for the hard-drive controller of the new computer. This folder may contain both Raid and Chipset drivers, for example. Universal Restore will search this folder (with subfolders) for the appropriate driver automatically:
  12. Click Change in the Mass storage drivers to install anyway section to specify drivers manually:
  13. The recommendation is to specify the drivers manually. Hardware Vendors usually provide separate drivers for SCSI or RAID controllers. IDE or SATA drivers are usually included into the chipset drivers for the motherboard. The HDD controller drivers are critical for operating system booting. Specifying drivers for other devices (video/sound card) is not recommended. Once you restore and boot the system, you can update all other drivers manually through Windows Device Manager (Start -> Run -> devmgmt.msc).
  14. In Recovery options you can also check Change SID after recovery. If this option is enabled, the computer security identifier (SID) will be automatically changed after the restore:
  15. After viewing the summary screen click OK:
  16. The restore process will start:
  17. (!) If Acronis Universal Restore detects unsupported devices (i.e. devices critical for booting, the drivers for which are missing), it will ask for the necessary drivers. To identify the device by its PCI ID, refer to http://pciids.sourceforge.net/pci.ids If the driver is still not accepted, it should be checked if it is the correct one by using a Windows installation CD and hitting F6. See Microsoft Knowledge Base Article 314859. If, after the restore, the machine does not boot correctly, please boot in Safe Mode (hit F8) and check the drivers in Windows Device Manager.

Reference >> http://kb.acronis.com/content/4000

    Saturday, 16 January 2010

    How to Search text within files in Windows Vista


    1. From an Explorer windows, Tap Alt. This should show the hidden menu of the windows vista explorer.
    windows vista explorer hidden menu


    2. On the menu, click Tools >> Folder Options.
    3. On the folder options window, select Search tab.
    4. There are three selectable option for searching: file names only or content or both.
    Windows Explorer Search Option


    5. Choose "Alway Search file names and contents" then click Apply.


    Now just type the text you are looking for on the Search box located at top-right of your windows explorer.

    Ref >> http://www.fryan0911.com/2009/04/how-to-search-text-within-files-in.html

    Tuesday, 12 January 2010

    Hide Unread Email Messages Notification on XP Logon Welcome Screen

    After Windows XP boots up to Welcome Screen or Logon Screen for user to log on to Windows desktop, there may be a message on the Logon Welcome page that user have certain number of unread mail messages, together with the email address of the account. For example, “1 unread email messages”. The unread email messages count also appear when system is locked, and user is required to enter the password to enter the desktop again.

    The count of number of unread messages is generated for each users individually, and normally will be shown after user starts to use Microsoft’s related email clients or services, such as Microsoft Outlook and Windows Live Hotmail. The count takes into account all unread messages from programs like Outlook, Outlook Express, Windows Live Mail, Windows Live Hotmail, and etc, depending on how these programs are used and setup.

    It’s pretty useless and something annoying to display the number of unread mail messages available, especially when it also display user’s email address together. It’s possible to to remove these list and count of unread email messages on the Welcome Screen page with the following tricks.

    The most easy way is to use TweakUI PowerToys, which the TweakUiPowertoySetup.exe setup file can be downloaded from Microsoft Download Center. After installing the TweakUI, run the program, locate and select Logon in the left pane. Then click on Unread Mail. Unselect and uncheck the Show unread mail on Welcome screen option. Users can choose whether to apply the new setting (without unread email count) only to user’s account or for all users on the computer.

    It’s also possible to modify the registry directly to get rid of the unread email messages count on Logon Welcome Screen. To do so, run Registry Editor (regedit.exe), and the navigate to the one of the following registry keys:

    For current logged on user:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\UnreadMail

    For all users on the computer:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\UnreadMail

    On the right pane, find a value data named MessageExpiryDays. If it’s not found, create a new DWORD key named MessageExpiryDays. Set the value of “MessegaExpiryDays” to 0, and save the setting.



    Once disabled, unread emails count notification will no longer be displayed.
    http://www.mydigitallife.info/2008/03/08/hide-unread-email-messages-notification-on-xp-logon-welcome-screen/

    Sunday, 10 January 2010

    Setting Up Perl and CGI For Wamp Server WAMP(P)

    I work on Perl and CGI recently for my college project and so I decided to write a few steps on setting up Perl and CGI with Wamp Server. I hope this might be useful.
    Step1:
    First you need to download Wamp Server from www.wampserver.com and install Wamp Server on your machine. The default installation directory is ‘C:\wamp” and here I am using the default options for installation. To complete the installation you have to set the host name for your mail server and your email address, here you can leave the default option again. That will do no harm.
    The current Wamp Server will install Apache 2.2.11, PHP 5.2.9-2 + PECL, MySQL 5.1.33, SQLitemanager and PhpMyadmin.
    Step2:
    Now you have to download ActivePerl (currently 5.10.0) from www.activestate.com and install it. The default installation directory is “C:\Perl“, but for simplicity and ease of use I use different directory. I create a new folder name “perl” inside “C:\wamp\bin“. So I install Active Perl in “C:\wamp\bin\perl” directory. The next thing you need to do is configure the Apache web server to execute Perl and CGI script.
    Step3:
    This is the most important part here. You need to edit the Apache configuration file. Now go to “C:\wamp\bin\apache\Apache2.2.11\conf” directory and open “httpd.conf” file. Edit the httpd.conf file as below.
    1. Inside httpd.conf, look for the line that says ““, just a few lines below this you’ll find the line that says “Options Indexes FollowSymLinks“. Add “Includes ExecCGI” in the line just next to FollowSymLinks, thus it look like this
    1. Options Indexes FollowSymLinks Includes ExecCGI  
    This will enable CGI script inside your www folder.
    2. Now look for the line “AddHandler cgi-script .cgi“, this line is commented out. You need to enable this by un-comment this line, to do that remove the # character at the beginning of this line. This will add handler for files with .cgi extension. If you want to use .pl file extension in your server add “AddHandler cgi-script .pl” just below the above line. Now you will be able to execute CGI and Perl script with .cgi and .pl, extension.
    Lines to add
    1. AddHandler cgi-script .cgi  
    2. AddHandler cgi-script .pl  
    3. To add directory index file, look for the line “DirectoryIndex index.php index.php3 index.html index.htm“. Add index.cgi and index.pl in this line.
    Lines to add
    1. DirectoryIndex index.php index.php3 index.html index.htm index.cgi index.pl  
    Alternative: If you do not want to waste your time doing the above 3 steps, you can download the edited configuration file httpd.conf here. Replace the one inside your apache directory with this one.
    Step4:
    Your server is now configured and ready to run perl and cgi script. Next thing you might need to do is to configure perl to use mysql database. You need to download and install mysql driver to enable database connection through your perl script. You have to grab the driver from the ActivePerl package repository. However, mysql driver module is not available in the default ActivePerl Package Repository. So, you need to add additional repository and install from that repository. Follow the steps below:
    1. Open command prompt [type cmd in run], then type “ppm repo add uwinnipeg” and press enter.
    perl-ppm-command-line1
    2. After the “uwinnipeg” repository is added successfully, you can install DBD-mysql by typing this command “ppm install DBD-mysql” and hit enter.
    perl-ppm-command-line2
    Note: The ActivePerl default package repository contains DBD-mysqlPP module. If you install that one, you will get an error in your SQL SELECT query and especially when you use the WHERE clause. Your localhost will hang if you run this kind of query with the WHERE clause, so to get it work you need to install the package that I mentioned above only.
    http://www.chromicdesign.com/2009/05/setting-up-perl-for-wampp.html

    For testing purpose , I have given some test codes below :
    you need to create 2 files inside a new folder under www directory of wamp :
    • cgi_form.html
    • backatcha.cgi
    then run the cgi_form.html under wamp server.

    Example file :
    Create a file named cgi_form.html
    
        
            
        
        
            
    
                What is your favorite color?                                
       
    Create a file named backatcha.cgi
    #!C:\wamp\bin\Perl\bin\perl.exe
    
    use 5.010;
    use CGI;
    
    use strict;
    use warnings;
    
    my $q = CGI->new();
    say $q->header(), $q->start_html();
    
    say "
    

    Parameters

    "; for my $param ($q->param()) { my $safe_param = $q->escapeHTML($param); say "$safe_param: "; for my $value ($q->param($param)) { say $q->escapeHTML($value); } say ' '; } say $q->end_html();
    then , run the wamp server ,
    and open the cgi_form.html
    (  for example :   http://localhost/cgi/cgi_form.html )

    cgi_form
    cgi_form

    cgi_result
    cgi_result
    http://zahidrouf.wordpress.com/2009/05/12/setting-perl-and-cgi-in-wamp-server-2-0/