Monday, April 12, 2010

Delete Registry key using Install Script

Delete Registry key using Install Script.

Here is the function you can use to delete a registry key in InstallShield project.

function DeleteRegisrtyKey(szKey)

STRING szClass;





WriteLog("Trying to delete registry value for "+szKey);

szClass = "FPClass";

if (RegDBKeyExist(szKey) < 0) then

WriteLog(szKey +" can not be located in the registry. Deletion failed.");

MessageBox("Unable to delete the registry "+szKey,INFORMATION);


if (RegDBDeleteKey (szKey) < 0) then

WriteLog("Failed to delete the Registry.");


WriteLog("Registry successfully deleted.");




WriteErrorLog("Exception during deleting the registry key. The key is: "+szKey);



Monday, April 5, 2010

SQL Server 2005 VS SQL Server 2008

New Features in SQL Server 2005:
1. It included native support for managing XML data, in addition to relational data.For this purpose, it defined an xml data type that could be used either as a data type in database columns or as literals in queries.
2. XML columns can be associated with XSD schemas; XML data being stored is verified against the schema. XML is converted to an internal binary data type before being stored in the database. Specialized indexing methods were made available for XML data. XML data is queried using XQuery; SQL Server 2005 added some extensions to the T-SQL language to allow embedding XQuery queries in T-SQL. In addition, it also defines a new extension to XQuery, called XML DML, that allows query-based modifications to XML data.
3. SQL Server 2005 also allows a database server to be exposed over web services using TDS packets encapsulated within SOAP (protocol) requests. When the data is accessed over web services, results are returned as XML.
4. For relational data, T-SQL has been augmented with error handling features (try/catch) and support for recursive queries (Common Table Expressions).
5. SQL Server 2005 has also been enhanced with new indexing algorithms and better error recovery systems. Data pages are checksummed for better error resiliency, and optimistic concurrency support has been added for better performance.
6. Permissions and access control have been made more granular and the query processor handles concurrent execution of queries in a more efficient way.
7. Partitions on tables and indexes are supported natively, so scaling out a database onto a cluster is easier.
8. SQL CLR was introduced with SQL Server 2005 to let it integrate with the .NET Framework.
9. SQL Server 2005 introduced "MARS" (Multiple Active Results Sets), a method of allowing usage of database connections for multiple purposes.

New Features in SQL Server 2008:
1. The current version of SQL Server, SQL Server 2008,[4] (code-named "Katmai",[5]) was released (RTM) on August 6, 2008[6] and aims to make data management self-tuning, self organizing, and self maintaining with the development of SQL Server Always On technologies, to provide near-zero downtime.
2. SQL Server 2008 also includes support for structured and semi-structured data, including digital media formats for pictures, audio, video and other multimedia data. In current versions, such multimedia data can be stored as BLOBs (binary large objects), but they are generic bitstreams.
3. Other new data types include specialized date and time types and a Spatial data type for location-dependent data.
4. Better support for unstructured and semi-structured data is provided using the new FILESTREAM[8] data type, which can be used to reference any file stored on the file system.
5. Structured data and metadata about the file is stored in SQL Server database, whereas the unstructured component is stored in the file system. Such files can be accessed both via Win32 file handling APIs as well as via SQL Server using T-SQL; doing the latter accesses the file data as a BLOB.
6. Backing up and restoring the database backs up or restores the referenced files as well.
7. SQL Server 2008 also natively supports hierarchical data, and includes T-SQL constructs to directly deal with them, without using recursive queries.
8. The Full-Text Search functionality has been integrated with the database engine, which simplifies management and improves performance.
9. Spatial data will be stored in two types. A "Flat Earth" (GEOMETRY or planar) data type represents geospatial data which has been projected from its native, spherical, coordinate system into a plane. A "Round Earth" data type (GEOGRAPHY) uses an ellipsoidal model in which the Earth is defined as a single continuous entity which does not suffer from the singularities such as the international dateline, poles, or map projection zone "edges". Approximately 70 methods are available to represent spatial operations for the Open Geospatial Consortium Simple Features for SQL, Version 1.1
10. SQL Server includes better compression features, which also helps in improving scalability.
11. It also includes Resource Governor that allows reserving resources for certain users or workflows.
12. It also includes capabilities for transparent encryption of data as well as compression of backups.
13. SQL Server 2008 supports the ADO.NET Entity Framework and the reporting tools, replication, and data definition will be built around the Entity Data Model.
14. On the management side, SQL Server 2008 includes the Declarative Management Framework which allows configuring policies and constraints, on the entire database or certain tables, declaratively.
15. The version of SQL Server Management Studio included with SQL Server 2008 supports IntelliSense for SQL queries against a SQL Server 2008 Database Engine
16. SQL Server 2008 also makes the databases available via Windows PowerShell providers and management functionality available as Cmdlets, so that the server and all the running instances can be managed from Windows PowerShell.

Monday, March 22, 2010

Registry key contain last few “Run” command

Today I came across a very interesting registry key which I wanna share. If you go to your "Start" menu and open the "Run" dialog from there, you will see a dropdown list labeled as "Open". This list contains the last few entries you wrote there [probably last 26 entry is its limit]. This list populated from the following registry key


Lets try yourself, and you know you can make some funny staff from there.

Have fun coding, take care.


Sunday, March 7, 2010

Compatibility issue on IE7 and IE8

If you want to make your site compatible with both IE7 and IE8 together, then just add this meta tag in your site. It will solve your problem.

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>

Monday, February 15, 2010

Check if a String contains a substring using InstallScript

Check if a String contains a substring.

If you want to check whether a string contains a specific substring or not, it's quite easy in .net or Java or any other OO language. But when it comes to InstallScript it's not that straight forward. In spent little time on InstallShield help but could not manage anything usual. And then finally google help me to reach some example on that. Here is a function I wrote to use in my project:

prototype BOOL IsStringContains(STRING,STRING);

function BOOL IsStringContains(szSource, szArgs)

BOOL bIsContains;


if(szSource % szArgs) then

bIsContains = TRUE;


bIsContains = FALSE;


return bIsContains;


And then I use this call this function like this:

if(IsStringContains("This is Zakirul","Zakirul")) then

MessageBox("String match found.", INFORMATION);


MessageBox("String doesn't found",INFORMATION);


Hope this will help you.