Solved

Trying to install a service

Posted on 2014-03-13
7
1,039 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
  • 4
  • 3
7 Comments
 
LVL 40

Expert Comment

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

Author Comment

by:ButtonDownBobby
Comment Utility
same thing
0
 
LVL 40

Expert Comment

by:Vadim Rapp
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:ButtonDownBobby
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ClickOnce Install - Shortcut Question 3 57
powerN  challenge 3 46
nestparen challenge 4 55
creating threads in delphi 1 49
This is an explanation of a simple data model to help parse a JSON feed
A short article about problems I had with the new location API and permissions in Marshmallow
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now