Ajinkya
Ajinkya

Reputation: 1711

Passing parameter to bat file with for installing windows service

I want to create bat file that will install windows service, passed as a parameter.

This is contents of bat file that is working:

installutil "D:\MVisum\MVisumCCS\Message Generator\MessageGenerator.exe"

But this is not generic. I have tried it by: installutil /i 1% and it is not working. I want to pass path of service that I want to install as a parameter to my bat file.

Please help me out.

Upvotes: 0

Views: 892

Answers (1)

Bali C
Bali C

Reputation: 31251

If your non-generic one is working then try this generic one

installutil %1

Usage:

mybatchfile.bat "C:\myservice.exe"

Upvotes: 1

Related Questions