When I use the Shell command to start a OS X program (plus the required parameters), the Shell returns an error.
bash: /Users/paul/Desktop/NCReportConsole/NCReport.app: is a directory
I have to use the package contents of the application to make it work.
/Users/paul/Desktop/NCReportConsole/NCReport.app/Contents/MacOS/NCReport
Source code:
nShell is defined as a public Shell property.
Dim p As String
Dim oFile As String = "/Users/paul/Desktop/test.pdf"
p = "-f /Users/paul/Reports/test.ncr -c Test_rpt -q QSQLITE -d /Users/paul/Reports/Databases/Test.db -o pdf -of " + oFile
'Dim f As folderitem = New folderitem("/Users/paul/Desktop/NCReportConsole/NCReport.app/Contents/MacOS/NCReport", FolderItem.PathTypeNative) // Works
Dim f As folderitem = New folderitem("/Users/paul/Desktop/NCReportConsole/NCReport.app", FolderItem.PathTypeNative) // Does not work
Dim a As String = f.ShellPath
nShell = New Shell
nShell.Mode = 0
nShell.Execute (a, p)
I have also tried to use open in shell command, but that give error: open: “invalid option – c”.
nShell.Execute ("open " + a, p)
Is there a way to use the application with the Shell command or is using the package content the only way?