|
Answer» :P1.at dos,the intention is to run c:\TVUPlayer_1.5.12_20060209.exe without need to enter next> next> next> FYI,there are about 5 "next>" that need to be accepted while installing the program.
2.Read about redirection from google groups and other forums, which recommended I do this
c:\TVUPlayer_1.5.12_20060209.exe < input.txt where input.txt contained the 5 "next>"
3.the content of input.txt which I attempted
a) ^M ^M ^M ^M ^M
b)<- <- <- <- <-
where the "<-" is the unicode left arrow character which I cannot be formatted correctly here.
Both a) and b) did not work for me
4.Is there anywhere which I did wrong or some other way to do this? I suspect the problem here is that I don't know the proper value for 'carriage return'.
The program i am trying to install can be found in this link http://www.download.com/TVU-Player/3000-2194_4-10549204.html?tag=listAs best as I can tell, TVUPlayer is a Windows program. You will not be able to send keys from the batch environment to the Windows environment. You can use any of the Windows Scripting languages (VBScript, JSCript, Perl, REXX, etc) to mimic keystrokes and send them to a running Windows application.
There is also a free program, AutoIt which may be helpful in this situation.
Good luck. 8-)I agree with Sidewinder. I don't think either DOS or a batch file is the proper solution for your problem. If you really want to use a batch file, have it create and run a VBS file.
Create and run a .VBS with something like: Code: [Select]set WshShell = CreateObject("WScript.Shell") WshShell.Run "c:\TVUPlayer_1.5.12_20060209.exe" WScript.Sleep 2000 While WshShell.AppActivate("TVUPlayer") = FALSE wscript.sleep 1000 Wend WshShell.AppActivate "TVUPlayer" WScript.Sleep 2000 WshShell.SendKeys "{ENTER}" WScript.Sleep 2000 WshShell.SendKeys "{ENTER}" WScript.Sleep 2000 WshShell.SendKeys "{ENTER}" WScript.Sleep 2000 WshShell.SendKeys "{ENTER}" WScript.Sleep 2000 WshShell.SendKeys "{ENTER}" You can run the VBS file from a command line or batch file with cscript filename.VBSThanks guys for setting me in the right direction. I tried using the .vbs However,I could not get past the 1st window on the .exe which prompts me to enter the language and to hit 'ok' after that.
When i manually hit OK at the first pop-up window the wscript took over.
Is there different syntax required for pop-up windows?
another alternative can try Expect for windows http://bmrc.berkeley.edu/people/chaffee/expectnt.htmlFor the VBS, I took a GUESS on what the Window was CALLED. Replace the lines: While WshShell.AppActivate("TVUPlayer") = FALSE WshShell.AppActivate "TVUPlayer"
"TVUPlayer" with what the window is actually called (name in the bar at the top) and SEE if that works.hi GURUGARY,
I just removed those two lines and it worked for me.
A follow up question to this,will the script work if the application were to be installed in another server?
In other words Server A contains the .bat file Server B can contain the .vbs Server B contains the .exe to be installed.
If they are both on the same NETWORK, and you have proper permissions, you should be able to set it up to work. The hardest part would be if you need launch one of the programs on command from the remote machine.
|