Troubleshooting

You are currently browsing the articles from MS Windows Articles, Reviews and Videos matching the category Troubleshooting.

Top 10 Windows Built-In Command Line Tools

For many users, the thought of using the Command Prompt is either a scary experience or something that they will never need. But for some, the is a powerful tool that can be far more useful than many graphical tools available in .

Being a , I constantly use the , mostly because I access systems remotely and many tasks can be performed quickly with out the graphics over head (even though connecting via Terminal Server is very convenient).

So if you are an avid user of the line, here are my top 10 built-in (non third party) line tools for XP, Vista and server versions (remember these are not your typical tools, such as find, copy, move, dir, etc..).

1 - - Have a need to configuration information for a local or remote machine, including service pack levels? Then is the tool to use. When I need to connect to a that I am not familiar with, this is the first tool I run. The output of this gives me all the info I need including: host name, OS type, version, product ID, install date, boot time and info (processor and memory). Also knowing what hot fixes are installed can be a big help when . This tool can be used to connect to a machine remotely using the following syntax: /S /U user

2 - - This tool may be most useful tool for viewing and TCP/IP . It’s capability includes release or renew an adapter , and flush DNS , re-register the name in DNS. WIth Vista and some server versions, includes support for IPv6.

Some examples when usinging .

3 - and taskkill - If you are used to Task Manager, then you’ll find tasklist very easy to use. This tool displays a list of currently running processes, including image name, PID (Process ID) and memory usage on local or remote machines. Using the /V switch displays more information in verbose mode that includes, CPU Time, user name, and modules. includes a filter option to a set of task based on the criteria specified.

A single or multiple processes can be killed using the PID (/PID ) or image name (/IM ). Here are two examples for doing just that:

TASKKILL /IM notepad.exe
TASKKILL /PID 1230 /PID 1241 /PID 1253 /T

Both and taskkill can connect to remote systems using the /S ( name) /U (user name) switches.

4 - - Need to know who (or what) is making a connection to your ? Then is the tool you want to run. The output provides valuable information of all connections and listening ports, including the executable used in the connections. In additon to the above info, you can view Ethernet statistics, and resolve connecting host IP Addresses to a fully qualified domain name. I usually run the using the -a (displays all connection info), -n (sorts in numerical form) and -b (displays executable name) switches.

5 - type - A lesser known tool to those who don’t work with the . For Administrators, the type is the perfect tool for viewing text files. But what many people don’t know about the type tool, is it’s capability to read multiple files at once. For example to view multiple text files, just separate each file with a space:

type firstfile.txt secondfile.txt thirdfile.txt

6 - net - Although this tool is more known as a , the net is really like a drill with different bits and is used to , , or view the or .

It is mostly used for viewing (only services that are started), stopping and starting services:

and for connecting (mapping) and disconnecting with shared drives:

Other used with net are, accounts (manage user accounts), net print (manage print jobs), and net share (manage shares).

Below are all the options that can be used with the net .

[ ACCOUNTS | | CONFIG | CONTINUE | FILE | GROUP | HELP |HELPMSG | LOCALGROUP | PAUSE | PRINT | SESSION | SHARE | |STATISTICS | STOP | TIME | USE | USER | VIEW ]

To the complete syntax for each , just type net help followed by the - net help use .

7 - - With the , DNS (Domain Name Service) is the key for allowing us to use friendly names when surfing the web instead of needing to remember IP Addresses. But when there are , can be a valuable tool for testing and DNS servers.

can be run in two modes: interactive and noninteractive. Noninteractive mode is useful when only a single piece of needs to be returned.

Don’t let the help results intimidate you. is easy to use. Some of the options I use when are:

set ds (displays detailed debugging information of behind the scenes communication when resolving an host or ).

set domain (sets the default domain to use when resolving, so you don’t need to type the fully qualified name each time).

set type (sets the query record type that will be returned, such as A, MX, NS)

server NAME (allows you to point to use other DNS servers than what is configured on your )

To exit out of interactive mode, type exit .

8 - ping and tracert - These tools can be helpful with to other systems. Ping will test whether a particular host is reachable across an IP , while tracert (traceroute) is used to determine the route taken by packets across an IP .

To ping a just type at the : ping www.google.com. By default, ping will send three ICMP request to the host and listen for ICMP “echo response” replies. Ping also includes switches to the number of echo requests to send (-n ), and to resolve IP addresses to hostname (-a ).

To use tracert, type at the : tracert www.google.com. You can force tracert to not resolve address to hostnames by using the -d switch, or set the desired timeout (milliseconds) for each reply using -w switch.

9 - gpresult - Used mostly in environments that implement group poicies, gpresults (Group Policy Results) verifies all policy in for a specific user or . The is simple to use, just enter gpresults at the . It can also be used to connect to computers remotely using the /S and /U switches.

10 - netsh - Without a doubt the most powerful line tool available in . Netsh is like the swiss army knife for configuring and monitoring computers from the . It capabilities include:

Some examples of what you can do with netsh:

netsh firewall set opmode disable

netsh firewall set opmode disable

netsh firewall set icmpsetting 8 enable

netsh firewall set icmpsetting 8 disable

netsh ip set address “Local Area Connection” dhcp

(For the above , if your NIC is named something else, use netsh ip show config and replace the name at Local Area Connection).

As you can see netsh can do alot. Instead of re-inventing the wheel, out the following Microsoft article for more info on netsh.

The use of line tools can be a powerful alternative when only a is available. I’m sure there are plenty more that I have not mention.

Share and Enjoy: del.icio.us StumbleUpon Facebook Google Furl Live MisterWong.DE NewsVine Reddit Slashdot Technorati YahooMyWeb BlinkList description Fark Netvouz Spurl MisterWong Webnews.de Blogsvine description IndiaGram kick.ie Taggly E-mail this story to a friend! Print this article!

Tags:, , , , , , , , , , , , , , , , , , , ,

Related posts

Written by Jason on August 15th, 2008 with no comments.
Read more articles on 1340 and 1354 and 1426 and 1429 and 1673 and 169 and 2065 and 2157 and 401 and 544 and Contributors and Network and Prompt and Troubleshoot and Troubleshooting and administrator and command and command prompt and computer and nslookup and system and tasklist and windows.

Monitor Your Hardware Temperature With HWMonitor

With many innovations being made to today’s PC’s , laptops and desktops have become much smaller and lighter. But one drawback to that light convenience is heat.

Computers today can pack more power in a much smaller and denser space, if you don’t keep them cool, you can pretty much guarantee a failure will occur.

Fortunately, there is an easy way to keep tabs on temperature using a utility called .

from is a that reads your PC Systems main health sensors, such as voltages, temperatures and fans . I mostly use it on my home PC to keeps tabs just on temperature since I use a laptop.

requires no installation and is a true portable (does not copy files or create folders on your hard drive, or writes to the registry).

To run it, just launch .exe.

will the current temperature along with the minimum and maximum values. If your is capable of displaying voltages and , you will also see those valuse displayed (my does not).

The can also handle the most common sensor chips, such as ITE IT87 series, most Winbond® ICs, and others. In addition, it can read modern on-die core , as well has hard drives temperature via S.M.A.R.T, and card temperature.

can be run right off your stick and is handy to have when . The only feature missing, is the capability to minimize to the tray.

also makes other utilities including PCTipsBox that can analyze and your PC, and includes a powerful inventory feature that is useful if you need to re-install

Tags:, , , , , , , , , , , , , , , , , , ,

Related posts

Written by Jason on July 20th, 2008 with no comments.
Read more articles on 1340 and 1354 and 1426 and 1429 and 1673 and 169 and 2065 and 2157 and 401 and 544 and Benchmark and Contributors and Hardware and Software and Troubleshoot and Troubleshooting and USB and Windows Vista and Windows XP and monitoring and processing and speed and system and tip and windows.

Being a Step Ahead of the Software Requirements

For most software that you install, there will be the ideal PC requirements provided so you can be assured of optimum performance for programs and games you will install on your PC. At times, varied differences as far as video specifications, memory and processor capacity will be stated. But while many would see the usual minimal requirements, you have to consider the fact on whether these will be sufficient to satisfy the level of performance you are expecting once these software programs are installed.

Based on experience, it would never hurt to be a step ahead. This entails making sure that you are installing the software on hardware that is a bit advanced. For example, if video card requirements are at least 128 MB, why not install a 256 MB video card if the difference is just a couple of bucks? Or perhaps if memory requires at least 256 RAM, why not go double like 512?

Some may call it overkill but they are really some form of making sure that you get best performance from these programs. Remember that if you go for minimal requirements, you will eventually find yourself wanting better performance and hence upgrading these concerned hardware peripherals in the end.

In summary, do not take the minimal system requirements as a measure of competent utilization of programs. They are placed there so that you know that the program will indeed run. But as far as great performance is concerned, do consider the fact that it is not stated anywhere in that part of the software box for you to ponder on as well.

Written by PC Freak on June 26th, 2008 with no comments.
Read more articles on 1354 and 1426 and 1429 and 1673 and 169 and 2065 and 2157 and 401 and 544 and Contributors and Performance and Ram and Software and Troubleshooting and optimization and overclocking and programs and tutorials and video card.

The Free Windows Sysinternals Tools Go Live

is a collection of advanced accompanied by information, designed to streamline , management, diagnosis and tasks under the hood of the . The resources are offered as free downloads by since 2006, when the Redmond giant acquired the project put together by Mark Russinovich and Bryce Cogswell. As of May 28, has enabled alternative access to the utilities via Live Sysinternals, which is still in tests.

“We’re excited to announce the beta of Live, a service that enables you to execute tools directly from the without hunting for and manually downloading them. Simply enter a ’s Live path into Explorer or a prompt as live..comtools or view the entire Live tools directory in a ,” reads the announcement from .

The new service has been in private beta testing until this week, but now it is open to the general public. Live is a basic HTML page designed exclusively for functionality. According to the Team, users are advised to turn to the standard if they are unfamiliar with the utilities.

The Sysinternals home page contains detailed information about each , unlike which assumes that the users simply want effortless access to the latest versions of the tools as they get updated. Along with the launch of , also updates three tools, namely Process Explorer, AutoRuns, and Process Monitor.

Live “is a file share allowing access to all utilities. We have developed this to test an alternate distribution mechanism for our utilities. This will allow you to run these tools from any connected to the without having to navigate to a webpage, and extract the zip file,” the Team stated.

The entire Suite 1.0 Build 28.05.2008 is available for here.

Tags:, , , , , , , , , , , ,

Related posts

Written by Jason on May 29th, 2008 with no comments.
Read more articles on 1426 and 1429 and 1673 and 169 and 2065 and 2157 and 401 and Browser and Contributors and Maintenance and Software and Sysinternals and Troubleshoot and Troubleshooting and Utility and Windows Vista and Windows XP and command and microsoft and windows and windows explorer.

Troubleshoot Failed Installations of XP SP3 RTM Build 5512

Although has hammered away at Windows XP SP3 in order to provide an experience as seamless as possible for end users when deploying the service pack, failed scenarios are still a valid possibility. In the eventuality of a failed of , there are some steps end users can take before running to Support for . The methods involve nothing more than basic actions on the part of the end user and are designed to an unsuccessful process while, at the same, time ignoring the .

First of all, Microsoft advises all end users to turn to Update for the primary source of the gold bits of . “Sometimes an is unsuccessful because a previous operation was not completed. By restarting the , you close any pending functions and restart the process. Wait until the finishes the restart process, and then log on to your . Visit Update to reselect and install . Click Express Install (Recommended),” stated.

If the XP machine that the end user is trying to update meets all the requirements for , the service pack will be installed. At the same time, if the WU package fails to install, users also have the possibility of manually accessing the bits for XP SP3 and then to attempt to integrate the service pack in their .

There is a variety of applications that can interfere with the of the service pack, especially products. “ failure may occur when a third-party program holds a file open or when it locks a file that the Windows XP SP3 program needs. To minimize this possibility, follow these steps before you install : exit any open programs, and then restart the . After the has restarted, disable any antivirus, antispyware, and third-party programs that may start during the startup process,” said.

Users will need to try to install again either via the standalone packages or through WU, and then turn back on all their . If the still fails, the status of the Background Intelligent Transfer Service needs to be checked, and BITS has to be turned on.

“Click Start, click Run, services.msc in the Open box, and then click OK. Right-click Background Intelligent Transfer Service, and then click Properties. On the General tab, click Automatic in the Startup box, and then click Apply. In the “Service status” section of the properties dialog box, verify that the BITS service is started. If it is not started, click Start. Click Apply, and then click OK,” added.

Retrying the process at this point should end up in a successful deployment. In the case that is still not integrated, there remains only the option of clearing the Distribution folder and trying one last time. But if the result is the same, the end users are advised to contact Support.

“Click Start, click Run, services.msc in the Open box, and then click OK. Right-click Automatic Update, and then click Stop. Click Start, click Run, and then the following in the Open box: ‘%windir%SoftwareDistribution’. Right-click the folder, and then click Rename. .old, and then press ENTER. Exit . In the Services console, right-click the Automatic Update service, and then click Start,” explained.

Tags:, , , , , , , , , , , , , , , ,

Related posts

Written by Jason on May 12th, 2008 with no comments.
Read more articles on 1429 and 1673 and 169 and 2065 and 2157 and 401 and Contributors and Firewall and Help and Installation and RTM and Security and Spyware and Troubleshoot and Troubleshooting and Windows Update and Windows XP and download and error message and windows and windows xp sp3.

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 1426 and 1429 and 1673 and 169 and 2065 and 2157 and 401 and Contributors and Troubleshooting and Virtualization and registry and vista and windbg.

My Answer to “Microsoft Advanced Windows Debugging and Troubleshooting” Puzzler 3

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.

Previously, I had written about the puzzlers on the NTDebugging / Microsoft Advanced Windows Debugging and Troubleshooting blog - specifically, the most recent puzzler which involved reverse engineering some assembler. The answer was posted today - there were a lot of responses, and a lot of correct responses.

I had posted the hashes for my answer (which was correct), that I am now able to disclose...

void myfun( char* param1 )
{
size_t local1 = strlen( param1 );
for( int local2 = local1; local2 > 0; local2-- )
{
for( int local3 = 0; local3 < local2 - 1; local3++ )
{
if( *(param1+local3) > *(param1+local3+1) )
{
char local4 = *(param1+local3);
*(param1+local3) = *(param1+local3+1);
*(param1+local3+1) = local4;
}
}
}
}

Written by «/\/\Ø|ö±ò\/»®© on April 25th, 2008 with no comments.
Read more articles on 1429 and 1673 and 169 and 2065 and 2157 and 401 and Contributors and Troubleshooting and debugging.

Microsoft Advanced Windows Debugging and Troubleshooting Puzzlers

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.

Over on the Microsoft Advanced Windows Debugging and Troubleshooting blog, they've been posting a "Puzzler" every Monday and providing the answers the following Friday.

The puzzlers are fun to participate in and it is interesting to read people's responses - everyone has their own ideas and own experiences to draw off of.

With the third puzzler, the blog authors have decided to make the challenge a bit more difficult - the latest puzzler requires one to reverse engineer some assembler.

I've not got much experience with reverse engineering assembler - I can read some assembler and can usually get a very basic idea of what a targeted chunk of code is doing. So it was an interesting challenge for me to attempt to C-ify the assembler they provided. It doesn't appear that the authors are posting the responses until they reveal the answer (makes sense to me!). But I thought I'd post hashes of my response, which I'll also post once the NT Debugging blog authors post the answer and submitted comments / responses.

From Sigcheck:


Z:\NTDebuggingPuzzler3>sigcheck -h TheFunc.txt

Sigcheck v1.52
Copyright (C) 2004-2008 Mark Russinovich
Sysinternals - www.sysinternals.com

Z:\NTDebuggingPuzzler3\TheFunc.txt:
Verified: Unsigned
File date: 12:52 PM 4/22/2008
Publisher: n/a
Description: n/a
Product: n/a
Version: n/a
File version: n/a
MD5: 755394f9711b80968f17c8ffcb8f2394
SHA1: e8443f09eef43f2575aa08ba25f68267dba7243e
SHA256: 0e044419ef78f2fa7a8e258098f4f658426a8dc3e8a5b9a121a352c2dbbbfafc


EDIT 2008-04-24: The hashes are for the code that was submitted in my second response (not the entire response - just the code). In my first response, I inadvertently left some garbage in the code (an unnecessary / unused local I had been playing with) and I neglected to remove it before submitting. Not sure how it will all pan out when the comments / responses get posted tomorrow...

Written by «/\/\Ø|ö±ò\/»®© on April 24th, 2008 with no comments.
Read more articles on 1426 and 1429 and 1673 and 169 and 2065 and 2157 and 401 and Contributors and Troubleshooting and debugging.

Checking for Solutions to Problems

collects information about Vista from users. When a problem occurs, Vista usually asks whether you want to send information about the problem to and, if you do, it stores these tidbits in a massive database. Engineers then tackle the “issues” (as they euphemistically call them) and hopefully come up with solutions.

One of Vista’s most promising new features is Problem Reports and Solutions, and it’s designed to make solutions available to anyone who goes looking for them. Vista keeps a list of your is having, so you can tell it to go online and see if a solution is available. If there’s a solution waiting, Vista will it, install it, and fix your . (more…)

Tags: , , , , , , , , , , , ,

Related posts

Written by Jason on February 22nd, 2008 with comments disabled.
Read more articles on Format and Maintenance and Reporting and Troubleshoot and Troubleshooting and Windows Vista and computer and computer problems and constantly and control panel and control panel system and maintenance problem and windows.