SQL Server Problems
-
- Posts: 155
- Joined: Mon Nov 12, 2007 11:59 am
SQL Server Problems
I want to run some batch files through installaware after my install but even with the wait till program finishes check box checked it does not wait untill the batch file is completely done. I was wondering if there was a way in the command line to tell install-aware to wait for a certian amount of time till moving on to the next object so that it can properly process the batch file.
Last edited by Roostar2004 on Mon Dec 03, 2007 3:07 pm, edited 1 time in total.
-
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
There is no way to tell IA to wait for a certain time. Unfortunatelly batch files have this strange behaviour sometimes. What you can do is write a loop in IA in between your batch files. In my experience every 1000 iterations is one second, however this may vary:
Code: Select all
Set Variable counter to 0
Set Variable delay to 10000
label: delay
if Variable counter not Equals $delay$
counter = $counter$ + 1
GoTo Label: delay
end
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 155
- Joined: Mon Nov 12, 2007 11:59 am
Any plans
Do you know what causes this strange behavior and or are you currently working to resolve this issue? I reason why I ask is I use the batch file to run an SQL script that we do not want our customer to have to run them selves. I have yet to test the code that you gave me but if we have to do it that way then we have to set the time limit to what the slowest computer would process. Do you see where I am going? If we have a customer install this on a real high power machine they still have to wait just as long as some one running a POS laptop which is something we don't really want to do.
-
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
It is not a problem in IA, it is actually the batch files what cause this. I understand your point, but there is not much we can do about it. If you need to run an SQL script, let me recommend you the MS SQL Server plug-in. It is available for this kind of situations.
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 155
- Joined: Mon Nov 12, 2007 11:59 am
Do you know what in the batch files causes this? This is one of the batch files I am trying to run.
File Attached:
DBSetup.bat
File Attached:
DBSetup.bat
-
- Posts: 155
- Joined: Mon Nov 12, 2007 11:59 am
Alex_Ronquillo wrote:Code: Select all
Set Variable counter to 0
Set Variable delay to 10000
label: delay
if Variable counter not Equals $delay$
counter = $counter$ + 1
GoTo Label: delay
end
I can not enter your code into the MSI Code as is.
1. the MSI code will not let me enter "counter = $counter$ + 1" as it is not in the predefined list.
2. I get an error stating that a label cannot be inserted into loops/conditionals. Where am I suposed to put this? I also get this error if I put the label in it's own script.
-
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
the MSI code will not let me enter "counter = $counter$ + 1" as it is not in the predefined list.
This is done with the Mathematics command.
I get an error stating that a label cannot be inserted into loops/conditionals. Where am I suposed to put this? I also get this error if I put the label in it's own script.
Make sure you don't include this code inside an IF...End statement. It is not allowed. Find a way to include it outside the IF.
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 66
- Joined: Fri Mar 09, 2007 9:46 am
- Location: Albany, NY
- Contact:
Are you sure that waiting a set amount of time would be the best way to handle this? How will you know that the batch file will be finished in that time period? You want to use some sort of marker to indicate that the batch file has finished.
Can you modify that batch file to that the last thing it does is to write a file in the user's %TEMP% folder? Then you could have the IA script wait until that file exists before continuing. Then the script would remove the temp file, to clean up after itself. You would also want to make sure the file didn't exists before running the batch file.
Chris Miller
VersaTrans Solutions, Inc
Can you modify that batch file to that the last thing it does is to write a file in the user's %TEMP% folder? Then you could have the IA script wait until that file exists before continuing. Then the script would remove the temp file, to clean up after itself. You would also want to make sure the file didn't exists before running the batch file.
Chris Miller
VersaTrans Solutions, Inc
-
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
Chris,
Thank you for your suggestion. I think that is a much better approach Roostar2004, you should try it.
Thank you for your suggestion. I think that is a much better approach Roostar2004, you should try it.
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 155
- Joined: Mon Nov 12, 2007 11:59 am
SQL Server
Thanks for the suggestion Chris, but after several hours of trial and error I found out that one of my problems was that for some reason I had to run the file using "run program as" instead of "just run program". The next problem that I have run into is this:
In the SQL command line there is nothing that sets the service pack option of "Add user to the SQL Server Administration role" I am not sure if install-aware checks this option by default or not. If not then do you know how to tell install-aware to do it? So if I install SQL server sp2 with my program using install-aware the batch file does not run but if I pre-install SQL SP2 then the batch file runs. I was wondering if you have heard of anything causing this type of problem.
This is causing a lot of head aches as we are needing this new install set to ship to customers and would rather not have them have to install SQL on there own but have install-aware do it for us.
Some other setting that I would also like to know the installaware defaults are: Service account and Collation Settings. In the installaware runtimes there is no options for these even though they are options in the install itself.
Thank you.
In the SQL command line there is nothing that sets the service pack option of "Add user to the SQL Server Administration role" I am not sure if install-aware checks this option by default or not. If not then do you know how to tell install-aware to do it? So if I install SQL server sp2 with my program using install-aware the batch file does not run but if I pre-install SQL SP2 then the batch file runs. I was wondering if you have heard of anything causing this type of problem.
This is causing a lot of head aches as we are needing this new install set to ship to customers and would rather not have them have to install SQL on there own but have install-aware do it for us.
Some other setting that I would also like to know the installaware defaults are: Service account and Collation Settings. In the installaware runtimes there is no options for these even though they are options in the install itself.
Thank you.
Who is online
Users browsing this forum: No registered users and 70 guests