Important: Please read the Qt Code of Conduct -

Get Remote PC Information with just smb access

  • I have access to a remote machine. I can work properly with the remote machine file system. Now, I wanted to extract some information about the remote machine. For example, architecture, operating system, os version, uptime, and so on. How can I get these kind of information from the remote machine?

    With following code, I could just resolve domain name and also the IP address of the remote machine. Now I wanted to extract more information about the remote machine.

    PcInformation::PcInformation(QWidget *parent) : QMainWindow(parent), ui(new Ui::PcInformation)
        QWidget::setFixedSize(540, 235);
        QString computerTargetName = QApplication::arguments().at(1);
        f_hostAddress = QHostInfo::fromName(computerTargetName).addresses().first();
        f_hostName = computerTargetName;
        f_hostArchitecture = "x64";

  • Lifetime Qt Champion

    This is not possible with Qt. You have to use to OS API for this.

  • Lifetime Qt Champion


    Beside @Christian-Ehrlicher's point, AFAIK, SMB is a network protocol for file and print services so how are you executing your application ?

  • you'd have to create a scheduled task on the target machine that saves the information to a file, and then you can use SMB to pull that file.

Log in to reply