Domanda

I have existing batch scripts which work in windows xp. These scripts use rcp and rsh commands that are supported in windows xp .

These scripts are used to connect to a unix box and transfer files to it. Later using rsh, the files are installed on the system.

In Windows 7 these commands seems to be unavailable. I am stuck on how to make existing installation work on windows 7

Any help in this regard would be appreciated.

È stato utile?

Soluzione 2

Found a solution to this problem. The below steps needs to be followed:

  1. Copy the following executable and dlls from windows xp machine to a folder (say c:\Windows\OldTools) on your windows 7 machine
    • advapi32.dll
    • kernel32.dll
    • msvcrt.dll
    • mswsock.dll
    • rcp.exe
    • rsh.exe
    • user32.dll
    • ws2_32.dll

  2. Click on start menu -> right click on computer -> select Properties -> Advanced System Settings -> Environment Variables -> In "System Variables" section double click on "Path" -> Add the following text at the end

    ;c:\Windows\OldTools

    The scripts now recognizes the rcp and rsh commands.

Altri suggerimenti

A quick Google search will show you that both RCP and RSH are -

"not available by default in Windows 7 but can be enabled by turning on the Subsystem for UNIX-based Applications Windows feature from Programs and Features in Control Panel and then installing the Utilities and SDK for UNIX-based Applications available here."

I tried this solution on a Windows 10 machine. But when executing rcp.exe (or rsh.exe) I got the following error window:

"The procedure entry point DnsGetIpAddressList could not be located in the dynamic link library C:\test-rcp\MSWSOCK.DLL."

C:\test-rcp\ is the folder where I copied the .exe and the dll files.

I gave a try to delete the mswsock.dll. After doing that, running rcp (without parameters) showed the help (started to look good!) However, I executed a test to copy a local file to a remote server with a RSHD daemon running, and the file was not copied. rcp didn't throw any error message. The RSHD daemon is working fine when rcp'ing files from a server with old Windows version supporting rcp.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top