Skip to content

Instantly share code, notes, and snippets.

@Chinoman10
Last active April 17, 2025 00:55
PowerShell+VBScript to startup any Windows App or Program by it's name (without having to hardcode folder locations)
' Just put this file inside the folder: %AppData%\Microsoft\Windows\Start Menu\Programs\Startup
' And replace the names of the programs to your liking
apps = Array("WhatsApp Desktop", "Stream Deck")
Set WshShell = CreateObject("WScript.Shell" )
For each app in apps
command = "Start Shell:AppsFolder\\\""$(Get-StartApps -Name \"""&app&"\"" | foreach {$_.AppID})\"""
pscmd = "powershell -command " & command
WshShell.Run pscmd,0
Next
Set WshShell = Nothing
@skygate2012
Copy link

No need to use PowerShell to find and launch Store applications.

Sub RunApp(appName)
    Dim shell, folder, app
    Set shell = CreateObject("Shell.Application")
    Set folder = shell.NameSpace("Shell:AppsFolder")
    For Each app In folder.Items
        If app.Name = appName Then
            shell.ShellExecute "explorer", "shell:AppsFolder\" & app.Path, "", "", 1
            Exit For
        End If
    Next
End Sub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment