Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Timing

$
0
0
Hi all.

I am working on a script that has many parts to it. The application is an in house developed type, (home grown) which requires Oracle 11gr2. In my script below,  the installation of Oracle with minimal options goes first, however I need for the process to not continue until this installation is completed. I am new to AutoIT. Any help will be greatly appreciated.

Here is my script:

[ autoit ]         
SplashTextOn("BIZ Planning Installation", "Please wait while BIZ Planning for Access 2010 is installed.", -1, -1, -1, -1, 18, "", 25) DriveMapAdd("X:", "\\ServerName\Packages\Software Distribution\") Sleep(30000) SplashOff() ;Oracle 11gR2 installation SplashTextOn("BIZ Planning Installation", "Please wait while Oracle 11gR2 components are installed.", -1, -1, -1, -1, 18, "", 25) ;Check for Oracle 11gR2 For $i = 1 to 100 $var = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C1A4AAAD-6D9E-4432-8A88-FA1508DF5F8F}", $i) If @error <> 0 Then call ("fOracle11gR2") ExitLoop Else DriveMapAdd("X:", "\\ServerName\Packages\Software Distribution") FileChangeDir("X:\Oracle11gR2") #RequireAdmin RunWait(@ComSpec & " /c " & "setup.exe -responseFile X:\Oracle11gR2\install\client.rsp -silent -nowait", @WorkingDir, @SW_HIDE) ExitLoop EndIf Next Sleep(1000000) ;10 minute wait  so full Oracle Client install can complete - required for dependent file copy commands to be successful. ;Removes mapped DriveGetDrive DriveMapDel("X")   ;Oracle Standard Installation Func fOracle11gR2() DriveMapAdd("X:", "\\ServerName\Packages\Software Distribution") FileChangeDir("X:\Oracle11gR2") #RequireAdmin RunWait(@ComSpec & " /c " & "setup.exe -responseFile X:\Oracle11gR2\install\client.rsp -silent -nowait", @WorkingDir, @SW_HIDE)  EndFunc Sleep(600000) ;10 minute wait  so full Oracle Client install can complete - required for dependent file copy commands to be successful. ;TNSnames Installation ;Func fTNSNamesW7() FileChangeDir("X:\TNSNamesW7") RunWait(@ComSpec & " /c " & "TNSNamesW7.exe", @WorkingDir, @SW_HIDE) SplashOff() FileChangeDir(@scriptdir) ;EndFunc Call ("fRegSet") ;BIS DSN Settings Func fRegSet() SplashTextOn("BIZ Planning Installation", "Please wait while BIZ Settings are installed.", -1, -1, -1, -1, 18, "", 25) sleep(200000) Splashoff() SplashTextOn("BIZ Planning Installation", "Creating ODBC Connections.", -1, -1, -1, -1, 18, "", 25) RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Access Connectivity Engine\Engines", "SandboxMode", "Reg_Dword", "2")     DriveMapAdd("X:", "\\ServerName\packages\software distribution")     #RequireAdmin     FileChangeDir("X:\BizPlanW7")     Run(@ComSpec & " /c " & "Regedit.exe /s BIS.reg", @WorkingDir, @SW_HIDE)     Run(@ComSpec & " /c " & "Regedit.exe /s BizPlanning.reg", @WorkingDir, @SW_HIDE)     RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources", "BIS_MKTP1", "Reg_SZ", "Oracle in OraClient11g_home1")     RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources", "BizPlanning_MKTP1", "Reg_SZ", "Oracle in OraClient11g_home1")     RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C1A4AAAD-6D9E-4432-8A88-FA1508DF5F8F}","Oracle11Installed", "Reg_Dword", "1") EndFunc Call ("fBIZPlan") ; Copy code for BIZPlanning.mde into place Func fBIZPlan() SplashTextOn("BIZ Planning WinInstallation", "Finalizing BIZ Planning Installation Copying Files.", -1, -1, -1, -1, 18, "", 25) FileChangeDir("X:\BIZPLANW7") DirCreate("C:\BIZPlanning") DirCreate("C:\BizPlanning\Photos\Util") DirCreate("C:\BIZPlanning\photos\csImageFile") DirCreate("C:\BIZPlanning\data") DirCreate("C:\Oracle\app\product\11.2.0\client_1\Network\Admin") FileCopy("csImageFile.dll", "C:\BIZPlanning\photos\csImageFile", 1) FileCopy("curl.exe", "C:\BIZPlanning\photos\Util", 1) FileCopy("BizPlanning.mde", "C:\BIZPlanning", 1) FileCopy("BizPlanningInfo.mdb", "C:\BIZPlanning\data", 0) FileChangeDir(@desktopcommondir) FileDelete("BIZ*.*") filechangedir(@desktopdir) FileDelete("BIZ*.*") FileChangeDir("X:\BIZPLANW7\Shortcut") FileCopy("BIZ Planning.*", "C:\Users\Public\desktop", 1)  EndFunc Call ("fTNSNamesW7") Func fTNSNamesW7()     FileChangeDir("X:\BIZPLANW7") #RequireAdmin FileCopy("TNSNames.ora", "C:\Oracle\App\Product\11.2.0\Client_1\Network\Admin", 1)  EndFunc Call("fXGOAway") Func fXGOAway()     DriveMapDel("X") SplashTextOn("BIZ Planning for Access 2010 Installation", "COMPLETED THANK YOU.", -1, -1, -1, -1, 2, "", 15) Sleep(190000)     SplashOff()  EndFunc #include <Process.au3> Local $rc = _RunDos("C:\Windows\SysWOW64\regsvr32 /s C:\BizPlanning\photos\csImageFile\csImageFile.dll") Exit

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>