Solved

Trying to install a service

Posted on 2014-03-13
7
1,154 Views
Last Modified: 2014-03-17
I have a bat file that is supposed to install a service.

@echo off

SET PROG="TestCSWinWatcherService.exe"
SET FIRSTPART=%WINDIR%"\Microsoft.NET\Framework\v"
SET SECONDPART="\InstallUtil.exe"
SET DOTNETVER=4.0.30319
  IF EXIST %FIRSTPART%%DOTNETVER%%SECONDPART% GOTO install
SET DOTNETVER=2.0.50727
  IF EXIST %FIRSTPART%%DOTNETVER%%SECONDPART% GOTO install
SET DOTNETVER=1.1.4322
  IF EXIST %FIRSTPART%%DOTNETVER%%SECONDPART% GOTO install
SET DOTNETVER=1.0.3705
  IF EXIST %FIRSTPART%%DOTNETVER%%SECONDPART% GOTO install
GOTO fail
:install
  ECHO Found .NET Framework version %DOTNETVER%
  ECHO Installing service %PROG%
  %FIRSTPART%%DOTNETVER%%SECONDPART% %PROG%
  GOTO end
:fail
  echo FAILURE -- Could not find .NET Framework install
:param_error
  echo USAGE: installNETservie.bat [install type (I or U)] [application (.exe)]
:end
  ECHO DONE!!!
  Pause

Open in new window


I get the following error and the install rolls back.

"system.argumentexception : Must specify value for source"
0
Comment
Question by:ButtonDownBobby
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 39926496
What happens if you run manually installutil testCSWinWatcherService.exe ?
0
 

Author Comment

by:ButtonDownBobby
ID: 39926745
same thing
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 39926802
Then obviously the problem is with TestCSWinWatcherService.exe , should be addressed by the developer of it, probably using information from this article:
http://msdn.microsoft.com/en-us/library/ddhy0byf%28v=vs.110%29.aspx
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:ButtonDownBobby
ID: 39927081
I followed the article and still the same results.  Is there a way to send my project to any of you to have it evaluated? It's just a test service that doesn't really do anything except setup watching directory.
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 39927113
Sure, put in zip file and upload right here.

If e-e says some extensions aren't allowed, post and we will give another place to upload.
0
 

Author Comment

by:ButtonDownBobby
ID: 39927181
I changed the two bat files to have no extension. they are located in the

"TestCSWinWatcherService.zip\TestCSWinWatcherService\TestCSWinWatcherService\bin\Debug"
TestCSWinWatcherService.zip
0
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 500 total points
ID: 39927625
1. in solution explorer, remove your installer1.cs. Open the folder and remove theose files as well.
2. select service1.cs
3. go to the main window, where normally you see the code. For service1.cs this window is grey, and has one item - fswatchertest
4. right-click and "add installer".
5. review two new objects that will appear in the grey window. Specify credentials and start type.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Simple Linear Regression

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question