Automaticly run Program\Script After and MSI Installation

Hi All,
Today I started looking into the use of Application Model in SCCM 2012.
It was easy to create an application by using the import MSI function, which automatically created the application, deployment type and detection rule. But I'm struggling with how to run a script afterwards, when the MSI installation was successful.
I've looked into creating 2nd deployment type making the first deployment type as it's dependency, but it's mandatory that I also need to make an detection rule. And this is where I'm stuck ass the detection rule I want to have the same as
for the first deployment type which will make it impossible to run because the condition will be evaluated ass already installed.
Is there a way to avoid the detection rule? If not is if possible trigger something after the first deployment type based on the errorlevel after the MSI installation.
My goal is to write a regkey  somewhere in HKLM\Software\<company name> after an successful installation of an application. This location we've included in our hardware inventory for reporting purposes.
Any suggestions to achieve this goal are welcome .
Regards,
Daniel

I've resolved it with using the AddDploymentTypebyMISInstallerAuto function from the Add-CMDeployment command and provided an InstallationProgram parameter to override the default InstallationProgram.
The comman-line looks like
Add-CMDeploymentType
-ApplicationName <Name>
-AutoIdentifyFromInstallationFile
-ForceForUnknownPublisher $True `
-InstallationFileLocation
<MSI
File> -MsiInstaller
-DeploymentTypeName
Test1 –InstallationBehaviorType InstallForSystem
-InstallationProgram
< Custom
Script>
In this way I have the detection based on the MSI GUID and the ability to use a wrapper script.

Similar Messages

  • Automatically run shell script after publishing?

    Is there any way to automatically run a  shell script  after publishing?
    I would like to do some postprocessing on the remote server.
    The remote server is not mobileme,  so a tool like iwebenhancer  will not work.
    I will appreciate all kinds of tips and tricks and suggestions.
    best regards, Gabriel.

    So the Detect Change is to detect a change in the web page that the code is embedded, right?
    The only workaround would be, if you can modify what's in the ChangeDetection window is to not automatically enter the page but put in a red note to enter the page you want to be notified about.
    So instead of this:
    You would have this:
    where the visitor would have to copy and past the URL into the field.  Obviously not automatic. But might work if you can modify what is said in the window and not have the page automatically be entered.

  • Run a script after a package is updated?

    Is it possible to run a script after a package is updated? I have Anki use a custom config folder (~/.anki instead of the default ~/Anki) and every time Anki updates it reverts back to the default folder. It's not such a burden to make a script that fixes this and run it manually after every update, but it would be nice if it worked automatically. So is there any way to monitor what pacman updates and run a script after it updates a certain package?

    If you're modifying a config file to change this, and pacman is overwriting it, consider adding the config file to pacman's NoUpgrade array in pacman.conf (man pacman.conf for details). If you feel that lots of people would benefit from this file being exempt from the upgrade process, file a bug report/feature request, and the maintainer may make the change in the package itself.

  • Run a Script after the MA is published to SAP ERP.

    Hello, I'm trying to run a script after the MA is published, in order to automatically change it's status.
    I already have the script done and working, the only problem is that I need to know where to put it (or what type of script it should be) in order to run after the MA  has been published successfully.
    Thanks in advance !
    Oscar Obeso.

    That is also a good solution.
    But what I did to fix it was to make a Script to run on validation.
    Then, on that phase I checked the date of sent to external. If that date was null, it meant that Agreement had never been published.
    Otherwise, it meant i had been published, and so I checked for the status to change it if neccesary.
    Thanks for the answers, they are valid solutions too.
    Oscar Obeso.

  • Can servlets/ jsp automatically run perl scripts and executables?

    I'm a student and am new to to servlets and web programming in general.
    I need to know if it's possible to run perl scripts and executables automatically from servlets/ jsp.
    The program I am planning on creating should have a client outside a firewall that uploads perl files to a gateway machine inside the firewall, the servlet should be able to run this perl file, and then pass the resulting file as an argument to an executable, to be run by another servlet on a different server.
    I've tried looking everwhere for an answer to this and am about to revert to a cgi based approach because I'm not sure if it would work so any help/ suggestions would be much appreciated.

    Hallo,
    I think using java Runtime will help. you can do Processes that execute shell or system commands through
    Process process = Runtime.getRuntime().exec("your perl scripts here!");
    Bye

  • How to run a script after resume from disk in pm-utils

    When I use pm-hibernate, I have a few scripts that I would like to run upon de-thawing. At the moment, all I want to do is module-related: I want to remove the pcskpr mod (which I have blacklisted in my rc.conf MODULES array, but HAL loads it upon thawing) and reprobe the ath9k mod (wireless doesn't work until I modprobe it).
    I see that you can insert your own hooks for pm-utils, but when are they run? I need my script to run after HAL has its way with my module-probing/loading and I'm not getting a clear impression that this is the case. If not, then what other options exist?

    tomk wrote:
    Arch wiki wrote:The hooks in this directory will be called in alphabetic order during suspend (that's the reason their names all start with 2 digits, to make the ordering explicit) and in the reverse order during resume.
    That seems clear to me. What else are you looking for?
    But pm-hibernate does some of its own work for hibernation/thawing. I'd like to know where in relation to *that* the hooks are run. Ie, during hibernation, are they run before or after the vanilla pm-hibernate functionality?

  • Where to running SQL Scripts after install of ODAC for Oracle Client?

    I just installed ODAC for Oracle Client on a windows server, that runs a sql server database, for developers to connect a web app to an Oracle/Unix database. The install states to run SQL scripts located in the $ORACLE_HOME\ASP.NET\SQL directory after the install. I'm not sure where to run them? On the ORACLE DB on the Unix server? If someone could bring me up to speed I would appreciate it. Thanks.

    If I do run the scripts, do you know what user they should be run as? The developer are using ASP.NET for connectivity.
    Why there is no Oracle Expert answer this simple question? ?
    After ODAC 11.1.0.7.20 installation completed, there is a message in the last screen:
    *"Run the SQL script located in c:\app\Administrator\product\11.1.0\client_1\ASP.NET\SQL directory for a new installation or an upgrade of Oracle Providers for ASP.NET"*
    The question is: How to run these 9 SQL scripts ?
    In SQL*Plus, which oracle user should I connect to in order to run these 9 scrips, including:
    InstallAllOracleASPNETProviders.sql
    InstallOracleASPNETCommon.sql
    InstallOracleMembership.sql
    InstallOraclePersonalization.sql
    InstallOracleProfile.sql
    InstallOracleRoles.sql
    InstallOracleSessionState.sql
    InstallOracleSiteMap.sql
    InstallOracleWebEvents.sql

  • Automatically running a script at intervals

    Sorry if this is a simple question, but I have wracked my brains all day.
    And I have parsed this forum and the docs at docs.sun.com.
    Details: Running SMC 3.5u1
    I have a simple 'sh' script that performs some actions and returns zero (0)
    for success and minus one (-1) on failure. I have managed to add it
    to Script Repository and Script Launcher and can run it via "Launch Start"
    in Script Launcher.
    What I would like for it to do is run once or twice each day, automagically,
    without operator intervention. Believe it or not I have not figured out how
    to do this. Any pointers, suggestions would be appreciated.
    Thanx in advance,
    Tony

    Hi Tony,
    What you want to do would be a lot easier with the "ScriptRunner" module. It's made to run scripts at intervals (or on-demand) and parse the stdout as if it was a log (i.e. you can look for words that the script wrote out). It will also alarm on return codes:
    http://www.halcyoninc.com/products/ScriptRunner/index.php
    Note: I work for the company that makes it... but IMHO it really is better than Script Launcher for what you've described you want to do.
    Regards,
    Mike
    [email protected]

  • Windows Automatic Update Error 80072EFD - After new HD installation by Toshiba

    Hi,
    The hard drive went in my computer and I got it repaired at Toshiba Service centre. Four weeks later and it wont update windows which now causes web site security certificate errors with itunes, banks and paying for items on the web. I have called Toshiba and told them when I got it back it doesn't work correctly and they say its not there problem! Windows worked fine before the hard drive re-install.
    I have tried nearly every suggestion on windows forums out there and tried to install the windows fix it tool but it wont let me on my laptop. I have also tried installing the Intel driver that people recommend but that also doesn't work. I have malware scanned the system as suggested by Microsoft it still wont work.
    I keep getting windows error code 80072ED. The only thing i havent done which was suggested by toshiba was do a re-install by holding 0 key when rebooting the computer but I dont want to lose my hard drive and wipe it all. Im using windows 7 home premium. Somebody please help.
    Thanks
    Attachments:
    Capture.JPG ‏28 KB

    Satellite C660-195 (PSC0LE-02300JEN)
    the old hard drive was removed and a new hard drive installed and the computer re configured to out of the box state. I dont think the windows update has worked since I got it back from Toshiba.
    If it's just back from the Toshiba shop and doesn't work right before making changes, you should return it.
    That error code indicates a network configuration problem. Do you have other problems on the internet?\
    Do you have more than one anti-virus program resident in memory?
    -Jerry

  • Which basic services has to be turned on to run the SharePoint after the fresh installation

    Hi,
    Any help?
    Thanks
    srabon

    In order to run CA, all you need to do is provision Central Admin (part of creating a new farm) to the server of your choice. It doesn't rely on any other SharePoint services.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Run shell script after certain period of inactivity?

    So I know that I can issue this command in terminal to enable fast user switching (and effectively lock the screen).
    /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
    What I want to do is have this happen on client machines after a certain period of inactivity (e.g. 15 minutes). I don't want to force a full logout via managed preferences because I want users to be able to log back in and still have everything they left open be available.
    How would I go about this?

    John's suggestion would allow another user to still log on to a computer after someone left it unattended, as opposed to just going to a locked screen saver.
    However, I would be concerned that you could very easily end up with multiple users all logged onto one machine throughout the course of a day. Since often times, people tend to forget they had stayed logged in (which is one big reason it was left unattended for so long, generally), those people may never come back and then their log in is simply taking up resources. Also, it may make it harder for them to remember exactly which computer they were logged into to begin with (since it is now on a different user).
    So, while I apologize for not actually being able to help with a solution, I'd make sure you weigh the pros and cons and see if it would truly solve what you're trying to accomplish to begin with.

  • Does OS X automatically run the maintenance scripts?

    Can someone tell me if OS X (10.6 or 10.7) automatically runs the Daily, Weekly and Monthly maintenance scripts when my computer is asleep? If not, does OS X cause these scripts to run at the next point when the computer awakes?

    Yes, Apple fixed that issue that they would only run in the early AM when most users have their machines off/sleeping and clog the machine up.
    No need to worry about having to do anything anymore unless you have a glitchy issue, then the free OnyX will clean your machine's caches out nicely.
    http://www.titanium.free.fr/

  • MSI installer closes with error 1327, Invalid drive on Win 7 Ultimate when My Documents is moved to a network drive

    I have several computers with Windows 7 Ultimate installed here at the Pioneer Library System. We have ~20 workstations running XP Pro on a Active Directory domain and are planning on rolling out Windows 7 this fall. I am running Windows 7 to test our programs
    (have since RC1) but I am running into an issue when installing software.
    The problem I am running into is that when I try to install any program that uses the MSI installer on Windows 7 , it fails with a 1327 error at the point where it is preparing to install and says "Invalid Drive H:\".
    All the users in our domain have the "Home Folder" on their active directory profile set to
    H:\ (which is mapped to \\PrimaryDC\user$ in the same place). We have also moved the
    C:\Users\user\Documents folder to H:\ so as to keep all documents on the server where they get backed up regularly.
    If I move "Documents" back to C:\Users\user\Documents the MSI installer works fine. When I look into the registry as suggested in
    this thread I found that in "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders " and in "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell
    Folders " the key "Personal" points to "H:\".
    But, H:\ is a valid connected network drive. Installing from the same account on an XP computer with
    C:\Documents and Settings\user\My Documents moved to the H:\ drive works fine.
    I have tried setting up another 7 machine and get exactly the same results on it.
    Is there a workaround for this besides creating a admin account that does not have Documents mapped to the network drive
    H:\ to use for installing programs?
    Thanks
    Aaron Z
    PLS

    I do not have the option with some of these files to pass parameters to the MSI installer. For example, if I download the Acrobat Reader installer from http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.3/enu/AdbeRdr930_en_US.exe and run AdbeRdr930_en_US.exe
    it extracts the MSI file to C:\Users\USER\AppData\Local\Adobe\Reader 9.3\Setup Files and then runs it.
    To reproduce this an a Windows 7 computer (does not have to be on a domain):
    Prep Work:
    Create a user (test1)
    Create a folder on the root of C (C:\Test)
    Set permissions on C:\Test to allow the test1 user to have full access to it
    Share the C:\Test folder as test1 (again, set the permissions to allow the test1 user full access)
    Set the "Home Folder" for the test1 user connect to Z: and point that to \\127.0.0.1\test1
    Login as test1
    Check that you have Z:\ mapped and that it works
    Check that it works:
    Install Acrobat Reader 9.3 from the link above
    Note that it works
    Uninstall Acrobat Reader 9.3 using "Programs and Features"
    Break it:
    Login as test1
    Check that you have Z:\ mapped and that it works
    Go to C:\Users\test1
    Right  click on the Documents folder and click on properties
    Click on the Location tab
    Click on "Browse" and select the Z drive
    Allow Windows to move the files to the new location
    Check that it is broken:
    Check that you have access to the new Documents folder at Z:\
    Install Acrobat Reader 9.3 from the link above
    Note that it extracts itself to C:\Users\test1\AppData\Local\Adobe\Reader 9.3\Setup Files
    and runs the MSI installer from there
    Note that after the MSI installer is started it pops up an error saying Error: 1327, Invalid drive Z:\.
    I also see this with various other install programs (VMWare vSphere Client, VMWare Player and Kaspersky Antivirus for example)
    Is there any reason why this should not work? Is there something that I should be doing differently?
    Thanks
    Aaron Z

  • How can I create a simple app that will automatically add folder script

    Hi! I hope I can get a little help on this.  I tried searching online and haven't found anything.
    Is there away I can make a simple "application" that will automatically add a folder script to a users folder?
    Basically I need a folder script to run but I don't want to explaint o a user how they'd have to do it in automator.
    I'd like to be able to create an application they double click.  The app tells them to select a folder then automatically runs the script.
    Does anyone have any ideas of how'd I'd do this?

    Oh I get it. Yeah I read you post on one of the other pages and didn't quite understand, but not that you say that your're makeing this for another user, it makes sence.
    So what you want to do is have the computer automatically install a script on a customer's computer, right?
    (I'm using "custumer" loosly; i.e. just another user)
    If that's what you'd like to do, then you'll probably have to write an actual program in Xcode, since I imagine automiticlly installing folder action scrips will be highly discuraged by Apple because it would cause a huge security hole in the OS. (You wouldn't want some random person sending you a folder action installer disgused as a regular app LOL.)
    But I will actually suggest the following, which I think will work great for your users:
    Make a regular Automator app, and drag it to your Dock. Now, have the user click and drag a bunch of photos to the application icon, and it will run the app automatically on those files.
    You could try a work flow like this:
    ask the user Are you sure?
    convert pictures
    save pictures to ConvertedPics folder
    pop up a confirmation message saying that everything was resized
    Hope this helps

  • Snow Leopard XServe 10.6.3 upgrade frozen at "Running package scripts"?

    The Automatic update program for installing and updating Snow Leopard xServe appears to be frozen at the "Running package Scripts." It has been at this position for about 12 hours with the bar all the way to the right on the install process. What is the verdict; do I let it run some more or should I do a hard reset and do the stand alone download and install?

    I was having this problem and think I found the solution. I just got my computer new and was trying to install FCS 2. The installation would freeze at "Running Package Scripts." I tried many times, all with this result. Finally, I went to Activity Monitor to force quit the installer. I pulled up the CPU usage monitor and noticed that one of the threads was at a steady 100%. I quit the installer, but it was still at 100%. I checked the process list and noticed that there was a PowerPC process titled "translate" still running with 100% CPU usage.
    So, I tried the install again. This time, instead of force quitting the installer, I force quit the "translate" process. Immediately, the installer kicked back in to action and finished. Hope this helps.

Maybe you are looking for

  • Iphone shuts down when trying to sort email into folder.

    When I click on a specific email and try to sort it into one of my folders on my phone, the email program shuts down and goes back to the home screen. I did a hard reset and checked for updates for the iphone.  It was working yesterday and now it's n

  • Trouble with Captivate 4 and Windows 7

    My office just migrated to Windows 7 (64 bit) and when I try to run Captivate 4 I get the attached error message and Captivate does not capture.  I logged in as administrator and I still cannot run the program successfully.  Any suggestions?

  • Couldn't include CNTN01 in z function group created at SE80

    Dear All,          I am involved in workflow development for determining agent for a step.          But I couldn't include <CNTN01> in z function group created at SE80?          How to do so?I will be grateful for your help. Thanks, S.Suresh

  • I can not run corectly of youtube on mozila..and my idm was do not run on mozila too

    the view of youtube on mozila was soo big.. look like error.. i can not sett it for the original size.. i try too reinstall mozila, but i still can not make it.. honestly.. i more like to use mozila than chrome so , i hope, i can get a good result fo

  • Problem: Web Dynpro Java 6.40 FileDownload control in table

    Hi guys, I have the problem to display FileDownload elements in a table. Unfortunately it is NOT NW04s, but it is the old Release 6.40. Theoretically speaking, this should be possible too. (Performance wont be good according to two SDN articles of Be