I did some research and found two different things. Basically i want to install a SP from management studio on the same server where i am running the script.
BOL said to use this:
xp_cmdshell 'C:\Temp\SQLServer2005SP4-KB2463332-x86-ENU /qs /IAcceptSQLServerLicenseTerms /Action=Patch /InstanceName=MSSQLSERVer'
Based on this http://www.databasejournal.com/features/mssql/article.php/3623126/SQL-Server-2005-150-Unattended-installation-150-Part-V.htm sounds like i should be using :
xp_cmdshell 'C:\Temp\SQLServer2005SP4-KB2463332-x86-ENU /quiet'
None of these work, they don't give any error but keeps running. Ideally should take about 45 - 60 mins to complete the install but this one keeps running and i don't even see any log under default folder. My goal is to install sp using management studio on the same server, has anyone done that before?