Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6536549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:30:23+00:00 2026-05-25T10:30:23+00:00

I have an app with which i can select from multiple MSI’s (same msi,

  • 0

I have an app with which i can select from multiple MSI’s (same msi, different versions) in a directory, and i will be able to install or uninstall from this app.

I pull in the list of MSI’s, complete with full path, with

string MSILocation = @"C:\test\";
string[] MSIFiles = Directory.GetFiles(MSILocation, "*.MSI", SearchOption.TopDirectoryOnly);

From here i populate a listview, and once one is selected i hit the install button.
But when i go through my installing code, the verbatim seems to screw up.

string MSIname = lboMSIList.SelectedItem.ToString();
Process p = new Process();
p.StartInfo.FileName = "MSIEXEC.EXE";
p.StartInfo.Arguments = @"/i " + MSIname;
p.Start();

Even though the listview shows the file with single / the end result always comes out with double /

Somewhere in there its losing the literal string.

If i change the code up and run .FileName = @”msiexec.exe /i C:\test\test1.msi” it works just fine, but i need to be able to select from a list of filenames.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:30:24+00:00Added an answer on May 25, 2026 at 10:30 am
    string MSILocation = @"C:\test\"; 
    string[] MSIFiles = Directory.GetFiles(MSILocation, "*.*", SearchOption.TopDirectoryOnly).Select(f => Path.GetFileName(f)).ToArray();  
    

    use above MSIFiles array of file names to populate the listview

    Use Path.combine as below

    string MSILocation = @"C:\test\";
    string MSIname = lboMSIList.SelectedItem.ToString();
    Process p = new Process();  
    p.StartInfo.FileName = "MSIEXEC.EXE"; 
    p.StartInfo.Arguments = string.Format(
    "{0} {1}", @"/i",Path.Combine(MSILocation , MSIname );  
    p.Start(); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app which could benefit from the user being able to choose
I have a widget containing multiple child objects, which the user can select by
I have a small app which references the Microsoft.SqlServer.Smo assembly (so I can display
I have a .exe app which I want to understand better - I can
I have an app which consists of several different assemblies, one of which holds
I have the following code from a legacy app which currently reads from an
I have wxPython app which is running on MS Windows and I'd like it
I have an app which uses a keyboard hook procedure in a library. The
I have an app which is quite huge. It has tons of images and
I have an app which acts almost like a daemon. Sometimes it quits on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.