laggerific Posted July 29, 2004 Share Posted July 29, 2004 I am working on a script that will install my main applications once the OS is installed, and one of the apps I want to install has several patches that need to be installed afterwards. Does anyone know if it's possible to have a batch file that will call the install of an app and wait for it to finish before continuing on to install the updates? Or is that something I will have to look at WSH or something to be possible?Hopefully, this isn't off topic...thanks all! Link to comment Share on other sites More sharing options...
Alanoll Posted July 29, 2004 Share Posted July 29, 2004 in a batch file, if you use start /wait, the batch will wait before proceeding.In a RunOnceEX, it should wait on it's ownthere is a program in the download section of the unattend site, that is called sleep, you could use that if you program does some wierd things. Link to comment Share on other sites More sharing options...
laggerific Posted August 2, 2004 Author Share Posted August 2, 2004 I've just tested both of these methods and the problem is still there. Is that something that they need to fix on their end? It looks like the setup.exe file for FileMakerPro7 just calls an MSI file, which could be why the scripts think that the process has finished, when it has actually just called another process. The problem is that the setup.exe file has a setup.ini file which is where the licensing info and silent install info is, so I don't think I can just install it off of the .MSI file.Is there any place that focuses on dealing with these sort of problem installers? I'm thinking that I might need to add some code to the script to keep looking for the existence of the installer process and then proceed once it's no longer there, but that would far exceed my current scripting knowledge. I look forward to that challenge, but I would also be interested if anyone has any other ideas that are more elegant.Thanks everyone! Link to comment Share on other sites More sharing options...
Alanoll Posted August 2, 2004 Share Posted August 2, 2004 it depends on the licensing information. If it's just a simple LICENSE="BLAH" then you can do that via commandline as well. Link to comment Share on other sites More sharing options...
jrzycrim Posted August 2, 2004 Share Posted August 2, 2004 If they are Installshield setups, the /SMS switch can be used to prevent that problem.http://www.installshield.com/news/newslett...nchIS5Setup.asp Link to comment Share on other sites More sharing options...
laggerific Posted August 3, 2004 Author Share Posted August 3, 2004 I have decided to start looking into a script that will start monitoring the processes and wait for the one that is spawned by the filemaker installer to finish. I am currently looking into just looking for the process name of the executable, iassist.exe in this case, and then waiting for it to no longer be there before moving to the next part of the script. Does anyone have any sample code that does something similar to this? I am trying to figure out the best way for it to detect the process, and while I am new to all of this, I am starting to look into WMI for this functionality.Any suggestions as to which way to start would be greatly appreciated...as you can see I've already started, but anyone with a better understanding of WMI or VBScript that can point me in a useful direction would be great, as right now I am in a trial and error stage that could take a long time to get out of. Link to comment Share on other sites More sharing options...
mazin Posted August 3, 2004 Share Posted August 3, 2004 Well!Scripting isn't that hard. If you can install your app using your keyboard only (no mouse), then you can write your own script.I like JScript scripts. This is an example you can start with:http://www.msfn.org/board/index.php?showto...ndpost&p=158950 Link to comment Share on other sites More sharing options...
dkhandel Posted September 19, 2007 Share Posted September 19, 2007 (edited) i think, i have responded to an old thread. Edited September 19, 2007 by dkhandel Link to comment Share on other sites More sharing options...
geezery Posted September 19, 2007 Share Posted September 19, 2007 (edited) I have used one in my ImageX HTA gui here is a sample code with some comments. [code]Sub ProcessWait 'Define the objects Set objShell = CreateObject("WScript.Shell") Set objWMIService = GetObject ("winmgmts:\\.\root\cimv2") 'Lets run our setup here, in hidden mode ObjShell.Run "cmd /c setup.exe",0 'A small sleep is required here, because the process doesn't exist if we go too fast ahead. Wscript.Sleep 1000 'Here comes the WMI query Dim objWMIService : Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") 'In the end of the line comes the process name Dim colItems : Set colItems = objWMIService.ExecQuery("Select * From Win32_Process Where Name = 'setup.exe'") Dim intCount : intCount = colItems.Count 'Loop until the setup.exe process count is bigger than 0 Do While intCount > 0 Set colItems = objWMIService.ExecQuery("Select * From Win32_Process Where Name = 'setup.exe'") intCount = colItems.Count Wscript.Sleep 3000 Loop Set colItems = Nothing Set intCount = Nothing Set objWMIService = Nothing End Sub[/code] I didn't test the sample code here, but you can get it to work with a little modification. Edited September 19, 2007 by geezery 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