Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Trying to install a service

Posted on 2014-03-13
7
Medium Priority
?
1,242 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

If you don't know how to downgrade, my instructions below should be helpful.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
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 …
Progress

618 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