JeffQOOQAAA Posted February 13, 2017 Posted February 13, 2017 Hi I have a problem , if description not clearly , please bear with me, thanks. I run a bat file and use command _RunDos(@ScriptDir & "\HLK_Filter.bat") But will show "press any key to continue" the end (this information is bat file default setting.... ) I want to know , May I use auto it command for this instruction and close command window.......
Subz Posted February 13, 2017 Posted February 13, 2017 (edited) Why can't you comment out the Pause in your batch file? Or even better convert your batch to Autoit? If you post your batch we should be able to help convert it. If you aren't able to edit the batch you could use echo see http://stackoverflow.com/questions/3583565/how-to-skip-pause-in-batch-file Edited February 13, 2017 by Subz
KickStarter15 Posted February 13, 2017 Posted February 13, 2017 If you show your batch script, then this forum can help you more. Programming is "To make it so simple that there are obviously no deficiencies" or "To make it so complicated that there are no obvious deficiencies" by C.A.R. Hoare.
JeffQOOQAAA Posted February 14, 2017 Author Posted February 14, 2017 Hi All My batch script is there @echo off :: Filter updater for HCK and HLK :::::::::::::::::::::::::: Settings ::::::::::::::::::::::::::::::::: :: Notice: As of July 2015, the HCK and the HLK filter updates are the exact same file, downloaded from the same location! SET "source=https://sysdev.microsoft.com/member/SubmissionWizard/LegalExemptions/HCKFilterUpdates.cab" ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: SET "destination=C:\FilterUpdates.cab" if not exist "%DTMBIN%\" ( echo ERROR: folder "%DTMBIN%" echo does not exist! Please verify that you have the controller installed. exit /B 1 ) echo Please make sure that all instances of the Studio are turned OFF! echo Downloading Filters... bitsadmin /transfer "Downloading Filters" "%source%" "%destination%" if not errorlevel 0 echo ERROR & exit /B 1 echo Extracting... expand -i "%destination%" -f:UpdateFilters.sql "%DTMBIN%\" if not errorlevel 0 echo ERROR & exit /B 1 echo Installing... pushd "%DTMBIN%\" if not errorlevel 0 echo ERROR & exit /B 1 "%DTMBIN%\updatefilters.exe" if not errorlevel 0 echo ERROR & exit /B 1 popd
Subz Posted February 14, 2017 Posted February 14, 2017 You could try something like this: nb: You'll need to update the $DTMBIN variable folder path #include <InetConstants.au3> Local $DTMBIN = '' Local $sFilePath = "C:\FilterUpdates.cab" ; Download the file in the background with the selected option of 'force a reload from the remote site.' Local $hDownload = InetGet("https://sysdev.microsoft.com/member/SubmissionWizard/LegalExemptions/HCKFilterUpdates.cab", $sFilePath, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND) Do Sleep(250) Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE) ; Close the handle returned by InetGet. InetClose($hDownload) RunWait(@ComSpec & ' /c expand -i "' & $sFilePath & '" -f:UpdateFilters.sql "' & $DTMBIN & '"', '', @SW_HIDE) RunWait($DTMBIN & '\UpdateFilters.exe', '', @SW_HIDE) MsgBox(0,'', 'Finished')
JeffQOOQAAA Posted February 14, 2017 Author Posted February 14, 2017 @Subz You can refer attachment "press any key to continue" is Applying updateFilte.sql default the end. I want to use this bat file and the end use autoit send key.......
Subz Posted February 14, 2017 Posted February 14, 2017 Can you run UpdateFilters.exe /? in the command line does it have any switches to override the pause? If not the only method I can think of is either using ControlSend or maybe using something like this (untested): RunWait(@ComSpec & ' /c "' & $DTMBIN & '\UpdateFilters.exe" & @Echo Done', '', @SW_HIDE)
InunoTaishou Posted February 14, 2017 Posted February 14, 2017 (edited) 49 minutes ago, JeffQOOQAAA said: @Subz You can refer attachment "press any key to continue" is Applying updateFilte.sql default the end. I want to use this bat file and the end use autoit send key....... Why did you take a picture using your phone....? There is a "Print Screen" button on your keyboard, or use the snipping tool lol Edited February 14, 2017 by InunoTaishou
argumentum Posted February 14, 2017 Posted February 14, 2017 so, a file called test.bat echo test1 pause < SayY.txt echo test2 pause a file called SayY.txt y Run test.bat and see how a redirect can work. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
JeffQOOQAAA Posted February 14, 2017 Author Posted February 14, 2017 @Subz Only run updatefilter.exe just show press any key continue. It's updateFilter.exe default information, I want to skip it.....
JeffQOOQAAA Posted February 14, 2017 Author Posted February 14, 2017 Sorry, I don't know your mean? You mean is excuete updatefilter.exe directly?
Subz Posted February 14, 2017 Posted February 14, 2017 Correct from a command prompt using updatefilter.exe /?
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