*Java* Posted November 28, 2011 Report Share Posted November 28, 2011 hi all ,i have problem with start command in windows ,when i type "start calc" to the command line directly , it is work !when i put it in patch file does not work ?!!thanks, Quote Link to comment Share on other sites More sharing options...
*Java* Posted November 28, 2011 Author Report Share Posted November 28, 2011 to be more clear,my problem is when i want to run java Application remotely ( on windows server 2003 ) , Set cloner = CreateObject("WScript.Shell")cloner.run"cmd"WScript.Sleep 500cloner.SendKeys"telnet 00.00.00.00" // = zeros is IPcloner.SendKeys("{Enter}")WScript.Sleep 500cloner.SendKeys"start JavaApplication"cloner.SendKeys("{Enter}")WScript.Sleep 500cloner.SendKeys"exit"cloner.SendKeys("{Enter}")WScript.Sleep 300cloner.SendKeys"exit"cloner.SendKeys("{Enter}")WScript.Sleep 300 Quote Link to comment Share on other sites More sharing options...
Makcalable Posted December 1, 2011 Report Share Posted December 1, 2011 See here how to execute a program remotely = http://motevich.blogspot.com/2007/11/execute-program-on-remote-computer.html Also see here = http://technet.microsoft.com/en-us/sysinternals/bb897553 Quote Link to comment Share on other sites More sharing options...
AceInfinity Posted January 29, 2012 Report Share Posted January 29, 2012 when i put it in patch file does not work ?!! I'm confused. Also you don't necessarily need to use the start command to execute an application. Something as simple as this will work in batch. explorer.exe or app.exe Assuming you're in the proper directory, or you input the full filepath %Directory%\app.exe Quote Link to comment Share on other sites More sharing options...
MANEMAN Posted January 29, 2012 Report Share Posted January 29, 2012 Hmmmmm............... Interesting. Quote Link to comment Share on other sites More sharing options...
AceInfinity Posted January 29, 2012 Report Share Posted January 29, 2012 If a program takes command line arguments you could pipe a few into those slots as well without using the start command. Example: iexplorer.exe "http://google.ca" Quote Link to comment Share on other sites More sharing options...
MANEMAN Posted January 29, 2012 Report Share Posted January 29, 2012 I think by this time the readers will be enthralled by the amount of knowledge that you have, but will probably have lost sight of it's meaningful content in both context and relationship to the original post. lol. :) In which part of Canada do you live by the way ? Quote Link to comment Share on other sites More sharing options...
AceInfinity Posted January 29, 2012 Report Share Posted January 29, 2012 I think by this time the readers will be enthralled by the amount of knowledge that you have, but will probably have lost sight of it's meaningful content in both context and relationship to the original post. lol. :) In which part of Canada do you live by the way ? I live in Alberta for specific :) The oil capital of Canada as a province lol He mentioned he wanted to run a java app though, I don't see reason as to why he can't try something like this: java_appname.exe That would start it, but to actually do anything with it you'd have to make sure that this app can recognize and utilize command line arguments to do anything with the app once it's ran. Otherwise it just fires up, and nothing else happens. Batch isn't the language to be sending Windows Messages either to anywhere like you'd be able to do with a language like C++. You could get the window itself by a handle, and virtually invoke any button object on the form if batch could do that. As well as change around the values of all of the labels and text on the form itself including the titlebar :lol:Here's an example of what I mean with Windows Messaging :)Some application I developed a while back...And after opening a screenshot of that in Windows Live Photo Viewer, I edited the title of the Windows Live Photo Viewer application title bar as well :lol:Without that though, you can't do anything, and batch isn't advanced enough to send Windows Messages as far as i'm concerned. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.