/build/static/layout/Breadcrumb_cap_w.png
11/02/2016 1133 views

Hi all,

I want to create a shortcut that restarts two win32 services (the services themselves have no dependencies).

I was thinking of using an MSI with an Advertised shortcut and the Service Control table however I'm struggling. I get..... insufficient privelidges (1920.). I have.... run as admin, assigned priviledges to the files (to test), specified my user credentials within the Service Control table (again to test).  I have manually started the services ok and can start them from the comand line so I'm either missing something or the permissions error is a bit of a red herring.

I'm familiiar with the use of SHIMs and SecEdit but not so much the ServiceControl table.

Any help\ideas would be appreciated.

Win7, x86, Installshield

Answer Summary:
0 Comments   [ + ] Show comments

Comments


Answer Chosen by the Author

1
Hi,
why do you need to re-start the services via a shortcut?
You can create and start the services via the SC table. This includes starting them on install and stopping them before de-installation...
Which tool are you using?

Cheers
Phil
Answered 11/02/2016 by: Pressanykey
Red Belt

  • Thanks for the reply.

    I'm using Installshield 2014.

    I want to allow the services to be restarted by the user base (who wont have permisisons\knowledge to do this through services.msc). My thinking is therefore that I place a shortcut that the users can use to restart the services.

    I have been trying what you suggested with an advertised shortcut and the SC table however thats where my1920 ERROR is coming from. The error itself says you dont have permissions, yet I can start the services from both the command line and manually through the using the same credentials.
    • OK,
      the MSI will have to be installed as an Admin / System. Using SecEdit you can create a security.inf file that would (for example) allow authorised users to control (start and stop) the services. This can be implemented using a CA (don't know if IS 2014 can import security.inf files and apply them correctly). Then you can create the short cuts to start / stop the services.
      • Thanks. I will give it a try and let you know.
      • That works, cheers.