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
Solved

Trying to install a service

Posted on 2014-03-13
7
1,096 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
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Embarcadero C++ builder XE10.1 Berlin TRegistry declaration 1 39
Cygwin - GNU GPL License 1 36
Identify two keyboard codes and how to enter them 9 56
Programming Codes 2 21
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

856 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