Install a program from vb.net service

Sheldon Livingston
Sheldon Livingston used Ask the Experts™
on
I have written a vb.net service.  I would like to silently install a program using the service.

The program is silently installable... I can do it via the command prompt.

The service, however, doesn't install and I think the issue maybe the space in which the service runs.

Thoughts?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
David FavorFractional CTO
Distinguished Expert 2018

Commented:
For assistance, you'd have to post information about your installation process.

Also, your installer should capture + report all errors encountered during installation.

The reported errors are essential to debugging this.

And, if your disk space is 99.99% used, then you're likely correct... free up some disk space + see if this fixes your install problem...
DevAdminSystem Engineer | .NET Developer | Microsoft MVP | Technical Speaker

Commented:
what are the privileges to which the service run?
in order to install a program you need to have local administrator privileges on the system
Sheldon LivingstonConsultant

Author

Commented:
I think the issue is with the service running under the local system account.
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

Shaun VermaakTechnical Specialist
Awarded 2017
Distinguished Expert 2018

Commented:
I would use TopShelf to create the service instead of the VS template

This is my (albeit C#) Visual Studio Windows Service template
https://www.experts-exchange.com/articles/33372/NET-Windows-Service-Template-using-Timer-Topshelf-and-Log4Net.html
DevAdminSystem Engineer | .NET Developer | Microsoft MVP | Technical Speaker

Commented:
I suggest you to create a specif user for your service and configure the AlwaysInstallElevated policy for this user
ttps://docs.microsoft.com/en-us/windows/desktop/msi/installing-a-package-with-elevated-privileges-for-a-non-admin
https://docs.microsoft.com/en-us/windows/desktop/msi/alwaysinstallelevated
Consultant
Commented:
I have resigned to utilizing a setup program that will install my service AND the other program I want installed.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial