Skip to content

Commit

Permalink
Update INSTALL.cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamBasly authored Nov 21, 2024
1 parent b07b93b commit 1e29608
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions INSTALL.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
SET "INSTALL_DIR=C:\PainterProject"
SET "SHORTCUT_NAME=PainterProject"
SET "INDEX_FILE=%INSTALL_DIR%\index.html"
SET "SHORTCUT_PATH=%USERPROFILE%\Desktop\%SHORTCUT_NAME%.lnk"
SET "SHORTCUT_DESKTOP_PATH=%USERPROFILE%\Desktop\%SHORTCUT_NAME%.lnk"
SET "SHORTCUT_STARTMENU_PATH=%APPDATA%\Microsoft\Windows\Start Menu\Programs\%SHORTCUT_NAME%.lnk"

REM Überprüfe, ob das Verzeichnis existiert, und erstelle es bei Bedarf
IF NOT EXIST "%INSTALL_DIR%" (
Expand All @@ -20,11 +21,19 @@ IF EXIST "%INDEX_FILE%" (
REM Erstelle das Desktop-Icon
powershell ^
$WScript = New-Object -ComObject WScript.Shell; ^
$Shortcut = $WScript.CreateShortcut('%SHORTCUT_PATH%'); ^
$Shortcut = $WScript.CreateShortcut('%SHORTCUT_DESKTOP_PATH%'); ^
$Shortcut.TargetPath = '%INDEX_FILE%'; ^
$Shortcut.Save()

echo Desktop-Icon wurde erstellt: %SHORTCUT_PATH%
REM Erstelle den Startmenü-Eintrag
powershell ^
$WScript = New-Object -ComObject WScript.Shell; ^
$Shortcut = $WScript.CreateShortcut('%SHORTCUT_STARTMENU_PATH%'); ^
$Shortcut.TargetPath = '%INDEX_FILE%'; ^
$Shortcut.Save()

echo Desktop-Icon wurde erstellt: %SHORTCUT_DESKTOP_PATH%
echo Startmenü-Eintrag wurde erstellt: %SHORTCUT_STARTMENU_PATH%
) ELSE (
echo index.html wurde nicht gefunden: %INDEX_FILE%
)
Expand Down

0 comments on commit 1e29608

Please sign in to comment.