Running MSI in DUA script

O

Olie

I am trying to run an msi setup from a DUA script. I know from previous
threads that this is possible but none seem to give a solution to my
problem.

Basically the msi setup produces an error Microsoft Installer Service
not running. This is obviously because it is run before the services
have started but how do I get around this?

Here is the DUA script:

EXECUTEPROCESS, DAERH_ABORT,DANO,,c:\windows\msiexec.exe,,-i
"c:\Program Files\Avolites\Install\PearlExpertSetup.msi" -passive,DAYES

I am using Feature Pack 2007 Beta.
 
O

Oren Winter [MS]

Olie,
If this is indeed due to the service not starting (and you have MSI and its
dependencies on the image) - can you maybe try running first: "net start
msiserver" to see if this is just a timing issue?
Thanks,
Oren
 
O

Olie

Well I have msi and all its dependances but I do not have net.exe.

I will put this in the image and let you know how I get on.
 
K

KM

Olie,

Use sc.exe instead. It will bring less dependencies and would work more reliable when it comes to service status queries.
Also, sc.exe by QUERY command will give you a service status result in ERRORLEVEL environment variable. This will allow you to
automate the query and run it from a batch file. The same batch file can run your MSI install right after the required services
started.

To be completely honest, this all can be done through API called from a relatively small app. From the app code (preferably C/C++)
you can query the services status (Service Manager API) and do another logic that's required, e.g. CreateProcess on your MSI
install.
The benefit of such app is that you can make it to run in lower priority until the required services are up and running. This will
give the OS a better time slice to finish the boot quickly.
 
O

Olie

Thanks for the help! For the moment the net.exe command seems to work
and I do not have time to look at sc.exe, it does seem better though
and may look at it in the future.

I have another problem though, I was using EXECUTEPROCESS however this
runs the msi with insuficient permissions to access the msi service. So
I am not using EXECUTE, but I get this error in the DUAgent
"CreateProcessWithLogonW The specified service does not exist as an
installed service.".

Here is my script:

//Start the Microsoft installer service.
EXECUTEPROCESS,,,,c:\windows\system32\net.exe,,start msiserver,

//Install any New USB Expert Components
EXECUTE,,DANO,,c:\windows\system32\msiexec.exe,,-i "c:\Program
Files\Avolites\Install\UsbExpertSetup.msi"
-passive,DAYES,,,Administrator,,mymachine,,***,,,,c:\windows\system32\,DALOGONWITHPROFILE,,WinSta0\Default

//Install new software
EXECUTE,,DANO,,c:\windows\system32\msiexec.exe,,-i "c:\Program
Files\Avolites\Install\PearlExpertSetup.msi"
-passive,DAYES,,,Administrator,,mymachine,,***,,,,c:\windows\system32\,DALOGONWITHPROFILE,,WinSta0\Default

Any ideas why this is not working?
 
K

KM

Olie,

Do you have two follwoing service components added, installed and running at the time you laucn that DUA script:
"Windows Installer Service"
"RunAs Service"

IF any of the above is missing, this will give you the error you mentioned below.
 
O

Olie

Thanks

I have a new error now:

"An instance of the service is already running!"

This occurs whenever I use the EXECUTE command. It does not matter what
I try and run with it.
 
K

KM

Olie,

What did you change since your last post?
What EXECUTE command you are running now? Can you show us the latest script?
You can split the script into a few and debug what exactly command is screwed up.
 
O

Olie

Sorry, a little short on info!

I added the "RunAs Service" to my Embedded image. This then allowed the
line

EXECUTEPROCESS,,,,c:\windows\system32\net.exe,,start msiserver,

to run OK but the line

//Install new software
EXECUTE,,DANO,,c:\windows\system32\msiexec.exe,,-i "c:\Program
Files\Avolites\Install\PearlExpertSetup.msi"
-passive,DAYES,,,Administrator,,mymachine,,***,,,,c:\windows\system32\,DALOGONWITHP

fails with the error even if it is the only line in the script.
 
K

KM

Olie,

Unfortunately, I know nothing about the PearlExpertSetup.msi installer you are referring to in yoru script.
You should explore this component to see what it is trying to bring over and install on the target as a service.

Try to install the MSI manually and see if you can repro the same error. If you can, it will be much easier to track the problem
down.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top