I have vs2010 click once winform program that performs the setup for another program. This setup program makes sure that they sql server is installed, creates the database/logins/tables, enables mixed mode, restarts the sql server(2008 express) then adds the stored procedures using the login and preloads some tables to get started. Works fine for winXP. When i do the setup on a Windows 7, it fails when it tries to restart the server.
I'm guessing it's a win 7 UAC 'feature' that prevents it, when I manually restart the server I get a UAC alert. I'm currently using the 'stopService' and 'startService' functions from http://www.csharp-examples.net/restart-windows-service/
Is there another way to do this in code without me having to install the SSMS to manually restart in Windows 7?