-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install PWA app on MACOS thru a script (final use on intune) #274
Comments
Thanks for filing and providing these details. However this repository is specific to DevTools. DevTools is a developer feature in Edge which is unrelated to PWAs and how they get installed via Edge. Can you please send your feedback again by using the browser's feedback mechanism? Here's how:
I'll also ping some folks internally who might be able to help. Thank you for your understanding. |
After talking with the team, they mentioned the following couple of leads you could look into @adminsoho:
Hope this helps a little bit. |
Thank you very much, very usefull and well documented!!!
De: Patrick Brosset ***@***.***>
Fecha: martes, 20 de agosto de 2024, 3:12 a. m.
Para: MicrosoftEdge/DevTools ***@***.***>
CC: SOHO | Admin ***@***.***>, Mention ***@***.***>
Asunto: Re: [MicrosoftEdge/DevTools] Install PWA app on MACOS thru a script (final use on intune) (Issue #274)
After talking with the team, they mentioned the following couple of leads you could look into @adminsoho<https://github.com/adminsoho>:
1. Using policy-install if this is an IT admin use case. This policy should work: https://learn.microsoft.com/en-us/deployedge/microsoft-edge-policies#webappinstallforcelist
2. We do have the --install-webapp param, but that's used by WebDriver automation, not something that is used for Intune.
Hope this helps a little bit.
—
Reply to this email directly, view it on GitHub<#274 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AURFSMN5JSE4GMVF7X3IQZTZSLT4XAVCNFSM6AAAAABMW44DYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJYGEZTEMJSGY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I am trying to run this script with no success to install on MACOS a PWA app for Microsoft Edge. The final use is for Intune to push PWA apps to end macos users on company.
Objective is that this PWA appears on MS Edge as an installed app and execute as such (an PWA app). I added some extras, as create dock shortcut, install brew if not exists and logs.
Problem: This script does not achieve to install a PWA on MS Edge, I have been searching a lot and not found info on installing PWA somehow to endusers on a company using intune.
Please see examples below of what this script is acheaving and a real installed PWA app.
Properly installed:
This script (opening tab as new tab):
Extras on my script:
The script:
`#!/bin/bash
Define variables
PWA_URL="https://www.yummly.com"
EDGE_PATH="/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"
INSTALL_BASE_DIR="/Users/$USER/Applications/Edge Apps.localized"
LOG_DIR="/var/log"
LOG_FILE="$LOG_DIR/pwa_installation.log"
Function to get the PWA app name from the Edge window title
get_app_name() {
osascript <<EOF
tell application "Microsoft Edge"
activate
set windowTitle to name of front window
end tell
return windowTitle
EOF
}
Start logging
echo "Iniciando el script de instalación..." | tee -a "$LOG_FILE"
Check if Microsoft Edge is installed
if [ ! -f "$EDGE_PATH" ]; then
echo "Error: Microsoft Edge no está instalado en $EDGE_PATH." | tee -a "$LOG_FILE"
exit 1
fi
Create the installation directory if it does not exist
mkdir -p "$INSTALL_BASE_DIR"
Open the PWA URL in Edge
echo "Abriendo el PWA en Microsoft Edge..." | tee -a "$LOG_FILE"
"$EDGE_PATH" --app="$PWA_URL" --no-first-run --no-default-browser-check
Wait for a bit to allow Edge to open and load the PWA
sleep 20
Get the app name from Edge window title
APP_NAME=$(get_app_name)
if [ -z "$APP_NAME" ]; then
echo "Error: No se pudo obtener el nombre de la aplicación." | tee -a "$LOG_FILE"
exit 1
fi
echo "Nombre de la aplicación obtenido: $APP_NAME" | tee -a "$LOG_FILE"
Wait to allow PWA installation to complete
echo "Esperando a que se complete la instalación de la PWA..." | tee -a "$LOG_FILE"
sleep 60
Log the content of the installation directory
echo "Contenido del directorio de instalación:" | tee -a "$LOG_FILE"
ls -la "$INSTALL_BASE_DIR" | tee -a "$LOG_FILE"
Determine the location of the installed .app
APP_PATH=$(find "$INSTALL_BASE_DIR" -name "$APP_NAME.app" -print -quit)
Check if the PWA was installed successfully
if [ -z "$APP_PATH" ]; then
echo "Error: La instalación de la PWA falló o $APP_NAME no se encontró en $INSTALL_BASE_DIR." | tee -a "$LOG_FILE"
exit 1
else
echo "$APP_NAME se instaló correctamente en $APP_PATH." | tee -a "$LOG_FILE"
fi
Check if Homebrew is installed
if ! command -v brew &> /dev/null; then
echo "Homebrew no está instalado. Intentando instalar Homebrew..." | tee -a "$LOG_FILE"
else
echo "Homebrew ya está instalado." | tee -a "$LOG_FILE"
fi
Check if dockutil is installed
if ! command -v dockutil &> /dev/null; then
echo "dockutil no está instalado. Intentando instalar dockutil..." | tee -a "$LOG_FILE"
else
echo "dockutil ya está instalado." | tee -a "$LOG_FILE"
fi
Add the application to the Dock if it's not already present
if ! dockutil --find "$APP_PATH" &> /dev/null; then
echo "Añadiendo $APP_NAME al Dock..." | tee -a "$LOG_FILE"
dockutil --add "$APP_PATH" --no-restart
killall Dock
else
echo "$APP_NAME ya está en el Dock." | tee -a "$LOG_FILE"
fi
echo "Instalación completada." | tee -a "$LOG_FILE"`
The text was updated successfully, but these errors were encountered: