?
Solved

Trying to install a service

Posted on 2014-03-13
7
Medium Priority
?
1,196 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
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!

 

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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Starting up a Project

764 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