Removing Components After Installation in .NET framework

Print Data Matrix ECC200 in .NET framework Removing Components After Installation

Removing Components After Installation
Drawing Data Matrix ECC200 In VS .NET
Using Barcode creation for ASP.NET Control to generate, create DataMatrix image in ASP.NET applications.
www.OnBarcode.com
Encode Barcode In .NET
Using Barcode printer for ASP.NET Control to generate, create bar code image in ASP.NET applications.
www.OnBarcode.com
The first option I gave you enables you to prevent the Windows XP setup program from installing components during installation. The second option enables you to expose additional components in Windows Components Wizard. This last option is for scenarios in which you want to remove a component without exposing it in Windows Components Wizard. This is also useful when you want to script the removal so that you don't have to visit the desktop. The first step is to find the component's INF file in %SYSTEMROOT%\Inf. Remember that this is a super hidden folder, and I gave you instructions for showing it earlier in this chapter. The easiest way to find the component's INF file is to use Search Assistant. Look for all files with the .inf extension that contain the name of the component. For example, to find the INF file for Windows Messenger, search for all files with the .inf extension in %SYSTEMROOT%\Inf that contain Windows Messenger. You should come up with the file Msmsgs.inf as shown in Figure 15 3. Then look in the file for a section with the words remove or uninstall in it. In this case, the section is called [BLC.Remove]. Then execute the following command, whether in a script or in the Run dialog box, where Filename.inf is the name of the INF file and Section is the name of the uninstall section:
Draw DataMatrix In C#
Using Barcode drawer for .NET Control to generate, create DataMatrix image in .NET applications.
www.OnBarcode.com
DataMatrix Creation In Visual Studio .NET
Using Barcode generator for .NET framework Control to generate, create Data Matrix image in .NET framework applications.
www.OnBarcode.com
rundll32 advpack.dll,LaunchINFSection %systemroot%\Inf\Filename.inf,Section
Encode DataMatrix In VB.NET
Using Barcode generation for VS .NET Control to generate, create Data Matrix ECC200 image in Visual Studio .NET applications.
www.OnBarcode.com
Encode DataMatrix In Visual Studio .NET
Using Barcode maker for ASP.NET Control to generate, create ECC200 image in ASP.NET applications.
www.OnBarcode.com
Figure 15 3: Search the %SYSTEMROOT%\Inf folder for all files with the .inf extension that contain the name of the component you want to remove. Thus, to remove Windows Messenger, run the command:
Painting QR-Code In VS .NET
Using Barcode generation for ASP.NET Control to generate, create QR Code ISO/IEC18004 image in ASP.NET applications.
www.OnBarcode.com
Draw PDF-417 2d Barcode In Visual Studio .NET
Using Barcode drawer for ASP.NET Control to generate, create PDF 417 image in ASP.NET applications.
www.OnBarcode.com
rundll32 advpack.dll,LaunchINFSection %systemroot%\Inf\Msmsgs.inf,BLC.Remove.
Creating Matrix 2D Barcode In .NET
Using Barcode generation for ASP.NET Control to generate, create Matrix Barcode image in ASP.NET applications.
www.OnBarcode.com
Draw Code-128 In .NET Framework
Using Barcode encoder for ASP.NET Control to generate, create Code-128 image in ASP.NET applications.
www.OnBarcode.com
Alas, many components don't have uninstall sections in their INF files, and that leaves you looking for other ways to remove them. You can use this method for many device drivers, programs, and components that do provide INF files, though.
Barcode Encoder In .NET Framework
Using Barcode printer for ASP.NET Control to generate, create bar code image in ASP.NET applications.
www.OnBarcode.com
EAN - 14 Creator In .NET Framework
Using Barcode maker for ASP.NET Control to generate, create UPC Case Code image in ASP.NET applications.
www.OnBarcode.com
Hiding Non Removable Components
QR-Code Creation In Objective-C
Using Barcode maker for iPhone Control to generate, create Denso QR Bar Code image in iPhone applications.
www.OnBarcode.com
Draw Code 128 Code Set C In Java
Using Barcode drawer for Java Control to generate, create Code-128 image in Java applications.
www.OnBarcode.com
None of the methods I've shown will help you get rid of some components, including Tour Windows XP, Movie Maker, Outlook Express, and Files And Settings Transfer Wizard, which is what started me on this rampage in the first place. To prevent users from accessing these applications, you're going to have to get creative. Tour Windows XP is easy to hide, if not get rid of altogether. Create a new subkey in HKLM\Software\Microsoft\Windows \CurrentVersion\Applets\Tour called Tour. Then create the REG_DWORD value RunCount and set it to 0x00. Do this on your disk images so that users aren't accosted by Tour Windows XP the first time they log on to the operating system; they can run the tour from the Start menu. The remaining bits aren't as easy. You can't just remove the program files because Windows File Protection immediately restores them. You could disable Windows File Protection, but I don't recommend doing so because it protects users' configurations from accidents and misbehaved applications that like to replace files they have no business replacing. Instead, on your disk images, hide the shortcuts, and use Software Restriction Policies to prevent users from running the programs by opening the program files: 1. Prevent Windows XP from creating new shortcuts by removing the appropriate StubPath values from HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components. See the section "Controlling Just in Time Setup," earlier in this chapter, for more information. 2. Hide existing shortcuts to the program (do this on your disk images): Search %SYSTEMDRIVE%\Documents and Settings\All Users for shortcuts to the program, and remove them. Search %SYSTEMDRIVE%\Documents and Settings\Default User for shortcuts to the program, and remove them. Search the Default User folder in \\Server\NETLOGON\Default User share for the program's shortcuts, and remove them. 3. Create a new Group Policy object (GPO) in Active Directory or locally on your disk images that prevents users from running the program. That last step requires more explanation. 6, "Using Registry Based Policy," contains more information about Group Policy, but I'll get you started. The following instructions assume that you're defining Software Restriction Policies in the local GPO, but the steps transfer to network based Group Policy: 1. In Group Policy Editor's left pane, click Software Restriction Policies. To start Group Policy Editor, type gpedit.msc in the Run dialog box. Software Restriction Policies is under Computer Configuration\Windows Settings \Security Settings. 2. Right click Software Restriction Policies, and then click Create New Policies. 3. Under Software Restrictions Policies, right click Additional Rules, and then click New Hash Rule. 4. Click Browse, and select the file that you want to prevent users from executing. For example to prevent users from running Files And Settings Migration Wizard, select %SYSTEMROOT%\system32\usmt\migwiz.exe.
Read Code 39 Full ASCII In None
Using Barcode reader for Software Control to read, scan read, scan image in Software applications.
www.OnBarcode.com
Drawing EAN13 In Visual Studio .NET
Using Barcode creation for .NET Control to generate, create European Article Number 13 image in .NET applications.
www.OnBarcode.com
After you select the file that you want to prevent users from running, Group Policy Editor creates a hash for the file. Figure 15 4 shows an example that prevents users from running Files And Settings Transfer Wizard. Users won't be able to run any program that matches that hash value. That way, users can't trick the system by copying the file to a different location (clever). After you save the policy, you must log off of Windows XP for the change to take affect. When users try to run the program, they see an error message that says, Windows cannot open this program because it has been prevented by a software restriction policy. So between hiding the advertisements and preventing the program file from executing, you can prevent programs such as Movie Maker and Files And Settings Transfer Wizard from distracting users.
Create PDF 417 In None
Using Barcode encoder for Software Control to generate, create PDF 417 image in Software applications.
www.OnBarcode.com
Create UCC-128 In .NET
Using Barcode creator for VS .NET Control to generate, create EAN / UCC - 13 image in Visual Studio .NET applications.
www.OnBarcode.com
Figure 15 4: Without a Files And Settings Transfer Wizard shortcut on the Start menu, users will not usually try to run the wizard. Those who do will see an error message.
Create PDF 417 In Java
Using Barcode generation for Eclipse BIRT Control to generate, create PDF417 image in BIRT applications.
www.OnBarcode.com
Draw Barcode In Java
Using Barcode generator for BIRT reports Control to generate, create barcode image in Eclipse BIRT applications.
www.OnBarcode.com
Copyright © OnBarcode.com . All rights reserved.