Copy the below code to your machine and edit the $folder line to match the location of your PortableApps you can check you have the correct folder by doing a dir with it and ensuring all your portable apps come up.
To undo what the script does then remove the folder “%appdata%\microsoft\windows\Start Menu\Programs\Portable\“
No warranty or suchlike – for information only. Publication requires leaving a comment with a reference to each article and source must be provided with all use
Save it to your DropBox to run when you go onto a new machine. Will work best if you always mount your DropBox drive in the same location. You can always adjust the script to search for the Dropbox folder
# ##############################################################
# ##
# ## Copyright (C) Al West, 2014, TSEW, UK.
# ##
# ## Change the line of code below to match the folder where your
# ## portable apps are - if you omit the filter then everything found
# ## will be added. Not good!
# ##
# ## To delete links, remove the following folder
# ## (copy and paste into the Explorer window):
# ## %appdata%\microsoft\windows\Start Menu\Programs\Portable\
# ##
# ## Running this again will only recreate the shortcuts.
# ## It will not delete redundant ones.
# ##
# ## Also, not all files have "portable" in their name, so it doesn't
# ## cover everything.
# ##
# ##############################################################
# Set the folder where your portable apps are located
$folder = "D:\Dropbox\Portable\PortableApps\*Portable.exe"
function Make-Shortcut {
param (
[string]$portableApp
)
$appName = [io.path]::GetFileNameWithoutExtension($portableApp)
$location = $env:APPDATA + "\Microsoft\Windows\Start Menu\Programs\Portable\"
$WshShell = New-Object -ComObject WScript.Shell
Write-Host "Creating:" $appName " <<>> " $portableApp
Write-Host "In:" $location
$Shortcut = $WshShell.CreateShortcut($location + $appName + ".lnk")
$Shortcut.TargetPath = $portableApp
$Shortcut.Save()
}
# Get all matching files and create shortcuts
$files = Get-ChildItem -Path $folder -Recurse
foreach ($file in $files) {
Make-Shortcut -portableApp $file.FullName
}