PSExec is not recognized as an operable program - 64 bit problem?

PSExec is not recognized as an operable program - 64 bit problem?

avatar

Hi, new user here.

I'm trying to open a remote command prompt on an standard rdp host session. My PC is running windows 7, I am running latest RDM Enterprise version.

Steps I have taken so far:
Unzipped the pstools suite to my system32 directory
Imported the 'Remote Command Prompt' tool using Macro/Script/Tool Manager - this has a green tick next to it
On the properties of the tool, I have checked the 'Run as Administrator' box

When I run the tool against the session entry, a UAC warning comes up "Do you want to make the following changes?" The details of the warning are:
Program Location: "C:\Windows\SysWOW64\cmd.exe" /k "C\Windows\System32\psexec.exe" <HOSTNAME> cmd.exe /k - note that the cmd.exe is being opened from my SysWOW64 folder.
I select the Yes button.

The following error comes up:

'C:\Windows\System32\psexec.exe' is not recognized as an internal or external command, operable program or batch file.


If I exit RDM then open the syswow64 cmd.exe outside of RDM and run psexec the same error occurs. But there is no problem running it from the cmd.exe within the System32 folder.

The only way I have found so far to get the remote command prompt tool to work within RDM was to copy the psexec.exe file to my SysWOW64 folder.

Will I have to do this with every tool? Does anyone have a better way?

All Comments (4)

avatar

Hi #zerocredibility
Are you by any chance starting the 64bit RDM version?

//Brandur

//Brandur

avatar

Hello,

System32 content 64 bit binaries, and SysWow64 contains 32 bit binaries.

http://en.wikipedia.org/wiki/WoW64

Since there's a whole system put in place by the OS to manage different bitness applications, I wouldn't store other tools in either system folders.

My sysinternals folder is c:\Tools\Sysinternals and I havent experienced any issues of that sort. May I ask why you are storing it in System32?

Maurice

avatar

Just to add...
I do the same as Maurice. Actually we have two locations for tools/plugins.
One primary location, which is on a DFS network drive(internal network access required).
Secondary location is that all domain PC's replicate this tools/plugins folder from DFS to there local primary %SystemDrive%\<CompanyName>\RDM\Tools\PSTools...

So if PC has network access, RDM uses tools from DFS. If not, local tools is used(which are auto updated from DFS location when/if newer version is available).
//Brandur

//Brandur

avatar

Brandur, I am not running 64 bit version, I noticed that is not recommended yet. Thanks for info on your setup, looks foolproof.

Maurice, I guess the reason I stored it in system32 is because "thats the way I've always done it". An excellent reason, to be sure!
I suppose I've always put things in system32 because then they are found no matter which directory they are called from.

I have now moved them to same path as you use and added that path to the PATH environment variable and everything works fine.

I do have a couple more questions:
1. This one is nitpicky but when opening the remote command prompt on a session linked to a vpn it doesn't open the vpn first. Either the rdp session must be open or the vpn must be started manually first. Can I set it up so it will check for the vpn, open it if needed, then run the psexec tool?

2. The remote command prompt logs me on as the session user. How would I change this to a different user, for example with domain admin permissions. Manually, the command would be psexec \computername -u <username> -p <password> cmd /k. I thought I might be able to do this by selecting the 'Run as different user' checkbox within the tool, but that did not make any difference. Am I best to set this up as a separate tool?

Thanks
Todd
Auckland, New Zealand