none
Cannot see progress UI while running package program RRS feed

  • Question

  • I am trying to make a package program so users can repair O365 themselves, the package runs a PS script but I would like the progress window to show up because it can take a while and users would be confused without the progress UI

    I have set the command line as follows:

    "%Windir%\sysnative\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -Command .\repair_Office365.ps1

    It is set to run maximized

    And my script for now:

    $culture = (Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration)."ClientCulture"
    $platform = (Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration)."Platform"
    
    $CMD = "C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeClickToRun.exe"
    
    start-process -FilePath $CMD -argumentlist @("scenario=Repair", "platform=$platform", "culture=$culture", "forceappshutdown=True", "RepairType=FullRepair", "DisplayLevel=True") -wait 


    Any clue why I still cant see the clickToRun progress UI? If I run the script manually the UI shows



    Thursday, May 2, 2019 7:13 PM

Answers

  • Hello Thomas Vitoz,
     
    As Sherry mentioned, I assumed that the script was set to run with administrative rights. It makes the programe running as the system account and may lack a UI. As a comparison, when you manually run it, it is running as the current user account.
     
    If the script has to run with administrative rights, we could enable "Allow users to interact with this program" when creating program. Then check the results.
     

     
    Or we could select "Run with user's rights" if the current user has enough rights to run the program. It also makes this program can run only when a user is logged on.
     
    Hope my answer could help you and look forward to your feedback.
     
    Best Regards,
    Ray

    Please remembers to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by Thomas Vitoz Friday, May 3, 2019 6:06 AM
    Friday, May 3, 2019 1:39 AM

All replies

  • 'how' have you deployed this script via CM?

    When you say "you run it manually and UI shows", I'm assuming that means  you are running the script, when logged in to a workstation as your normal user ID.  Unless you've setup the deployment to run 'only when user logged in, with user rights (possible when it's a package/program/advertisement), then you aren't comparing apples to apples.

    Does it display what you want to display, when you run the script as NT Authority\System on that same device? (if you don't know what I mean by that, look up something like... 'using psexec to run as system'.  That's a trick that many CM admins become familiar with when doing testing of "how does this <thing> behave when installed as SYSTEM, like CM would do"


    Standardize. Simplify. Automate.

    Thursday, May 2, 2019 7:58 PM
  • Hello Thomas Vitoz,
     
    As Sherry mentioned, I assumed that the script was set to run with administrative rights. It makes the programe running as the system account and may lack a UI. As a comparison, when you manually run it, it is running as the current user account.
     
    If the script has to run with administrative rights, we could enable "Allow users to interact with this program" when creating program. Then check the results.
     

     
    Or we could select "Run with user's rights" if the current user has enough rights to run the program. It also makes this program can run only when a user is logged on.
     
    Hope my answer could help you and look forward to your feedback.
     
    Best Regards,
    Ray

    Please remembers to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Marked as answer by Thomas Vitoz Friday, May 3, 2019 6:06 AM
    Friday, May 3, 2019 1:39 AM
  • Hi Ray,

    Yes it works, I have enabled Allow users to interact with this program and now the UI shows?

    Thank you :)

    Friday, May 3, 2019 6:06 AM