PDA

View Full Version : How do I make an install that uses "Sticky Folders"


Adam
04-28-2008, 12:10 PM
Question
How do I make an install that uses "Sticky Folders"

Answer
In Setup Factory 6.0 there is an option to have a sticky folder. This feature would append a folder to the selected install folder. This is not a built in feature in Setup Factory 7.0 but the workaround is quite easy.

In The "Select Install Folder" screen -> Actions -> "On Next" event add this code in between these 2 lines:

if(g_IsValidPath(strInstallFolderPath)) then
-- insert the code at the end here
-- if there's enough space on the selected drive, proceed to the next screen
if(_SpaceAvailable >= _SpaceRequired) then
-- This code will make a sticky folder
-- Expand the session variable
AppFolder = SessionVar.Expand("%AppFolder%");
-- Append the sticky folder name to this result
AppFolder = AppFolder.."\\StickyFolderName";
-- And set the variable back to a Session variable.
SessionVar.Set("%AppFolder%",AppFolder);
end
end


For more information please see the following topics in the Setup Factory help file:

Program Reference | Actions | SessionVar | SessionVar.Expand (http://www.indigorose.com/webhelp/suf70/Program_Reference/Actions/SessionVar.Expand.htm)
Program Reference | Actions | SessionVar | SessionVar.Set (http://www.indigorose.com/webhelp/suf70/Program_Reference/Actions/SessionVar.Set.htm)