SiMonsterrr Posted March 29, 2018 Posted March 29, 2018 Hello everybody First time using AutoIT for me, so please have mercy 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?
iamtheky Posted March 29, 2018 Posted March 29, 2018 whats the command window say if you ("cmd /k diskpart.exe /s ....)? Reveal hidden contents ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
SiMonsterrr Posted March 29, 2018 Author Posted March 29, 2018 On 3/29/2018 at 9:23 PM, gillesg said: Add the full path to diskpart.exe Expand I tried before with RunWait(@SystemDir & "\diskpart.exe /s " & @TempDir & "\diskpart.txt") it didn't make a difference.
gillesg Posted April 1, 2018 Posted April 1, 2018 I tested it on my side. to see what happens use @ComSpec & " /k " & @Systemdir RunWait(@ComSpec & " /k " & @SystemDir &"\diskpart.exe /s " & "d:\users\gigros\Downloads\dkpart.txt" )
iamtheky Posted April 1, 2018 Posted April 1, 2018 (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 April 1, 2018 by iamtheky clarity Reveal hidden contents ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now