Friday, August 20, 2010

Error - Application popup: wzunzip.exe while using WinZip 14.5 command line in Window service.

Bug :Was not able extract any zip files( WinZip 14.5 ) through Window service application ( which was using WinZip 14.5  command line )

Description: An Information found in Event logger – System as
Application popup: wzunzip.exe - Application Error : The application failed to initialize properly (0xc0000142). Click on OK to terminate the application.

Resolved :
This can be resolved just setting up the property of your application window service as below .


By check – Allow service to interact with desktop , it is said to service allow popup windows but by default service will run in hidden / silent mode . So nothing to worry about the popup .

Using Winzip14.5 command line – wzunzip.exe
Code snippet, I used in my application testing .

 using System;  
 using System.Collections.Generic;  
 using System.Text;  
 using System.IO;  
 namespace UnZipTest  
 {  
   public class UnZip  
   {  
     public void Run (string path,string extractPath){  
       DirectoryInfo dirInfo = new DirectoryInfo(path);  
       System.Diagnostics.Process P = new System.Diagnostics.Process();  
       if(Directory.Exists(extractPath)==false){  
         Directory.CreateDirectory(extractPath);  
       }  
       string UnZipCmd = null;  
       foreach(FileInfo fl in dirInfo.GetFiles("*.zip")){  
         try  
         {  
           string password = "123";  
           string zipExtract = extractPath + "\\" + fl.Name + "_" + Guid.NewGuid().ToString().Substring(0, 4);  
           if (password.Trim().Length == 0)  
           {  
             UnZipCmd = string.Format("-o \"{0}\" \"{1}\"", fl.FullName, zipExtract);  
             P = System.Diagnostics.Process.Start(@"C:\Program Files\WinZip\wzunzip", UnZipCmd);  
           }  
           else{  
             UnZipCmd = string.Format("-s\"{0}\" -o \"{1}\" \"{2}\"",password, fl.FullName, zipExtract);  
             P = System.Diagnostics.Process.Start(@"C:\Program Files\WinZip\wzunzip", UnZipCmd);  
           }  
           P.WaitForExit();  
         }  
         catch (Exception ex){  
           throw ex;  
         }  
       }  
     }  
   }  
 }  

Thursday, August 19, 2010

Speed Test Details

 

 

http://testinternetspeed.org/

 

 

 

Kilobit per second

A kilobit per second (kbit/s or kb/s or kbps) is a unit of data transfer rate equal to:

[edit] Megabit per second

A megabit per second (Mbit/s or Mb/s or Mbps; not to be confused with mbit/s which means, literally, millibit per second) is a unit of data transfer rate equal to:

[edit] Gigabit per second

A gigabit per second (Gbit/s or Gb/s or Gbps) is a unit of data transfer rate equal to:

 

Monday, August 16, 2010

"upper" in case of schema.ini / oledb / excel sheet query

In case of querying with the Schema.ini / oledb / excel sheet query  and u need to apply a check based on upper case then you need to declare like this.

 

UCASE(RTRIM(LTRIM((C.NAME)))) = UCASE(RTRIM(LTRIM((A.NAME))))

 

For lower case use this-  LCASE.

 

 

 

 

Monday, August 9, 2010

Create or Delete A Service in Windows XP


Create or Delete A Service in Windows XP

Services are added from the Command Prompt. You need to know the actual service name as opposed to what Microsoft calls the Display Name. For example, if you wanted to create or delete the Help and Support service, the name used at the Command Prompt would be "helpsvc" rather than the Display Name of "Help and Support". The actual service name can be obtained by typing services.msc in Run on the Start Menu and then double clicking the Display Name of the service. Once you know the name;

To Create A Service

  • Start | Run and type cmd in the Open: line. Click OK.
  • Type: sc create <service name>
  • Reboot the system



To Delete A Service

  • Start | Run and type cmd in the Open: line. Click OK.
  • Type: sc delete <service name>
  • Reboot the system




If you prefer to work in the registry rather than through the command prompt to delete services;

  • Click Start | Run and type regedit in the Open: line. Click OK.
  • Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
  • Scroll down the left pane, locate the service name, right click it and select Delete.
  • Reboot the system

 

Code Formater

Paste Here Your Source Code
Source Code Formatting Options
1) Convert Tab into Space :
2) Need Line Code Numbering :
3) Remove blank lines :
4) Embeded styles / Stylesheet :
5) Code Block Width :
6) Code Block Height :
7) Alternative Background :
Copy Formatted Source Code
 
Preview Of Formatted Code