473,320 Members | 1,909 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Diagnostics.Process & MSIEXEC problem...

I'm using the Diagnostics.Process approach to shelling out run the
following:

C:\Windows\System32\MSIEXEC.EXE /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B} /q

..FileName = "C:\Windows\System32\MSIEXEC.EXE"
..Arguments = "/x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B} /q"
..Start()

I do a WaitForExit and get an error code back from MSIEXEC of 1605 -- this
means product not installed. So I go into the registry to locate the
produce code and verify that it does indeed exist. Since I'm baffled as to
why shell ot MSIEXEC would return this error when the product IS installed,
I decide to try Start | Run and enter the exact same:

C:\Windows\System32\MSIEXEC.EXE /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B} /q

and it works!!? So now, I'm really baffled.

So why is does this NOT work using Diagnostics.Process approach? Obviously
the product does indeed exists.

Rob.

P.S. - this is basically uninstalling a product (
Jul 20 '06 #1
5 7095
Rob,

As this is your total code than it is definitly wrong because you are not
adding the ProsesStartInfo to the proces..

See this sample to open regedit.

\\\Registry
Dim p As New Process
Dim pi As ProcessStartInfo = New ProcessStartInfo
pi.FileName = "regedit"
pi.Arguments = "/S C:\yourRegFile.reg"
p.StartInfo = pi
p.Start()
///

I hope this helps,

Cor
"Rob R. Ainscough" <ro*****@pacbell.netschreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
I'm using the Diagnostics.Process approach to shelling out run the
following:

C:\Windows\System32\MSIEXEC.EXE /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B}
/q

.FileName = "C:\Windows\System32\MSIEXEC.EXE"
.Arguments = "/x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B} /q"
.Start()

I do a WaitForExit and get an error code back from MSIEXEC of 1605 -- this
means product not installed. So I go into the registry to locate the
produce code and verify that it does indeed exist. Since I'm baffled as
to why shell ot MSIEXEC would return this error when the product IS
installed, I decide to try Start | Run and enter the exact same:

C:\Windows\System32\MSIEXEC.EXE /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B}
/q

and it works!!? So now, I'm really baffled.

So why is does this NOT work using Diagnostics.Process approach?
Obviously the product does indeed exists.

Rob.

P.S. - this is basically uninstalling a product (

Jul 20 '06 #2
Cor,

I didn't post all my code, just the critical parts. The start process is
working fine as MSIEXEC is returning 1605 error code. I'm going to try to
log the MSIEXEC output but according to Microsoft 1605 means "This action is
only valid for products that are currently installed."

What has me really puzzled is the exact same command entered via Start | Run
works fine. There must be some undocumented "feature" of the Process or
something? I've talked to other developers that have received the 1605 from
MSIEXEC when it had nothing to do with the actual error.

Thanks, Rob
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:et**************@TK2MSFTNGP05.phx.gbl...
Rob,

As this is your total code than it is definitly wrong because you are not
adding the ProsesStartInfo to the proces..

See this sample to open regedit.

\\\Registry
Dim p As New Process
Dim pi As ProcessStartInfo = New ProcessStartInfo
pi.FileName = "regedit"
pi.Arguments = "/S C:\yourRegFile.reg"
p.StartInfo = pi
p.Start()
///

I hope this helps,

Cor
"Rob R. Ainscough" <ro*****@pacbell.netschreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I'm using the Diagnostics.Process approach to shelling out run the
following:

C:\Windows\System32\MSIEXEC.EXE /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B}
/q

.FileName = "C:\Windows\System32\MSIEXEC.EXE"
.Arguments = "/x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B} /q"
.Start()

I do a WaitForExit and get an error code back from MSIEXEC of 1605 --
this means product not installed. So I go into the registry to locate
the produce code and verify that it does indeed exist. Since I'm baffled
as to why shell ot MSIEXEC would return this error when the product IS
installed, I decide to try Start | Run and enter the exact same:

C:\Windows\System32\MSIEXEC.EXE /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B}
/q

and it works!!? So now, I'm really baffled.

So why is does this NOT work using Diagnostics.Process approach?
Obviously the product does indeed exists.

Rob.

P.S. - this is basically uninstalling a product (


Jul 20 '06 #3
This is what the MSIEXEC logging produced:

=== Verbose logging started: 7/20/2006 14:39:46 Build type: SHIP UNICODE
3.01.4000.2435 Calling process: C:\WINDOWS\system32\MSIEXEC.EXE ===
MSI (c) (A8:80) [14:39:46:625]: Resetting cached policy values
MSI (c) (A8:80) [14:39:46:625]: Machine policy value 'Debug' is 0
MSI (c) (A8:80) [14:39:46:625]: ******* RunEngine:
******* Product: {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B}
******* Action:
******* CommandLine: **********
MSI (c) (A8:80) [14:39:46:625]: Client-side and UI is none or basic: Running
entire install on the server.
MSI (c) (A8:80) [14:39:46:640]: Grabbed execution mutex.
MSI (c) (A8:80) [14:39:46:671]: Cloaking enabled.
MSI (c) (A8:80) [14:39:46:671]: Attempting to enable all disabled priveleges
before calling Install on Server
MSI (c) (A8:80) [14:39:46:687]: Incrementing counter to disable shutdown.
Counter after increment: 0
MSI (s) (30:90) [14:39:46:734]: Grabbed execution mutex.
MSI (s) (30:64) [14:39:46:734]: Resetting cached policy values
MSI (s) (30:64) [14:39:46:734]: Machine policy value 'Debug' is 0
MSI (s) (30:64) [14:39:46:734]: ******* RunEngine:
******* Product: {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B}
******* Action:
******* CommandLine: **********
MSI (s) (30:64) [14:39:46:734]: Machine policy value 'DisableUserInstalls'
is 0
MSI (s) (30:64) [14:39:46:750]: MainEngineThread is returning 1605
MSI (c) (A8:80) [14:39:46:765]: Decrementing counter to disable shutdown. If
counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (A8:80) [14:39:46:765]: MainEngineThread is returning 1605
=== Verbose logging stopped: 7/20/2006 14:39:46 ===

Not helpful at all.

Rob.

"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:et**************@TK2MSFTNGP05.phx.gbl...
Rob,

As this is your total code than it is definitly wrong because you are not
adding the ProsesStartInfo to the proces..

See this sample to open regedit.

\\\Registry
Dim p As New Process
Dim pi As ProcessStartInfo = New ProcessStartInfo
pi.FileName = "regedit"
pi.Arguments = "/S C:\yourRegFile.reg"
p.StartInfo = pi
p.Start()
///

I hope this helps,

Cor
"Rob R. Ainscough" <ro*****@pacbell.netschreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I'm using the Diagnostics.Process approach to shelling out run the
following:

C:\Windows\System32\MSIEXEC.EXE /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B}
/q

.FileName = "C:\Windows\System32\MSIEXEC.EXE"
.Arguments = "/x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B} /q"
.Start()

I do a WaitForExit and get an error code back from MSIEXEC of 1605 --
this means product not installed. So I go into the registry to locate
the produce code and verify that it does indeed exist. Since I'm baffled
as to why shell ot MSIEXEC would return this error when the product IS
installed, I decide to try Start | Run and enter the exact same:

C:\Windows\System32\MSIEXEC.EXE /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B}
/q

and it works!!? So now, I'm really baffled.

So why is does this NOT work using Diagnostics.Process approach?
Obviously the product does indeed exists.

Rob.

P.S. - this is basically uninstalling a product (


Jul 20 '06 #4
Ok, the plot thicken's

Addendum:

The root of the problem seems to steam my Windows Service (interacts with
desktop is checked) shell. Here is the sequence:

DUSM.EXE (my Windows Service running un LocalSystem with "interact with
desktop" enabled)
DUSM performs a Process.Start which loads DUSM_UI.EXE
DUSM_UI.EXE performs a Process.Start which runs the MSIEXEC (see below)
Results: 1605 error (this appears to be a bogus error reported by MSIEXEC
but product does NOT uninstall)

Since DUSM_UI.EXE is a stand alone program I can run it directly (double
click in Explorer)
run DUSM_UI.EXE (from explorer) which performs a Process.Start which runs
MSIEXEC
Results: 0 (no errors and MSIEXEC performs the uninstall)

So this looks like some type of thread restriction being imposed on MSIEXEC
when its source thread path originates from a Windows Service.

The $64,000 question -- how can I work around this problem? My DUSM service
MUST be the originator of these tasks, what are my options? Where do I even
start to look for answers?

Rob.
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:et**************@TK2MSFTNGP05.phx.gbl...
Rob,

As this is your total code than it is definitly wrong because you are not
adding the ProsesStartInfo to the proces..

See this sample to open regedit.

\\\Registry
Dim p As New Process
Dim pi As ProcessStartInfo = New ProcessStartInfo
pi.FileName = "regedit"
pi.Arguments = "/S C:\yourRegFile.reg"
p.StartInfo = pi
p.Start()
///

I hope this helps,

Cor
"Rob R. Ainscough" <ro*****@pacbell.netschreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I'm using the Diagnostics.Process approach to shelling out run the
following:

C:\Windows\System32\MSIEXEC.EXE /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B}
/q

.FileName = "C:\Windows\System32\MSIEXEC.EXE"
.Arguments = "/x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B} /q"
.Start()

I do a WaitForExit and get an error code back from MSIEXEC of 1605 --
this means product not installed. So I go into the registry to locate
the produce code and verify that it does indeed exist. Since I'm baffled
as to why shell ot MSIEXEC would return this error when the product IS
installed, I decide to try Start | Run and enter the exact same:

C:\Windows\System32\MSIEXEC.EXE /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B}
/q

and it works!!? So now, I'm really baffled.

So why is does this NOT work using Diagnostics.Process approach?
Obviously the product does indeed exists.

Rob.

P.S. - this is basically uninstalling a product (


Jul 20 '06 #5
Rob,

Did you try it already as a simple winform program. AFAIK can a
windowservice in Net not standard connect to the UI (what the shell in fact
is)

Cor

"Rob R. Ainscough" <ro*****@pacbell.netschreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
Cor,

I didn't post all my code, just the critical parts. The start process is
working fine as MSIEXEC is returning 1605 error code. I'm going to try to
log the MSIEXEC output but according to Microsoft 1605 means "This action
is only valid for products that are currently installed."

What has me really puzzled is the exact same command entered via Start |
Run works fine. There must be some undocumented "feature" of the Process
or something? I've talked to other developers that have received the 1605
from MSIEXEC when it had nothing to do with the actual error.

Thanks, Rob
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:et**************@TK2MSFTNGP05.phx.gbl...
>Rob,

As this is your total code than it is definitly wrong because you are not
adding the ProsesStartInfo to the proces..

See this sample to open regedit.

\\\Registry
Dim p As New Process
Dim pi As ProcessStartInfo = New ProcessStartInfo
pi.FileName = "regedit"
pi.Arguments = "/S C:\yourRegFile.reg"
p.StartInfo = pi
p.Start()
///

I hope this helps,

Cor
"Rob R. Ainscough" <ro*****@pacbell.netschreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
>>I'm using the Diagnostics.Process approach to shelling out run the
following:

C:\Windows\System32\MSIEXEC.EXE /x
{73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B} /q

.FileName = "C:\Windows\System32\MSIEXEC.EXE"
.Arguments = "/x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B} /q"
.Start()

I do a WaitForExit and get an error code back from MSIEXEC of 1605 --
this means product not installed. So I go into the registry to locate
the produce code and verify that it does indeed exist. Since I'm
baffled as to why shell ot MSIEXEC would return this error when the
product IS installed, I decide to try Start | Run and enter the exact
same:

C:\Windows\System32\MSIEXEC.EXE /x
{73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B} /q

and it works!!? So now, I'm really baffled.

So why is does this NOT work using Diagnostics.Process approach?
Obviously the product does indeed exists.

Rob.

P.S. - this is basically uninstalling a product (



Jul 21 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Heiko Besemann | last post by:
Dear group, I created an aspx page using System.Diagnostics.Process() to launch "tracert" from shell and redirect output to Response.Output which prints it as text/plain into my browsers window....
2
by: XxLicherxX | last post by:
Hello, I tried posting this in a different VB.net newsgroup, but never got a response. Please let me know if there is a better group to post this in. Thanks. For some reason I cannot look at...
5
by: folke | last post by:
I'm using the Process class in my app to start another app, appXXX, I wrote. Appxxx is located at c:\folke\appxxx.exe This is wroking fine from a Windows Application, but NOT from an ASP.NET...
11
by: Nurit N | last post by:
This is the third newsgroup that I'm posting my problem. I'm sorry for the multiple posts but the matter becoming urgent. I hope this is the right place for it... I have created a very...
1
by: tenpsa | last post by:
Hi, I have a C# application that uses the System.Diagnostics.Process functionality to execute other processes (to install a couple of .msi files). Here's my code so far: ...
0
by: Will Asrari | last post by:
In my code I have created a Process for opening up a command line executable using System.Diagnostics.Process that imports a csv full of Generic Authorization account information to numerous tables...
1
by: Matthew Lock | last post by:
Hello, I get some strange behaviour after calling a method on a third party library when I call: System.Diagnostics.Process.GetCurrentProcess().StartTime If I run the following code it works as...
0
by: =?Utf-8?B?UHVjY2E=?= | last post by:
-- Hi I'm using vs2005, .net 2 for windows application. The application I started using System.Diagnostics.Process is having a "listFiles.StandardOutput" buffer size problem. I was wondering...
2
by: test3 | last post by:
Hello folks, I'm using System.Diagnostics.Process to start a thirdparty program (that works perfectly when started via command line). I'm using Process.StandardOutput to get the output of the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.