PackageMaker postflight script to reindex Spotlight?

Hello,
I've put together a PackageMaker installer that installs a Spotlight plugin, and runs a postflight script that includes a command based on this one:
/usr/bin/mdimport -r /Library/Spotlight/Yourplug-in
which is taken from Apple's support page here:
http://www.apple.com/downloads/macosx/submit/installers.html
The trouble is that the installer log tells me this:
./postflight: mdimport will not import on behalf of root user. Exiting.
How can I fix this so that the mdimport command runs without problems?
Thanks for any help

That was exactly right. I changed the command so that it reads
sudo -u $USER /usr/bin/mdimport -r /Library/Spotlight/Yourplug-in
and the problem didn't occur. Thank you!

Similar Messages

  • Packagemaker: need to run applescript from postflight script

    Does anybody makes packages using Packagemaker? I need to run applescript from postflight shell script. Generally, when we need to run applescript or any application from shell script we write:
    #!/bin/sh
    open /Path/to/applscrpt.app
    But what to do if all scripts (shell, app's) placed in MyPackage.pkg/Contents/Resources? What path I need to specify? This way:
    #!/bin/sh
    open ./Contents/Resources/applscrpt.app
    doesn't work...

    The $1 argument that gets passed to your postflight script by the Installer should contain the full path to the package that's currently being installed. So something like this should work...
    #!/bin/sh
    open "$1/Contents/Resources/applscrpt.app"
    Here is some additional info about args and environment variables available to your scripts.
    Steve

  • Perl problem? Run postflight script

    Yesterday my USB mobile internet aircard wouldn't mount in OS X (10.5.6). I spent hours on the phone with the ISP's tech support, and they ultimately had me download and reinstall the software. When I attempted to install that software, it failed with this error message: "The following install step failed: run postflight script for Franklin Wireless".
    A few hours later I tried to install a different program (unrelated to the internet issue) and I got the same kind of message "The following install step failed: run postflight script"
    I've googled for hours, and there's almost nothing out there. Everything I did find led me to stuff about "perl" and "bash". I'm not exactly new to computers, but I'm not a programmer either and I don't understand any of that.
    I don't know what to do here. Is it possible my "perl" is corrupted or missing? Or my "bash"? I checked my software updates and I happened to be due for an upgrade to 10.5.7. So, I did that hoping it might fix anything that was corrupted or missing. But, afterwards I tried the install again and got the same error.
    I'm 2,000 miles from home on the second day of a two-week business trip. I need my computer to work, I need the internet access...basically I'm screwed. If ANYONE can offer any insight, I would be eternally grateful.
    Thank you.

    Check the Console messages and post back anything that looks interesting after getting the postflight error.
    Eric
    Ps. Doesn't the hotel have internet you can hook to?
    Message was edited by: ericmeyers

  • Error: run postflight script for adobe common files

    error: run postflight script for adobe common files

    I am sorry can you please restate your inquiry.  If you can provide some more details regarding which Adobe Software you are inquiring about?  Which operating system are you using?  Finally what are you trying to accomplish when you receive this error?

  • When i try to install a program in my macbook Pro, the message appear: Run preflight scrip and after Run the postflight script. How i'll fix this?

    When i try to install a program in my macbook Pro, the message appear: Run preflight scrip and after Run the postflight script. How i'll fix this?

    Here are the Mac requirements:
    System Requirements Mac Version (*)
    Mac OS X 10.6.1, 10.7.1, 10.8.1 or 10.9.1
    1.83 GHz cpu or better
    Nvidia Geforce 8600, ATI Radeon X1600 or better (min 256 MB VRAM)
    1 GB RAM
    2 GB free hard drive space
    DVD-ROM Drive
    Are you sure that you have the Mac version, as there is a Windows version, as well as a few game console versions.
    Sounds as though that may be a Windows or other version.

  • Run postflight script for Plugin - step failed for mac

    So when I try and install adobe flash player on my mac OS X version 10.5, I get a message saying "The following install step failed: run postflight script for plugin. Contact the software manufacturer for assistance.

    Hello,
    Flash Player no longer supports OS X 10.5. The last version to support OS X 10.5 is 10.3.183.90.  You can download an archive.dmg file containing this version from http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html.  After downloading and extracting the files, you'll want to install the file 'flashplayer_10_3r183_90_mac_intel.dmg'.
    Maria

  • I can't install Komplete Elements. I got the message Install Failed. The following install step failed: Run postflight script Kontakt 5 Content.

    When I tried to install the free copy of Komplete Elements that came with my Komplete Audio 6 Interface I got the message : Install failed. The following install step failed :Run postflight script 5 Content. I was able to insall the Audio 6 drivers but didn't choose to load Traktor or Cubase LE because I use Garageband.
    I have a Macbook. Running version 10.5.8. GHz Intel Core 2 Duo.
    I tried the url their tech support sent me but that didn't work either.
    If this is not the right forum please redirect me.

    Thanks for answering. The weird part is that I was able to install Audio 6 and record my bass but Elelements won't install at all. When I orginally ordered it the site said that Elements would run on 10.5.8 but I guess you're right. I am going to have someone check it out later today. I'll let you know what happens. If you only want the Audio 6 Interface they sell it for $229 at Music123. I shouldn't complain because Elelements was free but the more I looked into it the more I became interested.. Another strange thing is that I told Komplete tech support I had 10.5.8 and they never told me it wouldn't work.

  • Error Message: "Install Step Failed:run postflight script for Plugin" When Flash Player 11.7 instal

    Don't See Question/Problem w/Flash Player Installation.  Error w/11.7.700.260 Installation had errors (dialogue box)  The following install step failed: run postflight script for Plugin.Contact the Software Manufacturer for Assistance.  Please Note:  I have read all Adobe Links related to installing Flash Player and uninstalling previous version 10.3 for MAC OS 10.5.  So I have MAC OS 10.5.8 w/Firefox Browser 16.0.1 and disabled anti-viral software.  Uninstalled previous version of Flash Player 10.3.  Confirmed uninstallation.  Downloaded Flash Player 11.7.700.260  instead of 10.3.183.90 due to Adobe stated information re:replacement of 10.3 versions with 11.7 extended support.  Installation of 84% occurs then the Error Message: Installation had errors (dialogue box)  The following install step failed: run postflight script for Plugin.Contact the Software Manufacturer for Assistance.  Please help to resolve this issue as no flash player is currently on my MAC.  Thank you so much.

    Hi Mike,
    First of all, thank you so much for responding and sorry I forgot to mention my CPU; fortunately I **DO** have the 2.6 GHz Intel Core 2 Duo Processor so I could upgrade to Mac OS X Snow Leopard.  Two Questions:
    1. Do you know whether Snow Leopard sold by Apple is an upgrade or "clean install?"  If it's not a clean install, do you know (off-hand) if there are any upgrade issues?  I'm very partiall to a clean install.
    2.  Why does Adobe state (for updating Flash Player 10.3 when Adobe knows that [most likely] the 10.3 versions run on Mac OS 10.5.x?  See statement and link below...
    Kindest thoughts - Karolynn_1
    http://blogs.adobe.com/flashplayer/2013/05/extended-support-release-updated-to-flash-playe r-11-7.html
    We’re happy to announce that we are updating the version of our extended support release to Flash Player 11.7 on Mac and Windows. Flash Player 11.7 will replace version 10.3 as the extended support version beginning July 9, 2013.
    In order to continue receiving security updates, an upgrade to either Flash Player 11.7, or the standard Flash Player 11.8 release is required.
    Flash Player 11.7 provides exciting new features, including Actionscript concurrency, webcam support for StageVideo and more. It also enables Protected Mode for FireFox on Windows, a sophisticated security-in-depth feature. With Protected Mode, Flash Player runs as restricted process, making it more difficult for attackers to build working exploits. Click here to learn more.
    Flash Player 11.7 leverages hardware acceleration for audio, video and rendering to increase performance and lower CPU usage.
    To ensure the smoothest possible transition, we encourage IT organizations deploying Flash Player 11.7 in managed environments to thoroughly test audio and video playback for critical use-cases using the latest available version before deploying this release widely. When hardware-related playback and stability problems do arise, updating to the latest hardware drivers frequently resolves these issues.As a secondary workaround, the Flash Player Administrator’s Guide details mechanisms for disabling hardware and audio acceleration via mms.cfg.
    We have been hard at work to make Flash Player better than ever, and we look forward to continuing to serve you with a great web experience.

  • PSE 4.0 on Mac:  cannot run postflight script

    Built PSE 4.0 as root on 10.5.6, PPC G5 w/ Mac OS Extended (Case-sensitive Journaled) FS.  Near end of build: "file missing" then "cannot run postflight script."  Any ideas?  Thanks.

    Had you tried installing as a regular admin user? In any case, if this drive is also case-sensitive, that's where the problem lies.

  • Elements 4.0:  run postflight script fails

    I ALMOST successfully built Elements 4.0 as root on Mac OS 10.5.6 (CPU PPC G5).  Near end of build, I see "missing file" then "cannot run postflight script".
    Any ideas?  Thanks.

    SysAdmInMaine wrote:
    Thank you, Ramon.  I chose the category "Photoshop on Mac."  What do Mac users posting here use?
    The full version of Photoshop, as in CS4, CS3, etc.  That's why there is a dedicated Photoshop Elements forum elsewhere.

  • Reindexing spotlight

    Few days ago i instalet some new software and now my spotlight search for those apps doesnt work, it finds the apps but when i click on it just nothing happens, i have to go to apps and click on it and then its fine but since i used it very often i would like to make it wotk again, so is there any comands or whatsoever to make it work? xD thanks

    Hi matylda - I hope this solves your problem:
    http://support.apple.com/kb/HT2409

  • Inability to reindex Spotlight

    I followed the instructions for reindixing Spotlight using Terminal and got the following. I never saw a message indicating that the index would be rebuilt automatically.
    Welcome to Darwin!
    robert-gir-imac-g5:~ rgir$ sudo mdutil -E /
    Password:
    Volume index removed.
    robert-gir-imac-g5:~ rgir$
    Also, when I go to Sys Prefs > Spotlight > Privacy tab, whether I drag and drop my Users folder into the space there or use the + method, my Users folder will not appear there.
    Any idea of what's going on here??
    Many thank,
    bob

    ATOZ wrote "when I used the "sudo mdutil -i on /"command I recieved a terminal message "Could not set indexing status for volume." Prior to that i used the command "sudo mdutil -E /" and recieved the message that the index can not be found. can you offer any insight to this matter?"This indicates either the .Spotlight-V100 directory at the root level of the volume in question is either missing or empty.
    The mdutil -i... command writes to a specific file in the .Spotlight-V100 directory: _IndexPolicy.plist. If that file is missing, then the command fails as you noted.
    The mdutil -E... command removes the index files from that directory. If the .Spotlight-V100 directory is empty or the index files have already been removed, then the command fails as you noted.
    See my "Stop Spotlight Indexing" FAQ for details on the contents of the .Spotlight-V100 directory.
    You should probably check the volume in question (your startup disk?) for directory corruption. Run at least Steps 1 and 2 of my "Resolving Disk, Permission, and Cache Corruption" FAQ. Perform the steps therein in the order specified.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X
    Note: The information provided in the link(s) above is freely available. However, because I own The X Lab™, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • Postflight script and a ruby issue

    Hi friends -
    Running into another issue. /<sharedfilesystem>/Caches/Resources/Tools/postflight_script is dying on the flowing statement:
    require 'FileUtils'
    The nerror is "in 'require': no such files to load -- FileUtils (LoadError)".
    Has anyone seen this before? This is a fresh build of 10.5.2 and this has died on me each time now. It writes, obviously, to the wiki, but just doesn't clearn up after itself.
    Any help would be appreciated. Thanks!
    --pete

    Hi,
    This file is located in several places on our server :
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/doc /ferret-0.11.4/ri/FileUtils
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/doc /rake-0.7.3/ri/FileUtils
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/share/ri/1.8/system/F ileUtils
    Could you check you've got one somewhere ?
    Regards, Gaëtan.
    Université Lyon 2.

  • Searching for scripts with Spotlight

    I decided to ask this question on this forum because AppleScripters are the most likely to search for scripts with Spotlight.
    *First, here’s what seems to be the normal behavior of Spotlight:*
    If I open the folder “/Users/pierre/Documents/Loisirs/Informatique/Utilisation avancée/AppleScript”, type ⌘F and enter “Kind is Other” and “script” as the search criterion, I get 89 items in the +Searching “AppleScript”+ window.
    On the other hand, if I replace the previous criterion with “File extension is scpt”, I get 88 items in the +Searching “AppleScript”+ window, which is normal since one of my scripts is a script bundle, whose extension is “scptd”.
    Next, if I open my home folder, type ⌘F again and enter “Kind is Other” and “script” as the search criterion, I get 110 items in the +Searching “pierre”+ window, which again is normal since many of my scripts are outside of my “AppleScript” folder.
    *Now, here’s what looks like a bug:*
    If I replace the previous criterion with “File extension is scpt” in my home folder, I get only 3 items (instead of 109) in the +Searching “pierre”+ window, which obviously is nonsense.
    I have rebuilt permissions and reindexed Spotlight, without any difference.
    Any explanation?

    Hi Pierre
    Not a explanation, but a possible solution, try some of these ideas:::
    1) Restart Mac
    2) Rebuild the spot light index manually (I no you said you have done this, this is just a path to follow):
    a) launch terminal
    b) type this sudo mdutil -E /
    c) type in your admin password when prompted
    d) rebuilding index should commence (could take a while)
    3) clear the spot light caches and prefs:
    a) download "Yasu" from here and install
    http://jimmitchelldesign.com/yasu/
    b) enable "Reset System Prefs", "Clear System font Cache", "Clear local font cache", "Clear user font cache"
    click ok
    c) Restart Mac
    4) Kill the SystemUIServer:
    a) launch activity monitor, find process "SystemUIServer" highlight then click button quit process
    hope this helps
    Budgie

  • Macbook hanging: ctl_enqueuedata, ALF ALERT, Spotlight reindex

    Hi
    I have a May 2006 Macbook [1] running 10.5.1. For the last fortnight or so I've been getting random "hangs" which can only be fixed with a power off/on restart. The trackpad still works but clicking on things doesn't do anything; I can't quit running apps nor Apple -> restart.
    More often than not Spotlight has to reindex once I've restarted. After reindexing Spotlight often doesn't find applications -- I cmd-space, type "firef" and it doesn't find Firefox. Typing the full name doesn't help.
    Browsing through system.log it seems that I often get these errors right before it hangs up:
    Jan 25 20:32:25 my-macbook kernel[0]: ctl_enqueuedata: mallocpacketinternal(8) failed
    Jan 25 20:32:25 my-macbook kernel[0]: ALF ALERT: sockwallcntlreleasecachedpath ctl_enqueuedata rts err 55
    It's not always fatal -- I've seen the lines logged once or twice without the machine dying on me.
    So, any ideas? A few other people have posted with similar errors but they mostly seem related to additional hardware drivers (mice, that sort of thing). I don't have anything particularly fruity installed -- just the usual Firefox, TextMate, etc user applications. No additional hardware, save for a USB HDD that's always been fine.
    Here's hoping,
    Mark
    [1] Originally 2006, anyway. It's had two new hard discs, a new heatsink, two new bezels and a new video inverter and cable. And the AC adapter still hisses and the screen's flickering again. It's a Friday afternoon dud, but what can I do about it?

    Did you get any luck with this?
    I'm getting the same ALF ALERT message in my console
    - and ?related or not?
    some weird behaviour where time machine keeps labelling my built-in hard drive with the same icon as the time machine hard drive!

Maybe you are looking for

  • BW Work Book as an iView in Portal

    We are on BW 3.5 and EP 6.0, using BEx Application Designer i am abel to create work book which is based on a query, i can create an iview for EP6.0 in BW System. But how can i see this work bok in SAP Enterprise Portal. there are fre requisites i.e

  • Vertically Align to center of text box

    I have a project that has 500+ Peices and each one consists of a 1 of three logos and 1 of 500+ lines of text and all the lines of text are different lengths I am using data sets and variables.xml to create them all quickly. Now the problem I am havi

  • FTP adapter: put operation on root folder is failing

    Hi All, I am trying to put files on SFTP server through FTP adapter. If i select PhysicalDirectory as something like '/output' - put operation is working. But if i use PhysicalDirectory as '/' - put operation is not working. I am getting error saying

  • With Mobile.me going away soon, where will I be able to upload my iWeb pages. iCloud?

    Where will iWeb upload to after Mobile.Me goes away?  As a high school English teacher, I have developed thousand(s) of highly interactive pages of tutorials, tests, keys, lesson plans, etc., that my advanced and learning challenged students have com

  • Account assignment category for Service Confirmations

    Hi, We are on SRM_SERVER 550, SP11, SAP 4.7 backend. While performing Service confirmations in SRM, the Account assignment category defaulted is different from that mentioned in shopping cart. for e.g. If I create a shopping cart for a Service item w