PDA

View Full Version : QProcces and smbclient



drake1983
11th December 2007, 22:33
Hi everybody.

I am doing a simple app that look for shared folders in a remote computer, using QProcess class to launch the smbclient process.

When I execute in a system console the following command:

smbclient -L IP -U student%1234567

where IP is the computer address, student is the user on the remote computer, and 1234567 his password to access it, I get a list of shared resources, otherwise, with the following code in QT4:


QStringList params;
params <<"-L" << lineEdit->text()<<"-U student%1234567" ;
miProceso->start("smbclient",parametros);


I got just a session setup failed: NT_STATUS_LOGON_FAILURE .
lineEdit is used to enter manually the IP address of the computer.
miProceso is an object of type QProcess.

Some help would be fine.

Regards!

high_flyer
12th December 2007, 09:21
try adding spaces:

params <<"-L " << lineEdit->text()<<" -U student%1234567" ;

drake1983
12th December 2007, 19:23
Thanks,

Now It works:


params <<"-L" << lineEdit->text()<<"-U"<<"student%1234567" ;