Skip to content

Need help with a Simple Batch file

Featured Replies

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.

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.

Join the conversation

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

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.