Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When copying the .exe to a 64bit Windows computer using the -c flag with PsExec, there's an error executing it, PsExec just stalls there.

Anyone else experiencing this?

share|improve this question
    
What os version? –  Jim B Jun 12 '11 at 8:37
    
64-bit machine, or 64-bit OS? –  Mark Henderson Jul 31 '11 at 1:49
    
possible duplicate of PsExec hangs. Error launching installer –  mfinni Aug 10 '11 at 16:36
    
any solution about it ? –  Kiquenet Feb 6 '12 at 11:04

2 Answers 2

Is this thread on social.msdn relevant?

The poster was getting problems with PsExec on some 64 bit machines, but was getting a "... device not functioning..." message. However, in his own reply he states:

After some more testing I noticed the problem only occurred on WES 7 64 Bit.
Any retail version 32 or 64 bit and WES 7 32 bit would work fine.
Then I remembered the following update:
KB982199 is an update for 64-bit systems which fixes the following issue: CreateProcess fails for 32 bit Applications on Windows Embedded Standard 7 64-bit runtimes when redirection disabled
After installing this update the problem was solved.

share|improve this answer
    
Hrm, my stalling issue is happening on Windows Vista 64 bit computers as well :(... when i try to run the .exe that it copies inside system32 I get an error. If however i copy and paste that .exe somewhere else and run it, it works. –  Luca Matteis Aug 20 '10 at 14:48
    
@Luca - I haven't been able to find out whether KB982199 applies to Vista or not. The description just says "64-bit". –  ChrisF Aug 20 '10 at 15:00
    
%Windir%\system32 is a protected directory with UAC on and configured a certain way, I know it is hard to elevate, I assume you are using an admin account on the target machine, but how is UAC configured? Can you use psexec with that account to echo to a blank text file? Also keep in mind 64-bit Windows means SysWoW64, meaning folder redirection and other nastiness that makes accessing important system directories less trivial than before, because the context in which you, read, write, or execute from it changes what it is. –  ajstein Jun 12 '11 at 6:19

const string subkey = "Software\Sysinternals\PsExec";

        if (Environment.Is64BitOperatingSystem)
        {
            // For 64 Bit PC
            RegistryKey registryKey64 = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry64);
            RegistryKey NDPKey64 = registryKey64.OpenSubKey(subkey);
            if (NDPKey64 != null)
            {
                Registry.CurrentUser.OpenSubKey(subkey, true).SetValue("EulaAccepted", 1, RegistryValueKind.DWord);
            }
            else
            {
                RegistryKey regKey64 = registryKey64.OpenSubKey("Software", true);
                regKey64.CreateSubKey("Sysinternals\\PsExec", RegistryKeyPermissionCheck.ReadWriteSubTree);
                Registry.CurrentUser.OpenSubKey(subkey, true).SetValue("EulaAccepted", 1, RegistryValueKind.DWord);
            }
        }
        else
        {
            //For 32 bit PC
            RegistryKey registryKey32 = Registry.CurrentUser.OpenSubKey(subkey);
            if (registryKey32 != null)
            {
                Registry.CurrentUser.OpenSubKey(subkey, true).SetValue("EulaAccepted", 1, RegistryValueKind.DWord);
            }
            else
            {
                RegistryKey regKey32 = Registry.CurrentUser.OpenSubKey("Software", true);
                regKey32.CreateSubKey("Sysinternals\\PsExec", RegistryKeyPermissionCheck.ReadWriteSubTree);
                Registry.CurrentUser.OpenSubKey(subkey, true).SetValue("EulaAccepted", 1, RegistryValueKind.DWord);
            }
        }
share|improve this answer
1  
What on earth is this? –  Michael Hampton Nov 27 '12 at 13:03
    
Ok, sometimes the PsExec eventhough it is installed wont invoke other exes when requested. The problem is to do with setting the EulaAccepted DWORD value to 1. I could not find a page which discusses this problem, so added here. –  Shyam Nov 30 '12 at 9:19
    
That's great, and it might be a useful answer, but this appears to be code. Why didn't you just say "change this registry entry"? –  Michael Hampton Nov 30 '12 at 12:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.