• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to make an application non-executable?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to make an application non-executable?


  • Subject: How to make an application non-executable?
  • From: Bill Cheeseman <email@hidden>
  • Date: Fri, 16 Jul 2004 15:15:05 -0400

I'm looking for an easy way to make an application non-executable, for
example, by compressing or encrypting it. Any ideas?

Here's the scenario: I plan to distribute a "master" application inside a
"setup" application's bundle, to make one-file drag-installation possible.
The "setup" app will be run frequently because it isn't just an installer;
it serves other purposes, too. After drag-installing the "setup" app, the
user will run it, and it will make a copy of the "master" application and
install the copy in an appropriate location where third-party scripts or
applications will expect to find and launch it. The "setup" app will install
another copy of the "master" app any time it runs and finds that the
previous copy is missing. Sort of like Microsoft's "first run" self-healing
installation routine.

But I want to be sure that the "master" app remaining inside the "setup" app
is never executed, no matter what means is used to run the copy.

I'm worried that Cocoa's launch-by-filename methods might accidentally run
the "master" app; or, if I change the file name, that Cocoa's new
launch-by-identifier methods might launch the "master"; or that an
AppleScript 'tell' statement might launch the "master"; or, worst of all,
that some method I don't even know about might launch the "master."

One technique would be to make sure that the modification date of the copy
is always newer than the modification date of the "master" -- if I can
really count on the documentation, which seems to say that a newer
application is always run in preference to an older clone. Another technique
would be to change the file extension from ".app" to something else, but I'm
worried that launch-by-name or other routines might nevertheless launch it,
perhaps based on creator information inside its bundle or whatever. A
draconian technique would be to compress or encrypt the "master" -- but I
don't see any easy Cocoa (or Carbon, for that matter) compression or
encryption methods, and I don't want to have to learn how to write routines
to compress or encrypt it using a command-line tool (unless that is really
easy).

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: How to make an application non-executable?
      • From: Brent Gulanowski <email@hidden>
    • Re: How to make an application non-executable?
      • From: Scott Anguish <email@hidden>
    • Re: How to make an application non-executable?
      • From: m <email@hidden>
    • Re: How to make an application non-executable?
      • From: Mike Shields <email@hidden>
    • Re: How to make an application non-executable?
      • From: Ricky Sharp <email@hidden>
    • Re: How to make an application non-executable?
      • From: Todd Ransom <email@hidden>
    • Re: How to make an application non-executable?
      • From: Mario Diana <email@hidden>
    • Re: How to make an application non-executable?
      • From: Glenn Andreas <email@hidden>
    • Re: How to make an application non-executable?
      • From: Mario Diana <email@hidden>
  • Prev by Date: Re: owning the screen?
  • Next by Date: Re: cocoa-dev digest, Vol 2 #4493 - 14 msgs
  • Previous by thread: Re: Cocoa semantics
  • Next by thread: Re: How to make an application non-executable?
  • Index(es):
    • Date
    • Thread