PDA

View Full Version : Problem Related to NSTask in Objective C




akhilgupta
Jun 23, 2011, 02:06 AM
hi everyone,
currently i m working with NSTask. And i want to execute "system_profiler -xml SPApplicationDataType" command in Terminal Application. Now i m able to execute Terminal application.But i m getting stuck at the point that...How i can write command on terminal window..

Thanks for any Reply

akhil



robbieduncan
Jun 23, 2011, 10:49 AM
Why do you want to execute it within a Terminal window rather than just executing the system_profiler task itself?

chown33
Jun 23, 2011, 11:54 AM
The first problem is that the command is wrong. You've misspelled part of it.

You gave this:
system_profiler -xml SPApplicationDataType

It should be this:
system_profiler -xml SPApplicationsDataType
The word Applications must end with an "s".

Manually enter this command in Terminal:
system_profiler -listDataTypes
then copy and paste the listed data type you want.