473,396 Members | 1,898 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,396 software developers and data experts.

not able to run the Process

Hi guys,
it's me again. today i'm trying the "Process" class.
I'm trying to uninstall one product developed by my company thorugh
..net code but it seems not working but when i execute the commandline
MSI uninstall command it seems working fine. the code i'm using is:

System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.CreateNoWindow = true;
p.StartInfo.FileName =
Path.GetFullPath(System.Environment.GetEnvironment Variable("WINDIR") +
"/system32/msiexec.exe");//Environment.GetEnvironmentVariable("WINDIR")+
"/system32/msiexec.exe";
p.StartInfo.Arguments = "/uninstall " + new
FileInfo(powerlearn.MSIPath).Name + " /qn";
p.Start();
p.WaitForExit();
whenever i execute the code, it does nothing. i mean i tried to debug
this code but when i came to "p.WaitForExit();" and i pressed the F10
it moved to another line without waiting process to be completed. seems
that process is somehow not able to run.

can anyone help me out from this problem? any other solution is also
welcome.

Tools:
c#.net 2.0 (VS.NET 2005)
Thanks,
Lucky

Aug 24 '06 #1
2 1257
I forgot to add some information.

when i start the process it exits in a second and returns ExitCode :
1619

i hope it would help more.

thanks again,
Lucky

Aug 24 '06 #2
Hi guys,

it's again me. i found the solution of my problem.
there are to ways to do it.

1) in the Arguments pass the fullname of the FileInfo object rather
then only file name
2) keep the code as it is and change the directory to file directory
where the file is, before this code.

it is all about telling msi the full path of the s/w msi file. it
doesnt matter wihch way u do it. you only needs to tell it where is
that file.

by the way. thanks for reading.

Lucky

Aug 24 '06 #3

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

Similar topics

12
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am...
3
by: Ajay | last post by:
Hi Gurus, Here is my Problem I am not able to create the asp.net web application when ever i tried to create a new project i am getting the following error message. "Visual Studio .NET could...
1
by: Ajay | last post by:
Hi Gurus, Here is my Problem I am not able to create the asp.net web application when ever i tried to create a new project i am getting the following error message. "Visual Studio .NET could...
3
by: Lucky | last post by:
Hi guys, it's me again. today i'm trying the "Process" class. I'm trying to uninstall one product developed by my company thorugh ..net code but it seems not working but when i execute the...
1
by: moondaddy | last post by:
I had to repost this becuase I renewed-changed my msdn alias. Also, the asnwer in the other past did not understand what I'm trying to do, so I'll attempt to clarify. I have a .net 2.0 winforms...
0
by: narayan2586 | last post by:
Hi all, When ever i am trying to connect my application it's giving below error message: RemoteException occurred in server thread; nested exception is: java.rmi.RemoteException: ; nested...
1
by: Wazza | last post by:
G'Day, I have a re-occurring problem and wish to design a framework or pattern to address it. I have some Ideas but I would like to do some brainstorming with my peers before commencing. The...
14
by: masaniparesh | last post by:
Hi Friends, The basic issue is "To read stdin and stdout in the same program" The following program is i have wrote using thread but i figured out that stdout is working but it is not working when...
2
by: jrkarthi | last post by:
dim con As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=C:\KarthI\sample\db1\WindowsApplication1\WindowsApplication1\bin\Debug\phm_pharmacy.mdf;Integrated Security=True;Connect...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...

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.