Re: Where do I start?
Re: Where do I start?
- Subject: Re: Where do I start?
- From: Allan Marcus <email@hidden>
- Date: Fri, 5 Mar 2010 17:26:49 -0700
Go it!
I still think Apple needs some docs and some examples.
Here's how I am checking to see if an app is running:
1) In the requirements tab I add a new requirement
2) In the "If" dropdown I select "Result of JavaScript"
3) for the function: I enter: app_check('Firefox')
4) In the script repository I enter:
function app_check(str_to_check) {
var my_apps = system.applications.all();
var len = my_apps.length;
for(var i = 0; i < len; i++) {
var app_value = my_apps[i];
if (app_value['BundlePath'] != undefined) {
if(app_value['BundlePath'].indexOf(str_to_check) !=-1 ) {
return false;
}
}
}
return true;
}
5) I set the error message to the appropriate value.
This check works in both the GUI and the CLI, so it will stop a silent install too. Monday I will test with puppet and I'm hopeful this will work.
It would be nice if the install would give the user a chance to rectify the situation by giving the user the opportunity to quit the program in question. Any idea on how to do that?
Thanks,
Allan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden