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

  • Home
  • SEARCH
  • 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 901671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:35:34+00:00 2026-05-15T15:35:34+00:00

I’m trying to execute iisvdir from an ant script to clean and create a

  • 0

I’m trying to execute iisvdir from an ant script to clean and create a virtual directory before I compile my .net app in Visual Studio. I am running into a couple of strange errors one one build server, but another is running the script without any problem.

    <exec dir="${SYSTEM32}" executable="cscript" failonerror="true">
        <arg line='iisvdir.vbs /create "Default Web Site" ${RS_VIRTUAL_DIR} "${env.WORKSPACE}"'/>
    </exec>

Results in:

     [exec] Microsoft (R) Windows Script Host Version 5.6
  [exec] Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
  [exec]
  [exec] Input Error: Can not find script file "c:\windows\system32\iisvdir.vbs".

And then

    <exec dir="${SYSTEM32}" executable="cmd" failonerror="true">
        <arg line='cscript iisvdir.vbs /create "Default Web Site" ${RS_VIRTUAL_DIR} "${env.WORKSPACE}"'/>
    </exec>

Results in

 [exec] 'reate' is not recognized as an internal or external command,
 [exec] operable program or batch file.

Can someone help me figure out what might be wrong?

  • 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-15T15:35:35+00:00Added an answer on May 15, 2026 at 3:35 pm
    1. Is iisvdir.vbs where you say it is?
    2. To get CMD.EXE to run a command, you need to use the /C switch.

    For example:

    cmd.exe echo Hello
    

    …ignores the parameters and runs another interactive command prompt as a subshell.

    cmd.exe /c echo Hello
    

    …runs the “echo Hello” statement and returns immediately. Note: You can use /K if you want cmd.exe to continue running interactively after running the statement (not usually a good idea in a build script).

    Your command:

    cmd.exe cscript iisvdir.vbs /create etc.
    

    …is getting parsed as if you’d really said:

    cmd.exe /c reat etc.
    

    This is because cmd.exe has (as with most MS command line tools) freaky command line parsing.

    Update: Is this a 64-bit OS? If Ant is a 32-bit task, then it’ll actually (silently) be looking in C:\Windows\SysWOW64 for cscript.exe and iisvdir.vbs. Are they there? If not, you should use C:\Windows\SysNative. In a 32-bit task, this is aliased to the real C:\Windows\System32 directory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.