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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:19:04+00:00 2026-06-01T16:19:04+00:00

I have written a small batch file that copies an exe from solution to

  • 0

I have written a small batch file that copies an exe from solution to the system32 folder.

copy "blah.exe" "%systemroot%/System32"

The batch file works fine and copies the exe if ran from the desktop by double clikcing (placed exe on the desktop as well)

However, I tried doing that from Windows Application by:

Process.Start("sample.bat");

(EXE file and batfile -> Properties -> Output to Copy Always)
The cmd window does come up, but the .exe file is not there in the destination directory. What am I missing here?

  • 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-01T16:19:06+00:00Added an answer on June 1, 2026 at 4:19 pm

    in your batch file change path to that particular folder where you have blah.exe, change to the particular drive and then to particular folderlets say your source folder is C:\test then type cd\test in the batch file, it should be something like:

    C:
    cd\test
    copy "blah.exe" "%systemroot%/System32"
    

    or use copy with complete path e.g

    copy "C:\test\blah.exe" "%systemroot%/System32"
    

    EDIT:
    To copy using CMD try:

    System.Diagnostics.Process process = new System.Diagnostics.Process();
    System.Diagnostics.ProcessStartInfo startInfo = new       System.Diagnostics.ProcessStartInfo();
    startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
    startInfo.FileName = "cmd.exe";
    startInfo.Arguments = "/C copy /b blah.exe %systemroot%/System32";
    process.StartInfo = startInfo;
    process.Start();
    

    Edit 2: Or for batch file

     System.Diagnostics.Process.Start("cmd", "/c sample.bat");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a small XML validator, that takes in an XML file and
I have written a small util in an app that syncs the time from
I have written a small app in C++ consisting of a single EXE file.
I have written a small PHP file that gets the information that was posted
I have written a small chat app that uses mysql + php to facilitate
I have written a small app that puts my bluetooth in discoverable mode for
I have written a small makefile for a few simple C programs that compiles
I have written a small function, which uses ElementTree to parse xml file,but it
I have written a small program, while reading a book about swing, that creates
I have written a small Android project that shows some (image)buttons. It works fine

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.