Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
# ============================================================================== # VARIABLES À MODIFIER # ============================================================================== # Indiquez ici le nom de l'application (ou une partie du nom) tel qu'il # apparaît dans "Ajouter ou supprimer des programmes" sous Windows. $AppName = "7-Zip" # ============================================================================== # SCRIPT (Ne pas modifier la suite normalement) # ============================================================================== # Chemins du registre pour les applications 64 bits et 32 bits $RegistryPaths = @( "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*", "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" ) # Recherche de l'application $AppFound = Get-ItemProperty $RegistryPaths -ErrorAction SilentlyContinue | Where-Object { $_.DisplayName -match $AppName } if ($AppFound) { # Application trouvée : on écrit un texte (requis par Intune) et on quitte avec le code 0 Write-Host "Application détectée : $($AppFound[0].DisplayName)" exit 0 } else { # Application non trouvée : on quitte avec un code d'erreur (1) exit 1 }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)