Results 1 to 6 of 6

Thread: Problem with qprocess and Path

  1. #1
    Join Date
    Sep 2011
    Posts
    6
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Post Problem with qprocess and Path

    Hi all

    I am new to Qt. I have a question:

    I'm trying to convert a string like this type path C: / Dir1/Dir2/Dir3
    in a chain like this C: \ \ Dir1 \ \ dir2 \ \ dir3 as I can tell it to qprocess then that is the path from where I launch the executable

    where path has to be of this type C: \ \ Dir1 \ \ dir2 \ \ dir3 and what I get is
    C: / Dir1/Dir2/Dir3



    processDes.setWorkingDirectory (path);

    Process.Start ("msiexec.exe", QStringList () <<"/ qf" <<"/ uninstall" <<"openofficeorg31.msi");

    When I launch the process Uninstaller window opens but when I close.

    Someone could help me with this?

    Thank you.

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem with qprocess and Path

    When I launch the process Uninstaller window opens but when I close.
    What is this I dont even...?

    Someone could help me with this?
    Sure. What is your problem?

  3. #3
    Join Date
    Sep 2011
    Posts
    6
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Post Re: Problem with qprocess and Path

    My problem is that when I launch the uninstallation openoffice.msi get to launch msiexec.exe windows but when you close the window and do not get to launch the execution of openoffice.msi. I do not know what could be the problem.

    What I need is to uninstall OpenOffice on Windows, given that the path where the msi file to uninstall manager is stored in a route format C: / Temp/dir2. I have read that in order to pass as parameter the path to qprocess must be formatted C: \ \ temp \ \ Dir First need in me to become a function in C: / temp / Dir to C: \ \ temp \ \ Dir launch and achieve with qprocess uninstalling openoffice.

    I would appreciate any input or help. Thank you.

  4. #4
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem with qprocess and Path


  5. #5
    Join Date
    Sep 2011
    Posts
    6
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Problem with qprocess and Path

    Thank your for your request.

    Now I have to solve the problem I have with qprocess and msiexec.exe to uninstall the application.

    This is the code I have but when I run the msiexec.exe msiexec.exe with the parameters, QStringList () <<"/ qf" <<"/ uninstall" <<"openofficeorg31.msi" opens the window but msiexec.exe is closed immediately, and I dont know the solution.

    I've tried this but I do not get it to work.

    / / path where is the openoffice31.msi
    processDes.setWorkingDirectory ("c: \ \ Temp \ \ sctag \ \ EXPLODE \ \ Oone");

    Process.Start ("msiexec.exe", QStringList () <<"/ qf" <<"/ uninstall" <<"openofficeorg31.msi");

    I need any help to you for your help and interest.

  6. #6
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem with qprocess and Path

    if you try to run msiexec from normal console, does it work properly?


    The only thing I can suggest is to try QProcess::startDetached(...), as I have found sometimes this works when start(...) does not.

Similar Threads

  1. Replies: 3
    Last Post: 25th August 2010, 12:39
  2. Replies: 5
    Last Post: 3rd February 2010, 23:50
  3. macdeployqt path problem
    By abey in forum Installation and Deployment
    Replies: 0
    Last Post: 10th December 2009, 10:46
  4. Replies: 8
    Last Post: 17th October 2009, 08:10
  5. Replies: 1
    Last Post: 7th April 2008, 15:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.