Jump to content

Recommended Posts

Posted

Hello everybody

First time using AutoIT for me, so please have mercy :D
I am using AHK in my WinPE environment and I want to accomplish the following:

I have one disk drive with 2 partitions:
Partition 1 - C 
Partition 2 - D

Now Partition 1 is my UEFI Partition and I want to change the drive letters, that Partition 2 (my Windows partition) uses the drive letter C.
I do this as following:

FileInstall("diskpart\diskpart.txt", @TempDir & "\diskpart.txt", 1) 
SplashTextOn("Windows 10 Migration Tool", "Systemdir is " & @SystemDir & "diskpart.exe", 800, 80, -1, 20)
RunWait("diskpart.exe /s " & @TempDir & "\diskpart.txt") 

This is my diskpart.txt:

sel disk 0
sel par 1
assign letter=f
sel par 2
assign letter=c
exit

diskpart.txt gets copied to the correct location, but the execution somehow doesn't work. If I look at the disk afterwards, everything's still the same. 
If I open up a CMD and execute "diskpart.exe /s X:\Windows\Temp\diskpart.txt", everything works perfectly. Also, the variables @TempDir has the correct value. 
What am I doing wrong?

Posted

whats the command window say if you ("cmd /k diskpart.exe /s ....)?

  Reveal hidden contents

Posted (edited)

i am going to be mildly amused if you get a response from the OP, seeing as he is now sandwiched by the recommendation. 

specualtion:  I imagine it revealed the issue 3 days ago and is fixed. new members rarely feel the need to wrap the thread up in a pretty bow to allow others to learn as well. A common false belief among people new to the forum is that a (novice/syntax/new language) problem would display weakness rather than growth. 

 

Edited by iamtheky
clarity

  Reveal hidden contents

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...