I am trying to add shortcuts to the start menu at build time - seems easy enough.
But obviously I am doing something wrong.
I have a directory full of portable apps each in their own sub directory.
I made a script that will find all the exe files in there, and put their names an INI file.
Simple enough - it works and I even kick it off from Winbuilder 082 in my Win7PE project
the INI gets created perfectly
So far so good
Then I use a loop to run through all the entries in the INI file and create shortcuts in the start menu
BUT it is not working
Here is what I have right now:
//Copy apps to root of the target drive
DirMake,%TargetDir%\PortableApps
DirCopy,%SourceDir%,%TargetDir%
//run my custom script to create INI file
ShellExecute,Open,%ScriptDir%\GetExeNames.cmd,"#$q%Sourcedir%#$q #$q%ScriptDir%#$q"
IniRead,%ScriptDir%\PortApps.ini,TotalApps,TotalApps,%TotalApps%
//Echo,I got %TotalApps% Apps
//run loop to add shortcuts depending on how many apps were found
Loop,%ScriptFile%,AddShortcuts,1,%TotalApps%
[AddShortcuts]
//read INI and add the shortcut to the EXE file
IniRead,%ScriptDir%\PortApps.ini,Apps,AppName#c,%AppName%
Add_Shortcut,StartMenu,PortableApps,PortableApps\%AppName%\%AppName%.exe,%AppName%
Nothing shows up in the start menu
The files are on the root of the drive - just no shortcuts
What did I mess up?