$ruta=exec('echo %PROGRAMFILES%'); $param2 = "Data Source=.\SQLEXPRESS;AttachDbFilename= $ruta\Microsoft SQL Server\MSSQL.1\MSSQL\Data\prueba.mdf";