Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7089683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:57:07+00:00 2026-05-28T07:57:07+00:00

I have created a package using PackageMaker and want to change the default icon

  • 0

I have created a package using PackageMaker and want to change the default icon for .pkg file.
After some googling, seticon utility from here http://sveinbjorn.org/osxutils_docs solved my problem for all OSX-es except the latest Lion 10.7 (Kernel 11.0.0). The default icon was replaced by grey square insensitive for double clicks, looks like broken file association.

Additional two days googling gave me some knowledge about resource fork, SetFile(1) and some other useful staff like this old thread Changing icon of package created by package maker but still no luck.

I am trying to do something like:

target=pack.pkg

icon_filename="$(perl -e ‘print "Icon\r"’)"

touch "$target/..namedfork/rsrc/$icon_filename"

cp "Icon.icns" "$target/..namedfork/rsrc/$icon_filename"

/Developer/Tools/SetFile -a C "$target"

and getting:
build-Mac:pack.pkg/..namedfork/ not a directory.

What am I doing wrong? Does anyone can tell me the difference in resource fork in Lion? Any other script-able solution?

Please note, I am a total newbie in MACs and will appreciate a detailed answer for dummies.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:57:08+00:00Added an answer on May 28, 2026 at 7:57 am

    I have finally figured out it, in case of someone need it, putting it here. I used apple script:

    set newIcon to (POSIX file "IconMac.icns") as alias
    set theItem to (POSIX file "Installer.pkg") as alias
    
    tell application "Preview"
    activate
    open newIcon
    end tell
    tell application "System Events"
    tell process "Preview"
        keystroke "c" using command down
    end tell
    end tell
    tell application "Preview" to quit
    
    tell application "Finder"
    set infoWindow to open information window of theItem
    set infoWindowName to name of infoWindow
    end tell
    
    tell application "System Events"
    tell application process "Finder"
        tell window infoWindowName
            keystroke tab
            delay 1
            keystroke "v" using command down
        end tell
    end tell
    end tell
    
    tell application "Finder"
    close infoWindow
    end tell
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an installation package using Wix which installs a Windows service on
I have created an ActiveX dll using VB6 and packaged it using the Package
I have created a package in VS2010 RC using the MPF (Managed Package Framework)
I have created a data frame from a SQL query using the RODBC package.
I am creating NuGet package and for that I have created Nuspec manifest file.
I have created an xcode project. Now I want to give .app file to
I have created an applet program using Eclipse IDE. Now im creating .html file
I have created an installer using packagemaker, but i don't see how to add
I have created an SSIS package i took 'excel source' taking excel file but
I have created an SSIS package and it works great on my dev machine.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.