Sunday, December 5, 2010

Issue to run command PSExec (PSTools command) over 64Bit OS

    When you execute the PSTools command PsExec over 64-Bit os
it always gives invalid path error  and not able to execute
PsExec command over 64bit os. This may happen because PsExec is copying command over it's systemdirectory and run that exe from there but in 64Bit os it directly copies content to 64-bit compatible system directory so 32bit appliaction not able to copy there so it gives path not found error.

    So for that you have to create the .cmd file and write the code as below and you have to execute command file over there and it will do rest of the things for you.

so this can work for both 64-Bit and 32-Bit also.




@echo off

if exist %WinDir%\SysWow64 cd /d %WinDir%\SysWow64

copy file://SourceHostName/SharedFolderFromSourceHost/ExenameWantToExecute

ExenameWantToExecute  ExeArguements




    Copy above code to text file and save it as .cmd file and now you can use it with the
pstools command.

Hope this will be helpful to resolve issue with 64-Bit OS.

No comments:

Post a Comment