Search the Community
Showing results for tags 'cmd.exe'.
Found 2 results
Hi There ! I have a script here : ;Launch CMD Run("C:\Windows\System32\cmd.exe") sleep(2000) $cmdHandle = WinActivate("C:\Windows\System32\cmd.exe") Sleep(2000) ;Sending document ControlSend($cmdHandle, "", "", "ftp" & @CRLF) ControlSend($cmdHandle, "", "", "open" & @CRLF) Sleep(2000) ControlSend($cmdHandle, "", "", "first command" & @CRLF) Sleep(2000) ControlSend($cmdHandle, "", "", "second-coomand" & @CRLF) first-command and second-command I can't provide cause it's internal. I have complied this .au3 file into an exe and it does the work. But I need to invoke this with Java. Java code I have tried is : ProcessBuilder pb = new ProcessBuilder("C:\\Users\\username\\eclipse-workspace\\Examples\\src\\com\\own\\examples\\etc.exe"); pb.start(); Thread.sleep(5000); Through java it just launches the cmd and nothing happens after that. Please help !!
Friends, A script I am working on calls a commandline utility called lpr.exe. It allows sending files to a printer with an IP address. My script needs to work on both 32 and 64 bit systems. on my 64 bit system, the only LPR.exe is a 64 bit app, and if I use a command such as RunWait(@ComSpec & " /K lpr.exe -S " & $IPAddress & " -P strict " & $FileName, @ScriptDir) I get an error in the command window telling me there is no lpr.exe command. If I compile my script in 64 bits, it works fine. But then of course that script wouldn't work on a 32 bit system. I could use kludges, such as installing a "lpr32.exe" copied from a 32 bit system on a 64 bit system, and compile the script in 32 bits, or I could even have a 64 and a 32 bit version of the same script. But then, many of my users have no idea if their system is a 32 or 64 bit one, and I'm trying to keep things simple. Is there a way to use RunWait or something similar in such a way that a 64 bit cmd.exe would be called from a 32-bit compiled script? I kind of doubt that, but someone out there might dream up a way... Thanks