The umbraco path is hardcoded during installation and also when you do manual or automatic optimization.