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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:00:36+00:00 2026-05-26T09:00:36+00:00

I am writing an HTML Menu (StartMenu.hta). This menu runs from a DVD, but

  • 0

I am writing an HTML Menu (StartMenu.hta). This menu runs from a DVD, but before it can run it needs to copy a few files to the user’s TEMP folder. These files have to be copied before the menu is opened, because these files are necessary for the use of the menu.

To copy these files, I use the following JavaScript function:

function launch(){
    var shell = new ActiveXObject("WScript.Shell");
    shell.run("xcopy \Data\\VLC\ \%TEMP%\\CSE\\VLC\ /d/e/i/y");
    shell.run("xcopy \Data\\VIEWER\ \%TEMP%\\CSE\\VIEWER\ /d/e/i/y");
    shell.run("StartMenuPC.hta");
}

The problem I have is that the copying and the opening of the menu start simultaneously, instead of the last command waiting for the previous two to finish.
I have considered using batch files instead, but that might encounter a conflict with some firewalls.

I have also tried using while loops and even checking to see if the files exist in their new location, but as I don’t know a lot about HTML. I also don’t want to use a timeout because the disc will only need to copy the files once.

  • 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-26T09:00:36+00:00Added an answer on May 26, 2026 at 9:00 am

    shell.run takes a third parameter which defines if the action should be completed before moving forward or not. So the code should be smth like

    var shell = new ActiveXObject("WScript.Shell");
    shell.run("xcopy \Data\\VLC\ \%TEMP%\\CSE\\VLC\ /d/e/i/y", null, true);
    shell.run("xcopy \Data\\VIEWER\ \%TEMP%\\CSE\\VIEWER\ /d/e/i/y", null, true);
    shell.run("StartMenuPC.hta");
    

    See MSDN Windows Script Host Run Method for a complete explanation

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

Sidebar

Related Questions

Can you set the Z-Index for an image in HTML without writing or embedding
I am writing HTML to an ASP.NET page (from a web service response), and
am a beginner, writing one interface to create a dynamic menu(cascading) using html, javascript
I am writing ul inside ul to make a accordion type of menu. But
This problem is about Javascript writing HTML code for video player. I think there
I am writing a Ruby script that will generate a large flat HTML menu
I have begun writing a CSS and HTML collapsing menu system (AKA an accordion).
I'm writing simple menu module for Joomla! and at this point I'm working on
I am writing html content to a BML file, how can I remove new
I have an issue about writing HTML file with PHP. I have this function

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.