Monday, 11 June 2012

*** FAQ: Common PSTools Issues ***

FAQ: Common PSTools Issues

  1. Where do I get the latest version of PSTools? 

    Please visit the PStools web page. The download link will be at the bottom of the page. 
  2. How do I install PSTools? 

    None of the tools requires any special installation. You don't even need to install any client software on the remote computers at which you target them. Run them by typing their name and any command-line options you want. To show complete usage information, specify the "-?" command-line option.

    Cf. here: PStools web page. 

    So the installation procedure is really simple:

    • download the
    • create a folder on your local disk, i.e. "%ProgramFiles%\PsTools".
    • unzip all files inside to the newly created folder.
    • Note: 
      if you already have a newer version of pdh.dll on your machine (very likely in %windir%\system32), you do not need the pdh.dll inside Simply delete pdh.dll which you just extracted from the newly created folder.
    • Installation done.

    You will not find PSTools under Control Panel => Add/Remove Programs 
  3. How do I uninstall PSTools? 

    If you have read the Installation Instruction above, the answer is pretty obvious: 
    • Make sure no PSTools command is running on your machine.
    • Remove all PSTools files from the folder where you extracted them to.
    • If the folder is empty now, you may remove it, too.
    • PSTools have been uninstalled.
    • PsTools V2.40 or newer: 
      Starting with PsTools V2.40, each PsTools command will, when launched for the first time, create a regkey named HKCU\Software\Sysinternals\\EulaAccepted=0x01. If you wish to remove these keys as well, then you will need to remove them for each user who ever used PsTools on the machine. Yet leaving the keys inside the registry will do no harm except waste a few bytes.

  4. How do I run a PSTools command? 

    PsTools commands are console applications. This means they have not got a GUI, a graphical user interface. Double clicking on the executable files will just result in a command window popping up and closing pretty fast. 

    Instead open a command window e.g. by clicking on Start => Run and typing in cmd.exe. 

    Inside the the command window change to the folder where you extracted the PStools files, i.e. cd "%programfiles%\PStools", if this is where you stored them. 

    Run them by typing their name and any command-line options you want. To show complete usage information, specify the "-?" command-line option.

    Cf. here: PStools web page. 

    Those interested in a concise overview on the usage of all the PsTools utilities in one single article are strongly encouraged to have a look at Wes Miller's PsTools Primer. 

    Finally, you may also get help on each PSTools command by double clicking on the pstools.chm and going to the appropriate command section. 
  5. What are the minimum requirements to run PSTools commands? 

    Please read PsExec could not start. 
    Although it is about psexec, the requirements to run any PSTools command are pretty similar. 
  6. How to switch WinXP to "Classical Network Authentication"? 

    PStools commands often need to logon to the target machine. 
    On WinXP this will not work, if WinXP uses "Guest authentication" instead of "Classical Authentication". 
    In order to learn how to switch back to "Classical Authentication", 
    please read Pskill & XP Pro 2002 
    and/or psshutdown issue 
    Although the threads are about pskill/psshutdown, the solution applies to other PSTools command as well. 
  7. My user has got an empty password. Why do I keep getting "Access Denied"? 

    If the user who tries to log in on \\target has got an empty password, i.e. no password at all, authentication on \\target will fail and you will receive an "Access Denied" error message. 
    This statement is valid no matter if you use implicit login on \\target, i.e. you do not use the -u username -p password options, or if you use explicit login, i.e. you do specify -u username -p password. 
    Cf. PsTools Giving Access Denied Error. 
  8. PsTools: Will they work on 64bit Versions of Windows? 

    Please read pslist and Server 2003 - Enterprise X64. 
  9. PsTools: Will they work on 64bit Itanium machines? 

    Definitely no. Please see Mark's statements on Sysinternals and Itanium in this thread: IA-64 bit version of regmon. 
  10. PsTools: Why do I get virus alarms by my antivirus software? 

    If you downloaded your from the Sysinternals PSTools webpage, please cool down. Chances are pretty good you are receiving false positives. 
    Please read: Question: Bit Defender Identifies PSTool. 
  11. PsTools: Launching a Pstools executable gives the error message: is not a valid Win32 application 

    Are you running some kind of software which allows to define which applications may be launched and which ones not? Like e.g. Application Control from Secure Wave? If so please read: PsShutdown. 
  12. PsTools: What is the internal format of the file "@file"? 

    In order to use a PSTools command (psexec, psshutdown etc) towards a list of computers, you may e.g. launch
    psexec \\computer1,computer2,computer3 command_to_be_run
    or you may put the computer names in a listfile named file e.g. and launch
    psexec @file command_to_be_run
    You wonder how to put the computer names in file? 
    Please read PSShutdown @file. 
  13. PsExec: Error communicating with PsExec service 

    If you are running McAfee antivirus software and/or ZoneAlarm firewall software, please read Error communicating with PsExec service. 
  14. PsExec: The PsExec service running on is an incompatible version 

    Please read PSExec incompatible Version. 
  15. PsExec: No Process on the other end of the pipe 

    It seems as if the source of this issue may in fact be the same as with the error message quoted above, i.e. "The PsExec service running on is an incompatible version". 
    Please read No Process on the other end of the pipe. 
  16. PsExec "eating up" the first "-accepteula" on the commandline 

    Since Nov. 2006, the PsTools utilities have required you to confirm the EULA when invoked by a user for the first time. 
    Since Dec. 2006, the Pstools utilities have accepted the -accepteula commandline argument. 
    Ever since, you have noticed that if you used psexec to launch another PsTools command remotely and passed -accepteula to this remote PsTools command the -accepteula argument mysteriously disappeared from the commandline. 
    Please read PSExec - FWIW - A bug with -accepteula in order to learn what really happens and how to workaround the issue. 
  17. PsExec: Can I run Windows telnet.exe/ftp.exe remotely using psexec? 

    Problems have been reported on running Windows telnet.exe and Windows ftp.exe, both console applications, remotely using psexec. So far no solution seems to be known. 
    About telnet: telnet with psexec problem -PLS HELP -. 
    About FTP: PSEXEC and ftp.exe. 
    This report seems to confirm the issue, FTP server responses will be lost (invisible) when FTP is launched remotely using psexec: running batch file with psexec 
  18. PsExec: Issues encountered when running it inside scripting environments/programmes 

    There are numerous reports on issues encountered when launching PsExec from inside various scripting environments/programmes. Very often the issues seem to be related to handling of stdin, stdout and stderr. But there may be other sources of trouble as well. Sadly enough, there does not seem to be one single approach which will solve or work around all issues. 
    + Java: psexec always hangs when run from java 
    + .NET: PSExec running CMD Remotely Doesn�t Stop 
    + .NET: cls in VB.NET console program doesnt work? 
    + PHP: Can psexec suppress a console window? 
    + PHP: psExec vs Console.WriteLine 
    + PHP: output from PsExec 
    + PHP: psexec - the pipe has been ended.. (Maybe gsds2 developped a workaround which will work for you as well?!) 
    + PHP: PSService: does not work with PHP 
    + Wsh: Stuck using PsExec 1.70 becasue of StdOut 
    + Wsh: psexesvc hanging on exit 
    This list is by no means complete. Please use the forum search button. Do not forget to set the "FindPosts" field to "Any date" before pressing the "Start Search" button. 
  19. PSExec Hangs (Called From Inside a C# Programme) 

    Maybe this thread holds helpful information to C# developpers: PSExec Hangs. 
  20. PsExec: Can I run several parallel psexec instances to 1 target machine? 

    Please read psexec error communicating. 
  21. PsExec: Can I use psexec to launch a graphical application remotely? 

    Please read psexec and GUI on remote machine. 
    Also check out this thread PsExec & -i To Interact w/Desktop. 
    It is about unwanted side effects of the psexec -d option if used in conjunction with -i when launching a GUI application remotely. 
  22. PsExec could not start [progname] on [machinename]: The parameter is incorrect. 

    You try to run a commandline like this
    psexec \\win2003srv -i notepad.exe
    but always receive the error message quoted above. 
    This error depends on 3 factors: the target machine is a Windows 2003 system, the option -i  is used and the specified sessionID is greater than 0. 
    This problem has been introduced to psexec starting with v1.80 together with the enhanced option -i  and seems to affect only Win2003 target machines. 
    Please, refer to the following threads e.g.: 
    + Remote GUI revisited 
    + psexec newb (option "-i sessionID") 
    + Psexec -i causes target app to crash on nonconsole 
    + FIXED: Psexec -i not working on headless svr 
    + psexec and interaction with remote desktop 
    + PsExec - prog. executes despite incorrect func. 
    + psexec -s -i Windows 2003 server (2) 
    + psexec -s -i Windows 2003 server (1) 
    + psexec and GUI on remote machine 
    + PsExec & -i To Interact w/Desktop 
  23. PsExec: Can I set the system time remotely using PsExec? 

    Yes, it is feasible, but beware of pitfalls. Please read Cannot set time via psExec. 
  24. PsExec could not start : The service has not been started. 

    You are simply trying to launch a command like psexec , but receive the error message quoted above? 
    Please read learn which purposes psexec may serve and what it will not do here: PsExec could not start (local machine w2k). 
  25. PsExec - Maximum remote commandline length for PsExec v1.73-v1.82 

    If you use psexec (v1.73-1.82) to launch a remote commandline longer than 255 characters, psexec will crash when the remote commandline returns control back to psexec. psexec v1.83 solves this issue. 
    Please read PsExec - Maximum string length PsExec (v1.73-v1.82). 
  26. PsExec: User input being cut off after first character when using "set /p" 

    A problem similar to the "time" command problem above, only the first letter of interactive user input is recognized. 
    Please read psexec do not recog /p??. 
  27. PsExec: Remote Installation 

    There are quite a few threads reporting issues when using psexec in order to launch installation packages on a remote target machine. If you succeed or fail seems to depend largely on the kind of setup that you are trying to launch remotely. So very likely there is not 1 right way to do it. 
    In order to offer at least some help on this issue I would like to point you to 3 threads where users seems to have found ways of achieving their goals. 
    Please check out the solutions offered in these threads (they may or may not work for you as well): 
    + psexec - Cannot find the (.MSI) file specified 
    + psexec - user credentials question 
    + psexec and remote install 
  28. PsExec: remote share problem 

    You are trying to execute a command like psexec \\remoteserverA cmd.exe /k dir \\remoteserverB\share, but only receive an Access denied error message. 
    Please read psexec - remote share problem in order to learn why and how to solve the issue. 
  29. PsExec (pre-v1.80): Runtime HKCU unload when using psexec -e 

    You are trying to execute a command like psexec.exe \\computer -u user -p pass -e -i regedit.exe in order to edit the user's HKCU registry hive, but end up editing HKU\.default instead? 
    Please read Runtime HKCU unload when using psexec -e. 

    Important Note: 
    Starting with psexec v1.80 the meaning of -e has been reverted:
    Originally posted by psexec -?

    -e Does not load the specified account's profile.

  30. PsExec: Can it be used on Vista? 

    Please read Guide for enabling PsExec on VISTA. 
  31. PsExec from Vista to Vista, can it be done? 

    You wonder whether you may have any success using psexec from one Vista computer to another Vista computer? Maybe settingLocalAccountTokenFilterPolicy=1 will do the trick? Please read psexec from vista to vista. 
  32. PsExec: What is the difference between implicit authentication and explicit authentication? 

    You wonder why does psexec behave differently if it has been launched without the -u user -p passw arguments than it does if launched with the -u user -p passwarguments? 
    Please read psexec - remote share problem in order to learn why. 
  33. PsFile: Access Denied 
    On the local machine, you are logged on as a normal user (no admin privileges). You launch psfile \\target -u admin -p passw, but keep on receiving "Access Denied." error messages. 
    Please read psfile access denied. (Very closely related to the next issue.) 
  34. PsFile: -u / -p otions not working as expected 
    On the local machine, you are logged on as a normal user (no admin privileges). You launch psfile \\target -u admin -p passw, but keep on receiving "Unable to connect to \\target. Verify user name and password." error messages. 
    Please read PsFile - -u / -p otions not working as ex. (Very closely related to the previous issue.) 
  35. PsInfo: Access Denied running remotely (Win2K upgraded to WinXP or Win2003) 

    OK, here is a tricky one: You upgraded a Win2K machine to WinXP/Win2003. Ever since you receive an "Access Denied" error message if you try to run "psinfo" remotely targetting this machine. 
    Please read PSInfo - Access Denied running remotely. 
  36. PsKill: Can I use pskill to terminate applications minimized to systray? 

    Please read PSKill & close system tray icons?. 
  37. PsList: Failed to take process snapshot on remote-pc. 

    When you launch pslist targetting a remote Windows machine, you keep getting this error message
    Failed to take process snapshot on remote-pc. 
    Make sure that the Remote Registry service is running on the remote system, that you have firewall ports allow RPC access, and your account has read access the following key on the remote system: 
    HKLM\Software\Microsoft\Windows NT\CurrentVersion\Perflib
    In order to resolve this issue, please read PsList fails to take process snapshot. 
  38. PsList: Show Processes for the Current User Only? 

    PsList does not show the process owners at all. Here is a workaround/solution which does not use PsList at all: PsList - Show Processes for the Current User Only?. 
  39. PsLogList: Basic Usage Examples 

    The usage of the PsLogList commandline seems a bit confusing. Start by doing something simple as explained in this thread: PsLogList. 
  40. PsLogList: PSLogList and tab-delimited output 

    Here is another basic, but hopefully useful example, writing the psloglist output to a tab-delimited file for later import into your favourite spreadsheet programme e.g.: PSLogList and tab-delim output!!?!?!. 
  41. PsLogList: ability to dump to .EVT file? 

    This one is more tricky: The "-c -g filename.evt" options will let you export an eventlog to an evt file and clear the eventlog. This works fine locally, but seems to fail remotely. Maybe this workaround will prove useful to you, too: psloglist - ability to dump to evt file?. 
  42. PsShutdown & non-administrator accounts 

    Is there a way for a user that is not an administrator of a machine to use psshutdown to shutdown a machine? The following thread suggests the answer may besorry, no. 
    Please read PsShutdown & non-administrator accounts. 
  43. PsShutdown: Can I schedule a specific shutdown time on the commandline? 

    Yes, it is feasible, but beware of the time format. Please read PS-Shutdown at a spec. time. 
  44. PsShutdown: Can I reboot/shutdown a locked workstation? 

    Yes, it is feasible. Please read Psshutdown cannot reboot locked wrkstn. 
  45. PsShutdown: Can I logoff a terminal server user running "psshutdown -o"? 

    No, not possible. "psshutdown -o" will always logoff the console user. Please read Psshutdown. 
  46. PsShutdown: -v does not work as expected! 

    Some psshutdown versions worked incorrectly when the -v  option was used. Should be fixed in psshutdown v2.51. Please read Psshutdown andPsShutdown -v. 
  47. PsShutdown: After upgrading to a new version, psshutdown towards a remote machine fails with "Error communicating with psshutdown service". 

    The complete error message reads more or less like this:
    Error communicating with psshutdown service on local system. The system may not have been shutdown: The pipe has been ended.

    In the folder %windir% on the remote machine, there still is an older version of pssdnsvc.exe. 
    Please read psshutdown v 2.51 failing, pipe error in order to learn how to fix this problem and get rid of an outdated PsShutdown service. 
  48. PsShutdown \\target gives: Could not start PsShutdown service on target: %1 is not a valid Win32 application. 

    You have some kind of application control software running on your machines preventing unwanted software from being launched. 
    Please read psshutdown. 
  49. PsShutdown: What is the internal format of the file "@file"? 

    In order to psshutdown a list of computers, you may launch
    psshutdown \\computer1,computer2,computer3
    or you may put the computer names in a listfile named file e.g. and launch
    psshutdown @file
    You wonder how to put the computer names in file? 
    Please read PSShutdown @file.

No comments:

Post a Comment

Do not post irrelevant comments, please!

Browser Name:
Browser Version:
Browser Code Name: