473,721 Members | 2,186 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Diagnostics.Pro cess & MSIEXEC problem...

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

C:\Windows\Syst em32\MSIEXEC.EX E /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B} /q

..FileName = "C:\Windows\Sys tem32\MSIEXEC.E XE"
..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\Syst em32\MSIEXEC.EX E /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.Pro cess approach? Obviously
the product does indeed exists.

Rob.

P.S. - this is basically uninstalling a product (
Jul 20 '06 #1
5 7125
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 ProcessStartInf o = New ProcessStartInf o
pi.FileName = "regedit"
pi.Arguments = "/S C:\yourRegFile. reg"
p.StartInfo = pi
p.Start()
///

I hope this helps,

Cor
"Rob R. Ainscough" <ro*****@pacbel l.netschreef in bericht
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
I'm using the Diagnostics.Pro cess approach to shelling out run the
following:

C:\Windows\Syst em32\MSIEXEC.EX E /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B}
/q

.FileName = "C:\Windows\Sys tem32\MSIEXEC.E XE"
.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\Syst em32\MSIEXEC.EX E /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.Pro cess 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******** ******@TK2MSFTN GP05.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 ProcessStartInf o = New ProcessStartInf o
pi.FileName = "regedit"
pi.Arguments = "/S C:\yourRegFile. reg"
p.StartInfo = pi
p.Start()
///

I hope this helps,

Cor
"Rob R. Ainscough" <ro*****@pacbel l.netschreef in bericht
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
>I'm using the Diagnostics.Pro cess approach to shelling out run the
following:

C:\Windows\Sys tem32\MSIEXEC.E XE /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B}
/q

.FileName = "C:\Windows\Sys tem32\MSIEXEC.E XE"
.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\Sys tem32\MSIEXEC.E XE /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.Pro cess 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\syst em32\MSIEXEC.EX E ===
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 'DisableUserIns talls'
is 0
MSI (s) (30:64) [14:39:46:750]: MainEngineThrea d 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]: MainEngineThrea d 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******** ******@TK2MSFTN GP05.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 ProcessStartInf o = New ProcessStartInf o
pi.FileName = "regedit"
pi.Arguments = "/S C:\yourRegFile. reg"
p.StartInfo = pi
p.Start()
///

I hope this helps,

Cor
"Rob R. Ainscough" <ro*****@pacbel l.netschreef in bericht
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
>I'm using the Diagnostics.Pro cess approach to shelling out run the
following:

C:\Windows\Sys tem32\MSIEXEC.E XE /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B}
/q

.FileName = "C:\Windows\Sys tem32\MSIEXEC.E XE"
.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\Sys tem32\MSIEXEC.E XE /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.Pro cess 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******** ******@TK2MSFTN GP05.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 ProcessStartInf o = New ProcessStartInf o
pi.FileName = "regedit"
pi.Arguments = "/S C:\yourRegFile. reg"
p.StartInfo = pi
p.Start()
///

I hope this helps,

Cor
"Rob R. Ainscough" <ro*****@pacbel l.netschreef in bericht
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
>I'm using the Diagnostics.Pro cess approach to shelling out run the
following:

C:\Windows\Sys tem32\MSIEXEC.E XE /x {73F1BDB7-11E1-11D5-9DC6-00C04F2FC33B}
/q

.FileName = "C:\Windows\Sys tem32\MSIEXEC.E XE"
.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\Sys tem32\MSIEXEC.E XE /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.Pro cess 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*****@pacbel l.netschreef in bericht
news:%2******** ********@TK2MSF TNGP04.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******** ******@TK2MSFTN GP05.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 ProcessStartInf o = New ProcessStartInf o
pi.FileName = "regedit"
pi.Arguments = "/S C:\yourRegFile. reg"
p.StartInfo = pi
p.Start()
///

I hope this helps,

Cor
"Rob R. Ainscough" <ro*****@pacbel l.netschreef in bericht
news:%2******* *********@TK2MS FTNGP02.phx.gbl ...
>>I'm using the Diagnostics.Pro cess approach to shelling out run the
following:

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

.FileName = "C:\Windows\Sys tem32\MSIEXEC.E XE"
.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\Sy stem32\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.Pro cess 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
3059
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. Now that works fine so far. My problem is that while tracert process is running and ASP ..NET is putting data into the pages output stream, my webapplication is locked until tracert process exits. How can I stop locking my application and be...
2
5826
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 the processes running on one machine on the network. I always get the following error: System.InvalidOperationException: Couldn't get process information from
5
4187
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 app. I get the error message: Can't find file! ??? I need to start appxxx from the ASP.NET app! -- Folke
11
3751
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 simple batch file (echo hello world) and was trying to retrieve the standard output but every time I run the code it returns ExitCode as 1.
1
5511
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: System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo.Arguments = sArgs; proc.StartInfo.FileName = "msiexec.exe"; proc.StartInfo.WorkingDirectory = sPath; proc.Start();
0
1057
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 (SQL). When the executable resides on the same server as my application the import works fine. When my application is executed a new text file is created in the folder listed below. The process arguments ent=1 and store=1 know to look in...
1
5012
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 expected: try { MapInfo.Engine.Session.Current.Catalog.OpenTable(@"C:
0
3018
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 where and how can I adjust the buffer size problem. I don't want to be limited to a set buffer size, is that possible? thank you. public static int GetNisFile(System.Diagnostics.ProcessStartInfo psi, ref DataTable dtAccounts, ref...
2
6875
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 program. That works for 95 %, but the other 5 % it doesn't. It seems to me that the started process just hangs, and therefor my program hangs, too (p.WaitForExit()). I researched that this only happens when the output of the program is longer than...
0
8840
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9367
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9131
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8007
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5981
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4484
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4753
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3189
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.