Jump to content


  • 0
Malik4u

Need help with a Simple Batch file

Question

Hi,

I have following three commands that I want to run in a batch file (at x:\Windows\system32 and I am at the correct rirectory by default), commands are as:

bcdedit /set {default} device partition=c:

bcdedit /set {default} osdevice partition=c:

bcdedit /set {bootmgr} device partition=c:

I tried to write batch file but when I call it simply shows me the above commands but not worked for me, so please correct me what is the wrong with my batch file. Here is my Batch file that I created.

@echo off

echo cd x:\Windows\system32

echo bcdedit /set {default} device partition=c:

echo bcdedit /set {default} osdevice partition=c:

echo bcdedit /set {bootmgr} device partition=c:

Please help in this regards.

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi,

I have following three commands that I want to run in a batch file (at x:\Windows\system32 and I am at the correct rirectory by default), commands are as:

bcdedit /set {default} device partition=c:

bcdedit /set {default} osdevice partition=c:

bcdedit /set {bootmgr} device partition=c:

I tried to write batch file but when I call it simply shows me the above commands but not worked for me, so please correct me what is the wrong with my batch file. Here is my Batch file that I created.

@echo off

echo cd x:\Windows\system32

echo bcdedit /set {default} device partition=c:

echo bcdedit /set {default} osdevice partition=c:

echo bcdedit /set {bootmgr} device partition=c:

Please help in this regards.

 

 

Try this:

 

@echo off

cd x:\Windows\system32

bcdedit /set {default} device partition=c:

bcdedit /set {default} osdevice partition=c:

bcdedit /set {bootmgr} device partition=c:

 

"echo" in front of a line means the "program" should write this line on the screen as text. It doesn't execute the line.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.