In an application I\'m making I need to run the following command as root (user will be prompted trice if they really want to, and they will be asked to unmount their drives) using NSTask:
I am making a small app that deletes log files. I am using an NSTask instance which runs rm and srm (secure rm) to delete files.
I need to run an .sh file and get its output. I need to see the setup of the file as well. The .sh fil开发者_Go百科e simply runs a java app through terminal.
I\'m in the process of converting 开发者_Python百科AMShellWrapper to my own application that runs an SH file that has userinput. Therefore, I need to send data to a running task.
Here is the error: Exception in thread \"main\" java.lang.NoClassDefFoundError: org/alicebot/server/net/AliceServer
This question already has answers here: How to use NSTask as root? (5 answers) 开发者_如何学Go Closed 6 years ago.
Here is my code: task = [[NSTask alloc] init]; [task setCurrentDirectoryPath:@\"/applications/jarvis/brain/\"];
I\'m looking for a way to create a GUI (using Cocoa) to make a command-line utility more accessible to some of my colleagues. If you use NSTask to execute/start the utility, can you开发者_开发问答 the
This is a very simple question. I have a script in the same folder as the 开发者_开发知识库Cocoa app. I can\'t seem to set the path to it properly for setLaunchPath for NSTask. Help please.
Basically I\'ve passed a script in the terminal through /bin/bash \"[path]\" or /bin/sh \"[path]\", and I\'ve passed commands in a termina开发者_开发技巧l through /bin/bash -c \"[command]\" or /bin/sh