Sign in to follow this  
Followers 0
pudwhack

Need some help with Remote Execution

11 posts in this topic

I'm trying to execute notepad on a remote computer so I can type up a message, here is my code so far....

; Input Box for the IP Address
$var1 = Inputbox ("IP", "What is the IP Address", "localhost" )

; Input box for the message to put
$var2 = InputBox ("Message", "Type your message", "Please Call IT")

; Run Notepad On Remote Machine

Run("\\$var1\\c$\windows\notepad.exe")


; Wait for the Notepad become active
WinWaitActive("Untitled - Notepad")


; Now that the Notepad window is active type some text
Send("$var2 {ENTER}")

I alway get an error message like

Line -1:

Error: Unable to execute the external program.

The network path was not found.

I have no idea what I'm doing, so any help would be awesome. Thanks.

Share this post


Link to post
Share on other sites



I'm trying to execute notepad on a remote computer so I can type up a message, here is my code so far....

; Input Box for the IP Address
$var1 = Inputbox ("IP", "What is the IP Address", "localhost" )

; Input box for the message to put
$var2 = InputBox ("Message", "Type your message", "Please Call IT")

; Run Notepad On Remote Machine

Run("\\$var1\\c$\windows\notepad.exe")


; Wait for the Notepad become active
WinWaitActive("Untitled - Notepad")


; Now that the Notepad window is active type some text
Send("$var2 {ENTER}")

I alway get an error message like

Line -1:

Error: Unable to execute the external program.

The network path was not found.

I have no idea what I'm doing, so any help would be awesome. Thanks.

ok ima noob could the line

Run("\\$var1\\c$\windows\notepad.exe") be the problem particualy becuase of the C$

tbh i dont knwo im a noob here

cheers C.W


C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Share this post


Link to post
Share on other sites

ok ima noob could the line

Run("\\$var1\\c$\windows\notepad.exe") be the problem particualy becuase of the C$

tbh i dont knwo im a noob here

cheers C.W

even with the code like this

Run("\\$var1\notepad.exe")

I still get the same error message

Share this post


Link to post
Share on other sites

mayb u need to open a remote log on the other computer b4 u try and do that once done execute the notepad


C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Share this post


Link to post
Share on other sites

mayb u need to open a remote log on the other computer b4 u try and do that once done execute the notepad

It doesn't even connect to the remote computer, or my own for that matter. Must be something with the syntax, but I'm not sure what to put to run on the remote computer.

Share this post


Link to post
Share on other sites

You would probably be better having the messenger service running on the remote computer and then using net send. The downside to this is that all your remote users would be able to send messages to themselves.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

You would probably be better having the messenger service running on the remote computer and then using net send. The downside to this is that all your remote users would be able to send messages to themselves.

Can't do it, I'm trying to implement this kind of thing over a huge network as a quick way to send a message. net send is disabled by our firewall, and its probably gonna stay that way.

Share this post


Link to post
Share on other sites

Can't do it, I'm trying to implement this kind of thing over a huge network as a quick way to send a message. net send is disabled by our firewall, and its probably gonna stay that way.

You will probably find that all other methods you come up with will also be blocked. This being the case you would be best using email.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

You will probably find that all other methods you come up with will also be blocked. This being the case you would be best using email.

tbh email would be better anyway as i dont seem why u would bother to remote log into a computer jsut to write something on a computer unless ur trying to make a prank out of it

u could jsut make a email sender that sends over a network

cheeers C.W


C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

well I think

Run("\\$var1\\c$\windows\notepad.exe")
is problem...

Run("\\" & $var1 & "\" & @SytemDir & "\notepad.exe")
seems right, but it seems too easy that nobody's pointed in out yet. Edited by crzftx

Share this post


Link to post
Share on other sites

Just use psexec from Sysinternals

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0