My stay-open app won't work when added to startupitems

Hi, i have created stay open app and saved it as application bundle… Also, i have set in it’s plist file LSBackgroundonly property to 1, to make it invisible in dock. Than i have created folder in Library/StartupItems/iShoutmouthListener and put there my stay-application…

My sh file looks like this:
File: iShoutmouthListener

#!/bin/sh

. /etc/rc.common

StartService ()
{
#“/Users/misha/Desktop/untitled folder/iShoutmouth/iShoutmouth.app/Contents/MacOS/JavaApplicationStub” & “/Library/StartupItems/iShoutmouthListener/iShoutmouthListenerApp.app/Contents/MacOS/applet” &

}

StopService ()
{

ConsoleMessage "Stopping listener"	

}

RestartService ()
{
StopService
StartService
}

RunService “$1”

When i start program manually it works!!! When i uncomment line:
#“/Users/misha/Desktop/untitled folder/iShoutmouth/iShoutmouth.app/Contents/MacOS/JavaApplicationStub” &

it starts that application,
but it just won’t start on startup iShoutmouthListenerApp - stay-open script!! Why this?

Hi,

what’s about just adding the script the “old fahioned way” to StartupItems in SystemPrefs > Accounts,
or do you need it explicitly in all accounts?

Hi, thanks for your answer…

The thing is that i need to make an installer and then the installer puts items in StartupItems… Not for me only solution

I didn’t find out what is the problem so i put osascript-e ‘tell “MyApp” to activate’. This works, but in this case program is using more memory, but what i can do…