本文介绍了Diskpart / s命令问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我有一个双启动系统,最近当我启动进入Windows 7时,它会从我的第一个分区更改启动标志,这是grub所在的位置。到我的Windows分区。 

I have a dual boot system and recently when I boot into Windows 7 it changes the boot flag from my first partition, which is where grub is located. To my windows partition. 

我发现我可以通过将我的分区标记为活动来修复此问题,因此我尝试编写脚本。

I found out I can fix this by marking my partition as active and so I am trying to script it.

目前我有这个:

diskpartScript.cmd:

diskpart /s diskpart.txt > log.txt
diskpart.txt:

select disk 0

select partition 1

active

exit

这些单独执行的命令执行完美,并将分区标记为活动状态。但是,当我运行我的批处理脚本它不起作用时,我也尝试以管理员身份运行它并将其添加到关闭脚本部分,但是当我手动将相同的命令输入到diskpart时它只能工作
。我的日志文件也是空的。

These commands executed individually execute perfectly and mark the partition as active. However when I run my batch script it does not work, I also have tried running it as administrator and adding it to the shutdown script section, however it only works when I type the same commands into diskpart manually. Also my log file is empty.

推荐答案

而不是 diskpart / s dispart.txt ,指定位置可以解决问题。 

Instead of diskpart /s dispart.txt, specifying location would fix the problem. 

例。)diskpart /sc:\diskpart.txt

Ex.) diskpart /s c:\diskpart.txt


这篇关于Diskpart / s命令问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 17:06