MSI: Create or rename a folder to the logged on user's userID
Ok, this is a weird one. I've been given an application to package into an MSI, the developers want the MSI to be able to create a folder with the logged on user's userID (C:\Program Files\MyApp\<UserID>\). We deploy applications to machines and any user specific stuff (user profile, HKCU, etc) is usually handled with Active Setup. Can this be achieved using Active Setup?
... and No, I don't know why they couldn't have developed their application to use AppData!!
The username variable could be used with Custom Action "Set Directory" Custom Action Type 35. First create a directory "userIDFolder". Then create a custom action in execute sequence that changes the path of this directory to C:\Program Files\MyApp\%username%, with the help of Custom Action Type 35