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 7873813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:37:22+00:00 2026-06-03T02:37:22+00:00

I have batch file that sets up the desktop environment for me when I

  • 0

I have batch file that sets up the desktop environment for me when I am writing code. The file is named: SetEnv.cmd and it opens 3 other windows:

  1. An instance of Windows Explorer that is set to the app server’s deploy directory.
  2. A second instance of Windows Explorer that is set to the directory where my deployment file is written.
  3. A console window to start my application server.

Here are the contents of SetEnv.cmd:

Explorer /n,c:\develop\jboss-4.2.3.GA\server\default\deploy
Explorer /n,c:\develop\Project\Mapping\deploy
cmd /c SetupEnvCmd.cmd

And here are the contents of SetupEnvCmd.cmd:

cd C:\develop\jboss-4.2.3.GA\bin
run

Every time I run this, I have to waste time rearranging and resizing the windows. I don’t want to run the windows minimized, because I interact with each window many times while writing and testing code. Is there any way I can control the position and/or size of the windows that are opened from within the script?

  • 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-06-03T02:37:25+00:00Added an answer on June 3, 2026 at 2:37 am

    Try launching your programs from VBS (Windows Script Host) script via the batch file. If your VBS looks like this:

    'FILENAME: SetEnv.vbs
    Set Shell = WScript.CreateObject("WScript.Shell")
    Shell.Run "Explorer /n,c:\develop\jboss-4.2.3.GA\server\default\deploy", 4, False
    Shell.Run "Explorer /n,c:\develop\Project\Mapping\deploy", 4, False
    

    The 4 means to launch the window in its most recent size/position. False means it won’t wait to return before executing the next line of your script. Unfortunately, this doesn’t give you full control of your exact window size/positioning, but it should remember last size/positioning.

    More info here: http://www.devguru.com/Technologies/wsh/quickref/wshshell_Run.html

    So your new SetEnv.cmd could be:

    @echo off
    REM note there's a difference between cscript and wscript
    REM wscript is usually the default launcher
    cscript SetEnv.vbs
    cd C:\develop\jboss-4.2.3.GA\bin
    run
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Windows batch file that processes all the files in a given
I have an application running only on Windows and a batch file that launches
I'm running Windows 2003 Service Pack 2. I have a batch file that runs
I have a batch file that I usually invoke like this: longjob.cmd >result.txt 2>&1
I have a DOS batch file that show some results on the cmd console.
I have a batch file that calls a Windows GUI application. The GUI app
I have a batch file that executes three Maven commands, one after the other.
I have a batch file that starts a Java process in a Windows 2003
I have a batch file that was created for an Oracle database that I'm
I have a batch file that installs WinVNC in about 1 second and starts

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.