tomscaper Posted January 18, 2007 Author Posted January 18, 2007 sorry if that made no sense lol. i have compiled it to an exe which runs on start up the main problem now is that it doesnt run the batch file because it cannot run it from the server such as \\servername\share\sims.bat i am looking at getting it to do it all in the autoit script rather than run an extra batch file. this is what i have up to now ; AutoIt Version: 3.2.2.0 ; Language: English ; Platform: Win XP ; Author: Tom Fish ; Script Function: Displays Message then loads sims installers from batch file ; Version: 2 ; Date: Jan 2007 If FileExists("c:\program files\sims\installed11") Then Exit Else SplashTextOn("Sims Install", @CRLF & @CRLF & @CRLF & "Installing Sims Please wait for" & @CRLF & "this screen to close before continuing.","500","200","-1","-1",0,"","","") ;BlockInput(1) sleep(3000) ;Map the Q:\ drive DriveMapAdd("q:", "\\server\packages") FileCopy("q:\sims\connect.ini", "c:\program files\sims\",9) ;Run sims installers RunWait('q:\sims\Setups\SIMSInfrastructureSetup.exe -a {QuietMode}') RunWait('q:\sims\Setups\SIMSapplicationsetup.exe /s {QuietMode} {NoServerApps} [sIMSDirectory]="K:\SIMS\" [sIMSDotNetDirectory]="C:\Program Files\SIMS\SIMS .net"') RunWait('q:\sims\Setups\SIMSMAnualSetup.exe /s {QuietMode} {NoServerManuals} [sIMSDirectory]="K:\SIMS\" [sIMSDotNetDirectory]="C:\Program Files\SIMS\SIMS .net"') RunWait('q:\sims\Setups\SIMSAMPARKSetup.exe /s {QuietMode} {NoServerApps} [sIMSDirectory]="K:\SIMS\" [sIMSDotNetDirectory]="C:\Program Files\SIMS\SIMS .net"') ;creates directory call insalled1 DirCreate("c:\program files\sims\installed1") FileCopy("q:\sims\connect.ini", "c:\program files\sims\sims .net\", 9) ; Disconnect the Q: drive DriveMapDel("q:") Splashoff() SplashTextOn("Sims Install", @CRLF & @CRLF & @CRLF & @CRLF & "Installation complete","500","200","-1","-1",0,"","","") sleep(3000) BlockInput(0) SplashOff() EndIf
mattx Posted January 18, 2007 Posted January 18, 2007 Do you have the working directory location in your RunWait commands ? RunWait ( "filename" [, "workingdir" [, flag]] ) I don't see them in your script - try putting those in, I have had a few issues with stuff not running because of that before...
tomscaper Posted January 18, 2007 Author Posted January 18, 2007 i am not sure what you mean the working directory, what is it for. is it where sims is installed such as c:\program files\sims\sims .net\
mattx Posted January 18, 2007 Posted January 18, 2007 Example: The line: RunWait('q:\sims\Setups\SIMSInfrastructureSetup.exe -a {QuietMode}') Re do as: RunWait('q:\sims\Setups\SIMSInfrastructureSetup.exe -a {QuietMode}', 'q:\sims\setups') And the same for the others...
ajbritton Posted January 18, 2007 Posted January 18, 2007 I have an AutoIT script which I am still developing (taking ages to get it just right), and will share it when I can trust it. There are a couple of things that might help you though... You do not need to map a drive to install SIMS. It will happily install from (and indeed run from) a UNC path. I explicity share the SIMS Setups folder (as SIMSSETUPS), so I execute the installs from \\server\simssetups\SIMSInfrastructure.exe etc.
tomscaper Posted January 19, 2007 Author Posted January 19, 2007 thanks for that mattx i have added that to the line of my script what does that actually do. aj i will try using a server unc path i have had problems with it in the past with batch files so i guess i automatically put them in the autoit script as well. thanks for the tip.
mattx Posted January 19, 2007 Posted January 19, 2007 The working directory just lets AutoIT know there the .exe is. I know its stated in the working path but its always best to include the working directory. I have missed it [ as its optionable ] when I have written other stuff and my scripts just refuse to run sometimes because if it !! Let me know it it makes a difference.
tomscaper Posted January 19, 2007 Author Posted January 19, 2007 luckily it all worked fine this morning and sims was updated on all the machines. i will test it with that working path, thanks again for all the help. autoit is rather a handy program.
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