Giter Club home page Giter Club logo

patch-my-pc-prescript-notification's People

Contributors

asjimene avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

patch-my-pc-prescript-notification's Issues

Signed Code and constrained Mode

Hi, I tested your scripts with patch my PC , but it does nothing, after some research and after sign all the products Prescripts still doing nothing.
Then I realized those PoSH scripts create another scripts on the fly. AppUpdateClosePS.ps1, CancelUpdatePS.ps1 and Update-ToastNotification.ps1 , and probably in our environment those should be signed too.

So I'm trying to face this in a different way, I'm building those scripts apart from the main script, sign them and distribute to clients on that programdata path. Then the Product-prescript.ps1 script will only create the .vbs the .cmd adn the .xml files.

For the CancelUpdatePS.ps1 nothing really to do
For the AppUpdateClosePS.ps1 I modified the creation of the AppUpdateClose.cmd in the script:
$procstring = (""$($processes -join '","')"").Replace('""','"') $appupdateclose = @" powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File "$env:ProgramData\PMPC\AppUpdateClosePS.ps1" -Processes $procstring "@
So Now it passes the processes to kill as an array to the AppUpdateClosePS.ps1 (and this has ben modified accordingly)

param([string] $Processes) $ProcArray = ($Processes.ToString()).Split(",") $ProcArray | ForEach-Object { Get-Process | Where-Object Path -Like "*$_" | Stop-Process -Force}
New-Item -ItemType File -Path "$env:ProgramData\PMPC\ButtonClicked" -force`

And NOW, the question before following the work, in this sentence:
$ToastNotificationScript.Replace("%CloseAppVariable%", "$CloseAppVariable") | Out-File -FilePath "$env:Programdata\PMPC\Update-ToastNotification.ps1" -Encoding oem -Force

What this exactly do ??
$CloseAppVariable is a boolean
It means it will ouput nothing to the out-file ??
there is no that %CloseAppVariable% at $ToastNotificationScript array....
Is that something I should pass to the Update-ToastNotification.ps1

Please if you could guide me so we can test these modifications and use you nice scripts ?? please

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.