Deleting EXE Files in Windows 7 : Resolved

If you are working with Windows 7, you must face below mentioned problems while deleting .exe files.

  1. Like if you delete an exe file directly then it disappears and seems like deleted, but when you refresh the folder by pressing F5 then it appears again.
  2. You are deleting a folder and that folder is not getting delete as there is an exe file inside that folder.

Initially I thought of that there is a virus in the system but after scanning the whole system 2-3 times with different antivirus program, I found that there is no such virus in the system. So what’s the root cause of this problem?

I thought that, might be these exe are running somewhere but after checking task manager I couldn’t found anything specific. So I conclude that here must be some service that is locking the application and service is not necessarily using these exe but just holding them. So I opened service console to examine same. After checking Services console I found that there is a service ‘Application Experience‘ that is responsible to process application compatibility cache requests for applications as they are launched was DISABLED. I simply enabled this service and start the service. And now I can delete exe files and folders smoothly.

Till now i tested this only on Windows 7 OS but it should work on VISTA and related windows os.

Cheers !

Advertisements

Installing assembly in GAC in Windows Server 2008 : Resolved

I developed an event handler and need to deploy it on production server. My production server is built on Windows 2008 Enterprise Server 64 Bit and there was only one installation on server i.e. SharePoint Server 2010. Now I need to install my assembly in to GAC. I copied my .dll to production server. Then I opened c:\windows\assembly and drag drops my assembly in to GAC (c:\windows\assembly folder). But nothing happened and my assembly couldn’t install in GAC 😦

Drag and drop was not working. So second alternative was to use gautil.exe to install the assembly inside GAC but as it was production server so there wasn’t any installation of visual studio and hence there was no SDK installed therefore there wasn’t such exe like gacutil.exe. Again that was a problem. Now I worked on why drag and drop is not working. I searched here and there and follow some articles but nothing helped me. I disable UAC and restart server but it doesn’t work. I opened console and explorer using run as administrator but nothing helped me. Then I copied gacutil.exe file from my development machine to production server but I couldn’t run it (Though lastly this technique worked for me).So finally I resolved this issue and below are the directions for how to resolve this?

1. First check that if production server is of 32 bit or 64 bit?

2. If it is 64 bit then open folder “C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64

But if it is 32 bit then open folder “C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin

3. Copy 2 files i.e. gacutil.exe & gacutil.exe.config

4. Paste these files to any location of production server.

5. Your gacutil.exe is now ready to run and u can install assembly in to GAC using this small utility.

 Points to Remember

* When you drag and drop assembly in GAC it won’t give proper error messages (Like targeting framework error) if it has any so better to use gacutil to install assembly.

* gacutil.exe doesn’t run standalone rather it needs a configuration file to run i.e. gacutil.exe.config

Resolved: COM DLL is not showing in COM Library after Registering on Windows Server 2008 x64

Well I had to implement a payment gateway at my server. My server was built on x64 architecture and had Windows Server 2008 installed. Well according to the document I had to put my COM dll inside c:\windows\system32 folder and then from Run command I had to register this dll like “regsvr32 c:\windows\system32\MyCOM.dll”.

Well I done above mentioned procedure successfully now I want to use this dll in my C# project so I create a project and go for add reference but even after successful registration my COM dll was not showing inside COM tab. I tried all possible way to add reference of this dll without any luck. I tried un-register, register as well as browsing this dll to add reference but nothing could help out me. So after doing some goggling and research I came to know that in x64 architecture there is a folder inside “c:\windows\” i.e. SysWOW64. This folder is specially designed for old 32 bit programs. Well if you are registering the old 32 bit COM dll or other 32 program then you should put the dll inside SysWOW64 folder and then register them from that location it will then use RegSvr32.exe of SysWOW64 folder for normal 64 bit dlls and other 64 bit programs u should put dlls inside System32 folder and run RegSvr32.exe from System32 folder.

Get HTML of a web page using C#.NET

Below i am using a function that takes a web page full url as string and return back HTML of that page as string. You can
use this returned HTML in your code as per your requirement.

Step 1:
First import 2 namespaces that are required by this function to work.

using System.IO;
using System.Net;

Step 2:
Copy & Paste this function in your code behind.

public string GetHTML(string strURL)
{
HttpWebRequest wbrq = (HttpWebRequest)WebRequest.Create(strURL);
wbrq.Method = “GET”;
HttpWebResponse wbrs = (HttpWebResponse)wbrq.GetResponse();
StreamReader sr = new StreamReader(wbrs.GetResponseStream());
strResult = sr.ReadToEnd();
sr.Close();
return strResult;
}

Step 3:
Call this function as per your requirement.

string strHtml=this.GetHTML(“http://www.google.com”);

Happy Programming 🙂

Microsoft Updation Terminology

If you work in windows environment then you must heard about some terminology like Patch, Hotfix, Service pack etc.
They all are different concepts and terms, so what they mean exactly ? Below i am sharing these concepts and terms with you.

Hotfix
A single cumulative package composed of one or more files used to address a problem in a product. Hotfixes address a specific customer situation and may not be distributed outside that customer organization.

Public update
A public update is usually a security-related hotfix that is released publically and is available for download.  The Windows update configuration can identify these updates and install them automatically. You link to public updates from security bulletins. Typically, these hotfixes are released as required. Service packs are another example of a public update.

Service pack
A tested, cumulative set of all hotfixes, security updates, critical updates and updates, as well as additional fixes for problems found internally since the release of the product. Service packs can also contain a limited number of customer-requested design changes or features.

Scheduled delivery model
Microsoft Office is moving away from the current priority-driven hotfix release model to a scheduled delivery model. In the scheduled delivery model, hotfixes are released every two months. This schedule creates more predictability for customers. Customers who need an emergency fix can request a shorter turnaround time for a hotfix.

The following delivery mechanisms support this new approach.

  • cumulative update (CU)
  • critical on-demand (COD) hotfix

Cumulative update
A collection of hotfixes released every two months. A cumulative update (CU) rolls up previously released hotfixes and cumulative updates. A CU is sometimes called an update rollup.

Available hotfixes include the following:

*Fixes for issues that meet hotfix acceptance criteria. These criteria include workaround availability, effect on customers, reproducibility, and the complexity of the code that must be changed.
*Any critical on-demand hotfixes that are currently released.
*Any critical security or non-security updates that are currently released.

Critical on-demand (COD) hotfix

A critical on-demand (COD) hotfix is available to address critical problems that cannot be handled via the cumulative update delivery cycle. COD fixes are limited to emergency situations, for example, one in which the issue is blocking normal business operations for the customer, and/or for which there is no effective workaround. Critical on-demand (COD) hotfixes are included in the next cumulative update that is released.

*COD releases have the versioning pattern 12.0.xxxx.500X. An example is a CU released with the version 12.0.6327.5000, with a COD hotfix subsequently required. In this example, the version of the COD hotfix is 12.0.6327.5001. If additional hotfixes are required before the next CU, the next version number is 12.0.6327.5002, and so on until the next CU is released.

Package
The downloaded item, an executable (.exe) file that is downloaded for a update rollup or hotfix. A package can contain one or more patches. Depending on the download mechanism that is provided, this executable file might be wrapped inside another password-protected executable file. After you extract the package, you have one or more .exe files that use a Knowledge Base (KB) number as part of its name; for example, Webfldrs-KB907306-ENU.exe. In this example, most customers run the Webfldrs-KB907306-ENU.exe executable file when they update their SharePoint servers.

Patch
Patches are stored inside packages. The patches run Windows Installer program (msiexec.exe) to update the original installation packages (which have the .msi file name extension) with new information or binaries. Patches that are installed by the Windows Installer program have the .msp file name extension.

Localized patch
A localized patch, or local patch, contains updates to language-specific strings or related code.

Global patch
A global patch is language-agnostic and can be applied to any server regardless of the base installation language or whether language packs are installed. Most software updates are delivered by means of global patches.

Upgrader
An upgrader is a specific piece of the product that evaluates the current state of related objects and possibly alters them to match newer schema, enable new functionality, or correct known issues.

Resolved:Windows Explorer has encountered a problem and needs to close We are sorry to inconvenience?

From past few weeks whenever i opened Mozilla Fire Fox in my system (it can be any other program in your case), i encountered this annoying error . Find below the steps that how i resolved this issue.

1. Click on Start button.

2. Click on Run.

3. In Run window copy/paste text marked in red without quotes “regsvr32 /u shmedia.dll” and click ok.

4. A message box with succeeded message will display. Click ok.

5. You are done..

Now whenever you will open the problematic thing ( in my case Mozilla fire fox). This annoying error will not bother you any more. 🙂

Non Windows Updates

Have you missed any updates? Check out the month by month and by year boxes from Nov. 2005 to Dec. 2009

http://technet.microsoft.com/en-us/wsus/bb456965.aspx

Displayed by past months, this page lists all new, revised, and re released updates for Microsoft products *other* than Windows (for example, Microsoft Office).

Get up to date and check ’em out now!