pudwhack Posted January 3, 2008 Share Posted January 3, 2008 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. Link to comment Share on other sites More sharing options...
corey822 Posted January 3, 2008 Share Posted January 3, 2008 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 Link to comment Share on other sites More sharing options...
pudwhack Posted January 3, 2008 Author Share Posted January 3, 2008 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 herecheers C.Weven with the code like thisRun("\\$var1\notepad.exe")I still get the same error message Link to comment Share on other sites More sharing options...
corey822 Posted January 3, 2008 Share Posted January 3, 2008 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 Link to comment Share on other sites More sharing options...
pudwhack Posted January 3, 2008 Author Share Posted January 3, 2008 mayb u need to open a remote log on the other computer b4 u try and do that once done execute the notepadIt 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. Link to comment Share on other sites More sharing options...
BigDod Posted January 3, 2008 Share Posted January 3, 2008 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. 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 Link to comment Share on other sites More sharing options...
pudwhack Posted January 3, 2008 Author Share Posted January 3, 2008 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. Link to comment Share on other sites More sharing options...
BigDod Posted January 3, 2008 Share Posted January 3, 2008 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. 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 Link to comment Share on other sites More sharing options...
corey822 Posted January 3, 2008 Share Posted January 3, 2008 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 itu could jsut make a email sender that sends over a networkcheeers 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 Link to comment Share on other sites More sharing options...
crzftx Posted January 3, 2008 Share Posted January 3, 2008 (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 January 3, 2008 by crzftx Link to comment Share on other sites More sharing options...
weaponx Posted January 3, 2008 Share Posted January 3, 2008 Just use psexec from Sysinternals Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now