如何使用psexec或psfile [英] How use of psexec or psfile

查看:82
本文介绍了如何使用psexec或psfile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi
我用Delphi编写了一个数据库软件。 DB是SQL Server,已安装在服务器上。用户将记录保存到银行。对于每个记录,都有一个附件文件,必须保存在服务器中。文件必须保存在服务器的文件夹中,并且其地址必须保存在银行中。

我写下2个命令:

ShellExecute(句柄,''打开'',''psexec'',''\\194.168.35.1 -u user1 -p hamed123 -c test1.txt'''''',SW_HIDE);

CopyFile(''test1.txt'',''\\194.168.35.1 \ share_folder $ \\ \\ test1.text,False);

1-参数-c test1.txt不要将文件test1.txt复制到服务器。这项工作可以通过CopyFile完成。但是如果我没有为psexec写这个参数,那么与服务器的连接将不会打开。如何在没有该参数的情况下使用psexec进行打开连接?

2-是否有任何用于打开服务器连接的命令,如psexec?是psfile?它是如何工作的?

3-当连接被psexec打开时,几秒钟后,连接将被关闭,除非经常在客户端和服务器之间复制和粘贴文件。我们怎样才能增加连接时间?



请回复我完成这项工作的完整命令。

非常感谢

Hi I write a database software by Delphi. DB is SQL Server and has install on server . User save record to bank. For every record there is an attachment file which must be save in server. File must be save in a folder in server and it’s Address must be save in bank.
I write 2 below commands:
ShellExecute(Handle, ''open'', ''psexec'', ''\\194.168.35.1 -u user1 -p hamed123 -c test1.txt'' '''', SW_HIDE);
CopyFile(''test1.txt'', ''\\194.168.35.1\share_folder$\test1.text, False);
1- Parameter -c test1.txt don’t copy file test1.txt to server . this work be do by CopyFile. But if I don’t write this parameter for psexec, the connection to server will not be open. How can I use psexec for open connection without that parameter?
2- Is there any commands for open connection to server like "psexec"? is "psfile" ? how it work?
3- When a connection be opened by "psexec", after some seconds, the connection will be closed, Unless copy and paste file between client and server be done frequently. How can we increase the connection time ?

Please reply me full commands for do this work.
Thanks very much

推荐答案

\test1.text,False);

1-参数-c test1.txt不要将文件test1.txt复制到服务器。这项工作可以通过CopyFile完成。但是如果我没有为psexec写这个参数,那么与服务器的连接将不会打开。如何在没有该参数的情况下使用psexec进行打开连接?

2-是否有任何用于打开服务器连接的命令,如psexec?是psfile?它是如何工作的?

3-当连接被psexec打开时,几秒钟后,连接将被关闭,除非经常在客户端和服务器之间复制和粘贴文件。我们怎样才能增加连接时间?



请回复我完成这项工作的完整命令。

非常感谢
\test1.text, False);
1- Parameter -c test1.txt don’t copy file test1.txt to server . this work be do by CopyFile. But if I don’t write this parameter for psexec, the connection to server will not be open. How can I use psexec for open connection without that parameter?
2- Is there any commands for open connection to server like "psexec"? is "psfile" ? how it work?
3- When a connection be opened by "psexec", after some seconds, the connection will be closed, Unless copy and paste file between client and server be done frequently. How can we increase the connection time ?

Please reply me full commands for do this work.
Thanks very much


拿一个看看这里 [ ^ ]正确使用选项和帮助论坛。
Take a look here[^] for correct use of the options, and help forum.


这篇关于如何使用psexec或psfile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆