| 1. |
Solve : Answering yes when a bat file runs? |
|
Answer» I am building a bat file to setup .net framework to run. When the command runs it ask if you are sure, it has a y & n. I want it to select y and run from there. does the .net framework install file support command line switching??? CHOSE = command 1 needs. Andrew, I think you meant Choice.com from DOS, NOT "CHOSE" Besides that, I don't think choice will help llightsey out here. blastman & Sidewinder both have viable suggestions that llightsey should pursue first. This is the bat file i want to run, when it runs it ask if i am sure and I answer YES. I don't want to type the yes in how can I make it auto answer the question and run? Bat file to allow a PC to run .net programs color 0a @cls c: cd \windows cd microsoft.net cd Framework cd v2.0.50727 CasPol.exe -m -ag 1.2 -zone Intranet FullTrust set set PERSIS=/PERSISTENT:YES pauseDid you research if there is a silent switch? You can try the pipe but there are no guarantees: Code: [Select]c: cd \windows\microsoft.net\Framework\v2.0.50727 echo Y | CasPol.exe -m -ag 1.2 -zone Intranet FullTrust set set PERSIS=/PERSISTENT:YES pause If the program is expecting the fullword YES, then echo YES instead of Y. Any reason the set statement is after the program execute? Sidewinder, it still wont run unless you type the YES inWell, like I mentioned, not all programs take input from the pipe. Unless you can find a switch for the program to run silently, you may SOL. Have you tried running the program from the Windows run box? Code: [Select]"c:\windows\microsoft.net\Framework\v2.0.50727\CasPol.exe -m -ag 1.2 -zone Intranet FullTrust set" It might be interesting to see if the shell gets activated for the prompt. You can set PERSIS anytime either temporarily thru the batch shell or permanently thru Windows. Good LUCK. I got it working I found the switch that TURNS the question off New Code Bat file to allow a PC to run .net programs color 0a @cls c: cd \windows\microsoft.net\Framework\v2.0.50727 CasPol.exe -pp off -m -ag 1.2 -zone Intranet FullTrust Just change the _pp on and it will agin ask you It's always good to hear to success STORY. Thanks for all your help on the Fourm Sidewinder |
|