This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

How to run a script after installation?

I have created a custom package with the latest version of VMware Horizon View client. I will at the same time run a script after the installation that create a icon that is configured for our Company. I have tried with Package Boot Helper but the script never run. I have uploaded the script to the package. If I run the script manually it works fine.

Package Boot Helper.JPG

Package Boot Helper2.JPG

Package Boot Helper3.JPG

  • You cannot run a CMD file directly from PackageBoot. What you'll need to do is execute CMD.EXE and pass the script.cmd file to CMD.EXE as an argument using -c

    Also, I would recommend removing all of the sample code from your PackageBoot file so that only the specific steps your package needs is present.

  • Thanks for your answer. The next problem is how I run this as Administrator? My script add an Icon on the public Desktop and that requires Elevated permissions. The “runas” command in Windows 7 is not possible anymore to use for elevated permissions.

    Från: Lawrence Garvin

    Skickat: den 25 april 2014 17:58

    Till: Sjögren Johan

    Ämne: Re: - How to run a script after installation?

    thwack<thwack.solarwinds.com/>

    How to run a script after installation?

    reply from Lawrence Garvin<thwack.solarwinds.com/.../LGarvin in Patch Manager - View the full discussion<thwack.solarwinds.com/.../234909

  • The next problem is how I run this as Administrator?

    All actions performed by the Windows Update Agent are executed in the context of the SYSTEM user.

  • I tried to run as you say but it not work. I setup it this way:

    Från: Lawrence Garvin

    Skickat: den 28 april 2014 14:47

    Till: Sjögren Johan

    Ämne: Re: - How to run a script after installation?

    thwack<thwack.solarwinds.com/>

    How to run a script after installation?

    reply from Lawrence Garvin<thwack.solarwinds.com/.../LGarvin in Patch Manager - View the full discussion<thwack.solarwinds.com/.../235028

    attachments.zip
  • I tried to run as you say but it not work. I setup it this way:

    Glad it worked. FWIW, the way you set it up is exactly how I suggested.


    1. Configure a "Run as Program" step that calls CMD.EXE
    2. Pass the name of the script as a command line parameter.
  • But it not work, why?

    Från: Lawrence Garvin

    Skickat: den 2 maj 2014 17:22

    Till: Sjögren Johan

    Ämne: Re: - How to run a script after installation?

    thwack<thwack.solarwinds.com/>

    How to run a script after installation?

    reply from Lawrence Garvin<thwack.solarwinds.com/.../LGarvin in Patch Manager - View the full discussion<thwack.solarwinds.com/.../235475

  • But it not work, why?


    My apologies. I misunderstood.

    What do you mean by "it doesn't work"?


    As previously suggested, please remove the sample code from the PackageBoot Editor so the only thing that is there is YOUR code.


    Specify the command-line parameter using the special enviroment variable, %modulepath%, e.g.  /c %modulepath%\VMWare_View_shortcut.cmd

    I suspect it did not work because the script could not be found.

  • It not run because the icon is not appear on the desktop. That it was the script does. Can you connect to our environment via a remote session?

    Från: Lawrence Garvin

    Skickat: den 5 maj 2014 14:56

    Till: Sjögren Johan

    Ämne: Re: - How to run a script after installation?

    thwack<thwack.solarwinds.com/>

    How to run a script after installation?

    reply from Lawrence Garvin<thwack.solarwinds.com/.../LGarvin in Patch Manager - View the full discussion<thwack.solarwinds.com/.../235615

  • It not run because the icon is not appear on the desktop.

    Okay, the icon does not appear. That may or may not be because the script did not execute, but it is a reasonable starting place.

    Assuming the script works correctly, the question now becomes if/why the script was not launched by packageboot.

    After you clean the junk out of the packageboot configuration, use the View XML option in the PackageBoot editor to display the XML.

    Copy and paste the XML into a reply in this thread.

    Can you connect to our environment via a remote session?

    No. I cannot.

  • The script work if I run it manually. What is the junk? This files have I today in the Package:

    Från: Lawrence Garvin

    Skickat: den 5 maj 2014 15:54

    Till: Sjögren Johan

    Ämne: Re: - How to run a script after installation?

    thwack<thwack.solarwinds.com/>

    How to run a script after installation?

    reply from Lawrence Garvin<thwack.solarwinds.com/.../LGarvin in Patch Manager - View the full discussion<thwack.solarwinds.com/.../235619