0uwe Posted December 6, 2015 Share Posted December 6, 2015 (edited) Hello,I'm a beginner,and get out of it.I want to automate a program with my one .ini file afterwards copy-it in.The program install and make the directroy where i afterwards wil copythe .ini to.#RequireAdmin Run("C:\Users\rj\Desktop\*.*") ; (installs the program and close it) FileCopy ( "C:\Users\rj\Desktop\*.*", "c:\dir\.ini\" ) Exit The problem is when the program is finished,the filecopy already have placed de file on de disk,but the directory wasn't there.So the question is when i run de program (automatiq instal with mouseclicks (take 7 seconds) for closing,the filecopy is within this time doneso the expected dir is not created.(he put is on man c:\)I played with wait/proceswaitfinish/loops/runwait i dont get it or see itSo can anyone explain me how it works???I want to install the program (is *.exe) and then the program is completly finished and closed the filecopy. Regards Rob stupid from me but solved (think to muts) While FileExists ( "c:\dir\default.br2" )WEnd Edited December 6, 2015 by 0uwe solved Link to comment Share on other sites More sharing options...
aleph01 Posted December 7, 2015 Share Posted December 7, 2015 Using RunWait instead of Run would pause your script until your other program finishes, too. Meds. They're not just for breakfast anymore. Link to comment Share on other sites More sharing options...
0uwe Posted December 8, 2015 Author Share Posted December 8, 2015 Thanks i now,but de problem was de program thats instald,when the program is finisd its write/make the directory for it,(take some time)so when i make filecopy it is to fast and thedirectory dosn't exits. But this works for meFileInstall("wincmd.ini", @TempDir & "\wincmd.ini", 1)If FileInstall("tcmd.exe", @TempDir & "\tcmd.exe", 1) Then RunWait('"' & @TempDir & '\tcmd.exe', @TempDir)EndIfProcessWaitClose("tcmd.exe")FileCopy(@TempDir & '\wincmd.ini', 'c:\totalcmd\')Exit Link to comment Share on other sites More sharing options...
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