Jump to content

Problems scripting Diskpart


Tripredacus

Recommended Posts

I have tried both in winpeshl.ini and startnet.cmd. I have created a text file that sits in system32, but when it executes, it complains that it cannot find the file. Here is the command from winpeshl.ini:

%SYSTEMDRIVE%\Windows\System32\diskpart.exe, "/s %SYSTEMDRIVE%\Windows\System32\diskpart.txt"

Here it is in startnet.cmd:

diskpart /s diskpart.txt

It works fine if I manually run it from the command prompt, using the startnet.cmd example.

Link to comment
Share on other sites


Have you tried it without the quotes? Also would not think that you would need the paths as the shell is launched from system32 and is the default path.

%SYSTEMDRIVE%\Windows\System32\diskpart.exe, /s %SYSTEMDRIVE%\Windows\System32\diskpart.txt

Link to comment
Share on other sites

I found my error in winpeshl did not have /s. And no, for programs with switches in winpeshl.ini, you must use a comma and the remainder of the command in quotes. For example, here is my full winpeshl.ini I am working with:

[LaunchApps]
%SYSTEMDRIVE%\Windows\System32\wpeinit.exe
%SYSTEMDRIVE%\Windows\System32\setres.exe, "1024 768 32 1"
%SYSTEMDRIVE%\Windows\System32\diskpart.exe, "/s %SYSTEMDRIVE%\Windows\System32\diskpart.txt"
%SYSTEMDRIVE%\Progra~1\BurnInTest\bit.exe, "-x -r -c test.bitcfg"

This issue is resolved. :wacko:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...