.NET Installutil.exe problems

J

Jamin Mace

I'm trying to create a batch script that will allow me to use the .Net
installutil.exe to install a windows service. I want to be able to specify
the username and pasword in my script so that I don't get prompted. Here is
an example of my script. No matter what I still get prompted. Does anyone
have any Ideas?

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\installUtil.exe
C:\Projects\myservice\bin\myservice.exe username=testmachine\testUser
/password=test1 /unattended

Thanks in advance

Jamin
 
H

Herfried K. Wagner [MVP]

* "Jamin Mace said:
I'm trying to create a batch script that will allow me to use the .Net
installutil.exe to install a windows service. I want to be able to specify
the username and pasword in my script so that I don't get prompted. Here is
an example of my script. No matter what I still get prompted. Does anyone
have any Ideas?

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\installUtil.exe
C:\Projects\myservice\bin\myservice.exe username=testmachine\testUser
/password=test1 /unattended

Open the console, then type: "InstallUtil /?".
 
J

Jamin Mace

yeah.. the /? shows three parameters /username, /password, /unattended. but
they don't see to do anything..I get no errors but it still prompts me.
 
S

Steve

I have never used installutil.exe or tested what I am
about to say, but maybe you need a / infront of the
username such as:

C:\Projects\myservice\bin\myservice.exe /username=testmach
ine\testUser /password=test1 /unattended

Steve
-----Original Message-----
yeah.. the /? shows three
parameters /username, /password, /unattended. but
 
H

Herfried K. Wagner [MVP]

* "Jamin Mace said:
yeah.. the /? shows three parameters /username, /password, /unattended. but
they don't see to do anything..I get no errors but it still prompts me.

For some reason it shows something very different on my machine. But
having a look at your initial commandline, you may want to include a "/"
in front of "username".
 
J

Jamin Mace

ahh...yes you caught my error. Thanks for pointing out the parameter
problem. However, I tried once again and the install still does not work. I
really think this is a flaw in the framework. Perhaps Microsoft orignally
allowed the unattended install, but later decided it would be a security
hole and removed it without updating the documentation. This seems to be a
recurring problem in .Net

Thanks for the help

Jamin
 
Joined
Nov 28, 2008
Messages
1
Reaction score
0
I was facing the same problem too. After much hit and trials i finally got my solution so thought to post the solution here. Although it is a very old post started on 11-12-2003 and i guess it won't be of much use now to Mr Jamin Mace but still it could help lot of people like me still looking to the answer...

>installUtil.exe C:\Projects\myservice\bin\myservice.exe /username=testmachine\testUser /password=test1 /unattended

the approach was correct but the arguments should be followed by the assembly name. ie

>installUtil.exe /username=testmachine\testUser /password=test1 /unattended C:\Projects\myservice\bin\myservice.exe

It Worked in my case using .NET framework 2 and Windows XP Pro.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top