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 9128771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:35:36+00:00 2026-06-17T07:35:36+00:00

I trying to run net use \server_ip and parse result. Platform – Windows I

  • 0

I trying to run “net use \server_ip” and parse result. Platform – Windows

I have the following code:

QProcess *prc = new QProcess(0);
QString exec="net use";
QStringList params;
params << "\\\\" + getServerIP();
prc->start(exec,params);
qDebug() << "exec process";
prc->waitForFinished();
qDebug() << prc->readAll() << prc->exitStatus();;
delete connected;

But readAll() reurns “” and exitStatus() returns 0.

Do you guys have any suggestion?

  • 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-06-17T07:35:37+00:00Added an answer on June 17, 2026 at 7:35 am

    My suggestion would be to delete all of the above, and call WNetAddConnection1 instead.

    At least if I’m interpreting what you have above correctly, it seems to be a really roundabout version of something like this:

    WNetAddConnection(getServerIP(), NULL, NULL);
    

    If GetServerIP returns a QString, you may need to add a call to toAscii (or toLatin1, toLocal8Bit, etc.) to convert it to get something `WNetAddConnection knows how to deal with.


    1. Or WNetAddConnection2 or WNetAddConnection3. Microsoft officially recommends the latter, but you don’t seem to need any of the extra capabilities they provide.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to run an ASP.NET MVC 2 web application under IIS on Windows
I receive the following error when trying to run my ASP.NET MVC application: The
I am trying to run mvn install as described here: http://sourceforge.net/p/openimaj/wiki/OpenIMAJ%20From%20Source/ I have downloaded
Im trying to develop my first ASP.NET MVC web app and have run into
I am trying to use the JQGrid plugin and have run into an issue
Bellow is my code from asp.net service which is trying to run some external
I need to run .Net code in Sql and I'm trying to decide between
i am trying to run performance counters on a .NET application and i would
I am trying to run this SQL from ASP.NET 2005 but am getting an
I'm trying to integrate PartCover.NET with NAnt and CruiseControl.NET I can run PartCover.NET browser

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.