Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 698681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:18:08+00:00 2026-05-14T03:18:08+00:00

I want to copy war file to tomcat web-app directory using NSIS setup. I

  • 0

I want to copy war file to tomcat web-app directory using NSIS setup. I have successfully installed tomcat and jdk using following script

!define PRODUCT_NAME "App Deploy"
!define PRODUCT_VERSION "1.0"
!define PRODUCT_PUBLISHER "ZippySoft"

SetCompressor lzma

;!include "UserManagement.nsh"


; MUI 1.67 compatible ------
!include "MUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
;!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; Components page
!insertmacro MUI_PAGE_COMPONENTS
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!insertmacro MUI_PAGE_FINISH

; Language files
!insertmacro MUI_LANGUAGE "English"

; Reserve files
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS

; MUI end ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "AppDeploy.exe"
InstallDir "$PROGRAMFILES\App Deploy"
ShowInstDetails show

;Section -SETTINGS
;  SetOutPath "$INSTDIR"
;  SetOverwrite ifnewer
;SectionEnd

;Section "JDK" SEC01
;  File "Prerequisites\jdk-1_5_0_15-windows-i586-p.exe"
;  ExecWait "$INSTDIR\jdk-1_5_0_15-windows-i586-p.exe"
;SectionEnd

;System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("name", "value").r0'
;StrCmp $0 0 error
; ExecWait ProgThatReadsEnv.exe
;  Goto done
;error:
;  MessageBox MB_OK "Can't set environment variable"
;done:

;Section "Tomcat" SEC02
;  File "Prerequisites\apache-tomcat-6.0.16.exe"
;  ExecWait "$INSTDIR\apache-tomcat-6.0.16.exe"
;SectionEnd

Section "Data Submission Tool" SEC03
    File "Prerequisites\DataSubmissionToolFinal.war"
    CopyFiles `$INSTDIR\DataSubmissionToolFinal.war` `c:\DataSubmissionToolFinal.war`
    StrCpy $0 "$INSTDIR\DataSubmissionToolFinal.war" ;Path of copy file from
    StrCpy $1 "c:\DataSubmissionToolFinal.war"   ;Path of copy file to
    StrCpy $2 1 ; only 0 or 1, set 0 to overwrite file if it already exists
    System::Call 'kernel32::CopyFile(t r0, t r1, b r2) l'
    Pop $0 ; pops a bool.  if overwrite is off and there is a file then error will be 1
SectionEnd

There are no script errors but war file is not getting copied to c drive . How to do it? Also is it possible to identify path to JDK and Tomcat installation using NSIS ?

Sorry if the question is too obvious, I am quite new to NSIS..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:18:09+00:00Added an answer on May 14, 2026 at 3:18 am

    Try

    File /oname=c:\DataSubmissionToolFinal.war DataSubmissionToolFinal.war
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want copy pdf file from application path(/data/data/package name) to sdcard.for that i have
I want to copy few files into an existing zip file using ANT script.
I want to copy the newest file that is on a mapped network directory.
I want to copy a resource file from src/main/resources to Cargo Tomcat in /target/tomcat6x/container/webapps
After build my app, i want copy it to specific directory (on Windows 7).
I have project in eclipse (done app). Now I want copy this project, but
I want copy lib dependencies in maven into lib directory when install project. I
I want to copy a selection of lines from a file to another file
I want to copy a xml file from one remote box to a bunch
I want to copy the directory structure without copying the content/files. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.