Your best source of information and news about hardware, hardware and Vista hardware on the internet

Vista ARTICLES TOP 50 Spyware Virus Vista SOFT Vista HELP

registry

You are currently browsing the articles from MS Windows Vista Compatible Software matching the category registry.

Marketplace Client, Your Applications, and Registry Keys

marketplaceSmall The Windows Marketplace for Mobile is off to a great start since its release October 6th. One issue that has tripped up a few developers submitting their applications has been the use of internal registry keys used to determine the location of the application. Some clever developers have discovered that there is a list of installed applications stored in the registry under: HKEY_LOCAL_MACHINE\Software\Apps. Under the application name, you will find the directory in which the application has been installed. For example:

HKEY_LOCAL_MACHINE\Software\Apps\Company Application Name
InstallDir=”\Program Files\Application Name”

a similar list can be found here:

[HKEY_LOCAL_MACHINE\Security\AppInstall\Company Application Name]
InstallDir=”\Program Files\Application Name”

Since Windows Mobile does not support the concept of a current working directory, this has been one way to determine where the EXE is running from. A better approach, that is not dependant on these registry keys,  uses the following code (See Chistec’s blog post):

GetModuleFileName(GetModuleHandle(NULL), pszFullPath, MAX_PATH); 

For managed code (See Chistec’s blog post):

using System.Reflection;
private string GetApplicationExe()
{
  // Determine the full path to the application executable
  return Assembly.GetExecutingAssembly().GetName().CodeBase;
}

You can then parse out the application path from the returned file name.

So what is wrong with using these undocumented registry keys? When your application is installed by the Marketplace client, it creates these registry keys, but not with the names you would expect. Therefore, if your application is relying on any of these keys, if will fail to find them, because they will not exist.  This has tripped up a few developers because this issue does not surface unless you install the application after it has gone through the Marketplace ingestion process. (The processing of your application after it has passed certification testing.)

To summarize, if you need to get the directory in which it was your application was installed, use either the native or managed APIs above. Also, make sure you are not using either of these undocumented registry keys.

Thanks,

Mike

Written by Mike Francis on October 12th, 2009 with no comments.
Read more articles on windowsmobile and marketplace and registry and otherSoftware.

Sovle “windows cannot find rundll32.exe” when access Control Panel Item


When  trying  to change the display settings or access the control panel items, you will get a Windows  error message say “Windows cannot find’ C\Windows\System32\rundll32.exe’. Make sure you typed the name correctly,  and then try again. To search for a file, click the Start Button, and then click Search. “

Read full post …


Posted in Registry Tagged: ??????????, Best PC Tips, computer, windows error

Written by Myhouse on October 5th, 2009 with no comments.
Read more articles on windows error and ?????????? and Best PC Tips and registry and computer and otherSoftware and Computer.

Set DHCP and Static IP in Windows Registry


Configure your computer to use DHCP

  1. Right-click My Network Places and choose Properties.
  2. On the NIC that is (usually) labeled as Local Area Connection – right-click and choose Properties.

  1. Select TCP/IP (make sure you don’t remove the check mark accidentally) and press the Properties button.

  1. Make sure you have “Obtain Automatically” selected.

  1. You can verify your settings by running ipconfig /all at a Command Prompt:

  1. Ok all the way out.

Add a second (or third and so on), static, IP address

  1. Click Start and choose Run. Enter Regedit and press Enter.

Note: On Windows 2000 and NT you need to run Regedt32 instead.

  1. Navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSetServices\Tcpip\Parameters\Interfaces\{B003AD4A-B6DB-44FD-9741-CBA3C51B6498}
// <![CDATA[
if (!window.netshel_ord) { netshel_ord=Math.random()*10000000000000000;
}
if (!window.netshel_tile) { netshel_tile=1; }
document.write('');
netshel_tile++;
// ]]>
//

(actual GUID of the NIC may vary, select the one that represents your own NIC (from step 2 above)

  1. Select the IPAddress key and double click it.
  2. In the Edit Multi String dialog box enter a second (and third and so on) IP address. Make sure you enter each IP on a separate line. Click Ok.

  1. Select the SubnetMask key and double click it.
  2. In the Edit Multi String dialog box enter a second (and third and so on) Subnet Mask. Make sure you enter each Subnet Mask on a separate line. Click Ok.

  1. Close the registry editor.
  2. Go back to your network properties, right-click your NIC and select Disable.

  1. Right-click your NIC and select Enable.

  1. Verify your settings by running ipconfig /all at a Command Prompt:

Done!

Windows 98 users: This trick can also be accomplished with Windows 98, only there you need to modify the following registry path (instead of the one in step 2 above):

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class'\etTrans

In Windows 98 you’ll also need to reboot your computer for the trick to work.

Source

Posted in How To Tagged: ????????????????, How To, networking, PC Tips, Registry

Written by Myhouse on June 3rd, 2009 with no comments.
Read more articles on PC Tips and ???????????????? and registry and otherSoftware and how to and Networking.

In Vista, How Does the FLAGS Switch of REG.EXE Work?

Note: this content originally from http://mygreenpaste.blogspot.com. If you are reading it from some other site, please take the time to visit My Green Paste, Inc. Thank you.


A while back, there was a topic (Virtual Registry vs. "Real registry") in the Sysinternals Forums that brought up the question of how to set the virtualization-related flags of a registry key programmatically in Vista, rather than through the use of the REG.EXE tool's FLAGS switch. (For more information on the flags, see Mark Russinovich's article in TechNet Magazine, "Inside Windows Vista User Account Control"). Even before that topic in the forum, I had wondered how it was done but had not had a chance to explore. It didn't seem that many others were curious about it. That topic had resurrected the idea, but it quickly fell to the bottom of the list. I've finally gotten around to experimenting, and that leads to this write-up. I still don't see much in the way of this discussed anywhere, by searching for terms involved (data types, function param names, etc.), so hopefully this will help someone. (Keep in mind that there very well may be a reason Microsoft hasn't made this available through another, more direct API.)


In the referenced topic, I had gotten so far as determining that REG.EXE was doing its work through the use of NtSetInformationKey, an "undocumented" API in NTDLL.DLL.


NTSYSAPI 

NTSTATUS

NTAPI

NtSetInformationKey(

IN HANDLE KeyHandle,

IN KEY_SET_INFORMATION_CLASS InformationClass,

IN PVOID KeyInformationData,

IN ULONG DataLength );


After a bit of plonking around in WinDbg, I've come up with the following following details. REG.EXE calls NtSetInformationKey, specifying a value of 2 for the InformationClass parameter. This parameter is of type KEY_SET_INFORMATION_CLASS, which wdm.h tells us is an enum:


typedef enum _KEY_SET_INFORMATION_CLASS {

KeyWriteTimeInformation,

KeyWow64FlagsInformation,

KeyControlFlagsInformation,

KeySetVirtualizationInformation,

KeySetDebugInformation,

MaxKeySetInfoClass // MaxKeySetInfoClass should always be the last enum

} KEY_SET_INFORMATION_CLASS;


So the 2 for the InformationClass parameter would correspond to KeyControlFlagsInformation. WDM.H also suggests that this class has a type that one passes for the KeyInformationData parameter - KEY_CONTROL_FLAGS_INFORMATION:


typedef struct _KEY_CONTROL_FLAGS_INFORMATION {

ULONG ControlFlags;

} KEY_CONTROL_FLAGS_INFORMATION, *PKEY_CONTROL_FLAGS_INFORMATION;


We have a basic idea of how to call NtSetInformationKey now. But what are the values that the ControlFlags member of KEY_CONTROL_FLAGS_INFORMATION can be set to? It would appear that the following (self-made) enum covers the pertinent flags - at least the ones REG.EXE FLAGS can handle (there may be more):


typedef enum _CONTROL_FLAGS {

RegKeyClearFlags = 0,

RegKeyDontVirtualize = 2,

RegKeyDontSilentFail = 4,

RegKeyRecurseFlag = 8

} CONTROL_FLAGS;


The control flags are a bitmask, so you can OR them to set more than one.


Now that we have this information, what's left? We need to put it all together in a call to NtSetInformationKey. So, we need to get a pointer to the function in NTDLL.DLL. Then, we can declare a struct of type KEY_CONTROL_FLAGS_INFORMATION, set the ControlFlags member to be what we wish, and open a key to the desired location in the registry, that can be passed to NtSetInformationKey. In the end, we wind up with something like the following (error handling has been omitted):


typedef NTSYSAPI NTSTATUS (NTAPI* FuncNtSetInformationKey) (

HANDLE KeyHandle,

KEY_SET_INFORMATION_CLASS InformationClass,

PVOID KeyInformationData,

ULONG DataLength );

//...

FuncNtSetInformationKey ntsik = (FuncNtSetInformationKey)GetProcAddress(

GetModuleHandle( _T("ntdll.dll") ), "NtSetInformationKey" );

KEY_CONTROL_FLAGS_INFORMATION kcfi = {0};

kcfi.ControlFlags = RegKeyDontVirtualize | RegKeyRecurseFlag;

HKEY hTheKey = NULL;

RegOpenKeyEx( HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Whatever"), 0, KEY_ALL_ACCESS, &hTheKey );

ntsik( hTheKey, KeyControlFlagsInformation, &kcfi, sizeof( KEY_CONTROL_FLAGS_INFORMATION ) );

RegCloseKey( hTheKey );

hTheKey = NULL;



The code above is the equivalent of invoking REG.EXE FLAGS HKLM\Software\Whatever SET DONT_VIRTUALIZE RECURSE_FLAGS. To clear the flags, just set kcfi.ControlFlags to RegKeyClearFlags (same as REG.EXE FLAGS HKLM\Software\Whatever SET).

Hopefully, this will prove useful to those that have wished to set these flags programmatically. In a future post, I hope to explore querying for these flags, ala REG.EXE FLAGS HKLM\Software\Whatever QUERY.


Note that this exploration was done on Windows Vista SP1. I would expect the content here to also apply to Windows Vista (no SP) as well as Windows Server 2008, but...

Written by «/\/\Ø|ö±ò\/»®© on April 27th, 2008 with no comments.
Read more articles on flags and NtSetInformationKey and REG_KEY_DONT_VIRTUALIZE and Sysinternals Forum and reg.exe flags and registry virtualization and reg and REG_KEY_DONT_SILENT_FAIL and Troubleshooting and vista and windbg and otherSoftware and registry and Virtualization.

Guest article: Computer Error Basics

This is the first guest article here at Bloody Computer! It was written by James Ricketts from Instant Registry Fixes. I hope you enjoy it and find it useful. K


Windows errors can occur at any time due to several reasons. Most of the time, these errors leave us helpless and may even cause us to lose important data and spend large amounts of money on expensive computer repairs.

We end up going through a lot of trouble, when in fact, there are some very simple steps that can easily help prevent these problems from happening in the first place. The top two causes of computer errors are malware and registry errors. Let’s take a look at some of the methods to deal with these problems and fix computer errors.

Keep Your Computer Malware Free

To keep your computer free of errors and other problems, it is essential for all PC users to have anti malware tools installed on their PCs. Primarily, there are three tools that are crucial for all PC users—Anti-virus, Anti-spyware, and Anti-spam.

Antivirus tools help you keep your PC free from malicious programs such as Virus, Trojans, worms, and backdoors. Antispyware tools help prevent and remove spyware and adware programs that steal personal information from your computer and then utilize it to display pop-ads on your PC without your consent. Many adware programs may lead you to dubious Websites or download virus infected programs on your system. Anti-spam tools help you prevent the download of unsolicited, junk e-mail to your system. These tools basically plug-in to your e-mail program such as Microsoft Outlook or Outlook Express and weed out spam mails and help you block them.

There are many anti-malware products available in the market today that incorporate all three tools and provide you with a one point solution to all your malware related problems. However, these products are expensive. And, if you don’t want to spend that much you can look over the Web for freeware and shareware tools and download the ones that have good user reviews and are compatible with your operating system. After you have installed these anti-malware tools on your system, you must be sure to do the following:

  • Enable the real-time-protection feature.
  • Update them regularly with the latest definition released by their manufacturers.
  • Run regular full system scans to keep your system free of malicious information.

Maintain an Error Free Registry

Several Windows errors are generated due to registry problems. Before you learn how to cleanup the registry, you must know what the registry is. The registry is basically a hierarchal database that comprises information related to user preferences, hardware and software configuration and system settings. This is the reason why, there is not a single activity that can be performed on your system without accessing the registry. Registry problems occur when it starts getting filled up with unwanted, obsolete, and erroneous information. Some of the reasons why this data creeps into the registry are:

  • Frequent program install and uninstall.
  • Incorrect program uninstall.
  • Faulty programs and device drivers.
  • Malware infections and many more.

This unwanted information causes the registry to grow at an uncontrollable rate and eventually causes registry damage and fragmentation. These registry problems give rise to several computer errors such as runtime errors, dll errors, and driver errors. In severe cases, registry problems may even render your PC unbootable.

Although troublesome, you can easily deal with registry problems with the help of a third-party registry repair tool. There are several tools available on the Internet. You must be sure to look at the features each of them offer, and see what other users have to say about them, in order to download the one that best suits your requirements and is compatible with your operating system.

Some of the tasks you can perform using a registry repair tool are:

  • Automatically scan, detect, and remove unwanted and erroneous information from the registry.
  • Perform customized searches to look for specific problems and repair them—for instance, to perform DLL repair, you can customize the search for DLL-related problems and resolve them.
  • Defrag the registry to reindex its files and reduce its size.
  • Backup the registry and easily restore it if your current registry fails.

Regular system maintenance goes a long way in keeping your PC healthy and error-free. In addition to malware and registry scans, you may also use the Disk Cleanup tool to remove junk from your hard disk and use the Disk Defragmenter to consolidate any fragmented files.

Written by Stepterix on January 18th, 2008 with no comments.
Read more articles on registry and otherSoftware and error messages.