Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

installservice script for windows

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to write installservice.cmd script and how to install service for windows
Posts: 6663
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By consulting the WL documentation ?
Posts: 29
anil policharla
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
iam asking this script how to modify it iam getting error

@rem *************************************************************************
@rem This script is used to install WebLogic Server as a Windows Service.
@rem To create your own start script for your domain, simply set the
@rem SERVER_NAME variable to your server name then call this script from your
@rem domain directory.
@rem This script sets the following variables before installing
@rem WebLogic Server as a Windows Service:
@rem WL_HOME - The root directory of your WebLogic installation
@rem JAVA_HOME - Location of the version of Java used to start WebLogic
@rem Server. This variable must point to the root directory of a
@rem JDK installation and will be set for you by the installer.
@rem See the WebLogic platform support page
@rem ( for an up-to-date list of
@rem supported JVMs on Windows NT.
@rem PATH - Adds the JDK and WebLogic directories to the system path.
@rem CLASSPATH - Adds the JDK and WebLogic jars to the classpath.
@rem Other variables that installSvc takes are:
@rem WLS_USER - admin username for server startup
@rem WLS_PW - cleartext password for server startup
@rem ADMIN_URL - if this variable is set, the server started will be a
@rem managed server, and will look to the url specified (i.e.
@rem http://localhost:7001) as the admin server.
@rem PRODUCTION_MODE - set to true for production mode servers, false for
@rem development mode
@rem JAVA_OPTIONS - Java command-line options for running the server. (These
@rem will be tagged on to the end of the JAVA_VM and MEM_ARGS)
@rem JAVA_VM - The java arg specifying the VM to run. (i.e. -server,
@rem -client, etc.)
@rem MEM_ARGS - The variable to override the standard memory arguments
@rem passed to java
@rem jDriver for Oracle users: This script assumes that native libraries
@rem required for jDriver for Oracle have been installed in the proper
@rem location and that your system PATH variable has been set appropriately.
@rem For additional information, refer to the WebLogic Server Administration
@rem Guide (
@rem *************************************************************************

@echo off

set WLS_USER=weblogic
wet WLS_PW=weblogic
set WL_HOME=C:\bea1\weblogic91

SET JAVA_HOME=C:\bea1\jdk150_04

set ADMIN_URL=http://adminserver:7501
set DOMAIN_NAME=testing
set SERVER_NAME=testing

set USERDOMAIN_HOME=c:\bea1\user_projects\domains\testing

call "%WL_HOME%\common\bin\commEnv.cmd"

@rem Check that the WebLogic classes are where we expect them to be
if exist "%WL_HOME%\server\lib\weblogic.jar" goto checkJava
echo The WebLogic Server wasn't found in directory %WL_HOME%\server.
echo Please edit your script so that the WL_HOME variable points
echo to the WebLogic installation directory.
goto finish

@rem Check that java is where we expect it to be
if exist "%JAVA_HOME%\bin\java.exe" goto runWebLogic
echo The JDK wasn't found in directory %JAVA_HOME%.
echo Please edit your script so that the JAVA_HOME variable
echo points to the location of your JDK.
goto finish


if not "%JAVA_VM%" == "" goto noResetJavaVM
if "%JAVA_VENDOR%" == "BEA" set JAVA_VM=-jrocket
if "%JAVA_VENDOR%" == "HP" set JAVA_VM=-server
if "%JAVA_VENDOR%" == "Sun" set JAVA_VM=-server

if not "%MEM_ARGS%" == "" goto noResetMemArgs
set MEM_ARGS=-Xms32m -Xmx200m


@echo on


@echo ***************************************************
@echo * To start WebLogic Server, use the password *
@echo * assigned to the system user. The system *
@echo * username and password must also be used to *
@echo * access the WebLogic Server console from a web *
@echo * browser. *
@echo ***************************************************

rem *** Set Command Line for service to execute within created JVM

@echo off

if "%ADMIN_URL%" == "" goto runAdmin
@echo on
set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME%\"%ADMIN_URL%\" -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE%\"%WL_HOME%\server\lib\weblogic.policy\" weblogic.Server"
goto finish

@echo on
set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME% -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE%\"%WL_HOME%\server\lib\weblogic.policy\" weblogic.Server"

rem *** Install the service
"%WL_HOME%\server\bin\beasvc" -install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -extrapath:"%WL_HOME%\server\bin;%JAVA_HOME%\bin" -password:"%WLS_PW%" -cmdline:%CMDLINE%


Now, i did not copy the beasvc.exe from v8.1, just the installSvc.cmd.I executed installSvc.cmd in command-prompt, and i got this error ( the end part of it ):

C:\bea1\weblogic91\server\bin>"C:\bea1\WEBLOG~1\server\bin\beasvc" -install -svc
name:"beasvc testing_testing" -javahome:"C:\bea1\jdk150_04" -execdir:"c:\bea1\us
er_projects\domains\testing " -extrapath:"C:\bea1\WEBLOG~1\server\bin;C:\bea1\jd
k150_04\bin" -password:"" -cmdline:"-server -Xms32m -Xmx200m -XX:MaxPermSize=128
m -XX:+UseSpinning -classpath \"C:\bea1\patch_weblogic910\profiles\default\sys_
a1\WEBLOG~1\server\lib\webservices.jar;\" -Dweblogic.Name=testing
\" -Dweblogic.ProductionModeEnabled=true\"C:\bea1\WEBLO
G~1\server\lib\weblogic.policy\" weblogic.Server"
CreateService failed - The specified service already exists. (0x431)


Posts: 2658
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. What does this error mean? (look into the services in the control panel to see if something like "beasvc testing_testing" shows up).

Setting Up a WebLogic Server Instance as a Windows Service
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic