- setup.bat calls MyAppInstaller.exe
- MyAppInstaller.exe installs the application, the setup.bat waits for it's completion.
- After the completion of MyAppInstaller.exe, the createStartMenuShortcut.bat is called from setup.bat.
- createStartMenuShortcut.exe creates the Start menu shortcuts.
Compiled Application Start Menu Folder
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
If I am releasing many compiled applications, I'd like for them all to appear in a single folder on the Start Menu (similar to how "Activate MATLAB 2021a", "Deactivate MATLAB 2021a", and "MATLAB 2021a" are in a folder titled "MATLAB 2021a"). Is this possible?
0 comentarios
Respuestas (1)
Harsh Mahalwar
el 19 de Feb. de 2024
Hi Brian,
As I can understand, you are trying to find a way to automate the process of generating a Start menu folder for your MATLAB application on windows. Unfortunately, I was also unable to find any existing options in MATLAB Apps installer to achieve the same.
Here's a workaround, You can use .bat (batch files) to automate this process, here’s an example for the same:
Workflow:
Inside setup.bat
cd "[path of the folder of your application installer]"
start /wait MyAppInstaller.exe
start createStartMenuShortcut.bat
Inside createStartMenuShortcut.bat
@echo off
setlocal
:: Set the name of the shortcut
set SHORTCUT_NAME=[Add your application's name here].lnk
:: Set the target path of the shortcut (e.g., the path to the executable)
set TARGET_PATH=[Add path to your executable here]
:: Set the Start menu path for the current user
set START_MENU_PATH=%appdata%\Microsoft\Windows\Start Menu\Programs\[Add name of your application here]
:: Create the shortcut
echo Creating shortcut in the Start menu...
if not exist "%START_MENU_PATH%" mkdir "%START_MENU_PATH%"
echo Set oWS = WScript.CreateObject("WScript.Shell") > "%temp%\temp.vbs"
echo sLinkFile = "%START_MENU_PATH%\%SHORTCUT_NAME%" >> "%temp%\temp.vbs"
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> "%temp%\temp.vbs"
echo oLink.TargetPath = "%TARGET_PATH%" >> "%temp%\temp.vbs"
echo oLink.Save >> "%temp%\temp.vbs"
:: Run the VBScript to create the shortcut
cscript /nologo "%temp%\temp.vbs"
:: Clean up the temporary VBScript file
del "%temp%\temp.vbs"
echo Shortcut created successfully.
endlocal
You can run this batch file as your application’s setup.
Third party applications like inno setup and NSIS setup etc, can also help here.
I hope this helps, thanks!
0 comentarios
Ver también
Categorías
Más información sobre MATLAB Compiler en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!