简体   繁体   English

希望在远程计算机上启动本地exe,而无需在远程计算机上重新启动

[英]Looking to launch a local exe on a remote machine without having the resurces on the remote machine

So I have built some code, it's quite simple basically it stops all active input from keyboard and mouse until a text file of a certain name appears in the C:\\Temp directory. 因此,我构建了一些代码,这很简单,基本上它会停止所有来自键盘和鼠标的活动输入,直到一个特定名称的文本文件出现在C:\\ Temp目录中为止。 It also has a manifest file to run it as administrator on start up. 它还具有一个清单文件,可在启动时以管理员身份运行它。

So I found something that on the surface looks like it fulfils my needs of being able to do this task however upon running it I found out that the project has been compiled in x86 and does not run on my x64 machine. 因此,我发现表面上看起来有些东西满足了我能够执行此任务的需求,但是在运行它时,我发现该项目已在x86上编译,并且无法在我的x64机器上运行。 Here is the reference to the project if anyone would like to look into it, it's a very smartly designed piece of code that does an interesting objective. 如果有人愿意研究的话,这里是对项目的参考 ,它是一个设计精巧的代码,可以实现有趣的目标。 It also explains clearly enough what I am trying to accomplish. 它还清楚地说明了我要完成的工作。

So after implementing this (and failing) I have setup a couple other avenues to try, one is VBA through excel with the VBA copying itself to and from the machines in a list and running itself, then there is using VBS to write the entire code as a txt file on the target machine change the extension and then execute it remotely. 因此,在实现了这一点(并失败了)之后,我设置了其他几种方法来尝试,一种是通过VBA通过excel,VBA将自身复制到列表中的机器上并从中复制出来,然后运行,然后使用VBS编写整个代码作为目标计算机上的txt文件,请更改扩展名,然后远程执行它。 I have just started researching these but I imagine the problems of running as an administrator amongst other things will crop up again to be dealt with. 我刚刚开始研究这些内容,但我认为以管理员身份运行等问题将再次出现。 To be honest though I would really prefer to do this in C# only as that is the language I'm trying to go further in so I'm interested in this challenge. 老实说,尽管我真的更喜欢用C#来做,因为那是我要尝试的语言,所以我对这一挑战很感兴趣。 If anybody knows of a similar library of code or application I could look into to achieve what I'm trying I would appreciate being pointed in the right direction. 如果有人知道类似的代码库或应用程序库,我可以研究一下以达到我所尝试的目标,我将为您指出正确的方向。

I would try and be more specific about what libraires/API's im trying to implement but the truth is I don't know what libraries I need to even interact with to get what I want. 我会尝试并更具体地说明libraires / API正在尝试实现的内容,但事实是我不知道需要什至与哪些库进行交互才能获得所需的内容。 My goal is to have C# executable code on my machine and a tool that can run that executable on another machine. 我的目标是在我的计算机上安装C#可执行代码,并在其他计算机上运行可以运行该可执行文件的工具。

Thanks 谢谢

Thanks to the help in comments from @Nick.McDermaid I was able to correctly open and build the project I was trying to download. 感谢@ Nick.McDermaid提供的注释帮助,我能够正确打开并构建我要下载的项目。 Unsure what caused the issue previously with me not being able to open and interact with the code but now I have it I shall pursue this avenue further to accomplish my goal. 以前不确定是什么原因导致我无法打开代码并无法与代码进行交互,但是现在有了它,我将继续探索这一途径来实现我的目标。

As an addendum one other avenue I tried for executing code remotely was through VBS where I used 作为附录,我尝试过远程执行代码的其他途径是通过使用VBS的地方

set svcproc=getobject("winmgmts:{impersonationLevel=impersonate}!\\"&MachineName & "\root\cimv2:win32_process")
scmd="""C:\Program Files\Internet Explorer\iexplore.exe"" -framemerging ""https://gifyu.com/images/Boo-Ghost-Gif.gif"""
'scmd="C:\Windows\notepad.exe"

iret=svcproc.create(scmd,null,null,pid)
set svcproc=nothing

to execute something that existed on the remote machine but I ran into a LOT of security policy issues where I could launch the process but I couldn't bring it to the foreground as the Malware tracker on the machine thought it was an attack and quashed it immediately. 执行远程计算机上存在的某些内容,但是遇到了很多安全策略问题,可以启动该过程,但是由于该计算机上的恶意软件跟踪程序认为这是一种攻击并已将其取消,因此我无法将其放在前台立即。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM