simpleshare-contextwindows/Freigabe-Launcher.cmd

16 lines
382 B
Batchfile

@echo off
setlocal EnableDelayedExpansion
set "action=%~1"
set "filepath=%~2"
set "scriptdir=%~dp0"
if "%action%"=="add" (
set "script=%scriptdir%Freigabe-Hinzufuegen.ps1"
) else if "%action%"=="remove" (
set "script=%scriptdir%Freigabe-Entfernen.ps1"
) else (
exit /b 1
)
powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File "%script%" -Path "%filepath%"