|
|
|
|
#1 |
|
Senior Member
Join Date: Oct 2009
Location: Germany
Posts: 120
|
Execute diskpart
Hi,
I'm trying to execute the 'diskpart' command during installation. I've tryed using ExecWait, nsExec::exec, ExecDos::exec and ExecCmd::exec but it seems I'm doing something wrong, because the command never succeeds. code: What am I doing wrong? >.< Thanks. ![]() CJ |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
Diskpart is an executable, not a command. Try supplying a full path to the exe file.
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Oct 2009
Location: Germany
Posts: 120
|
I've tried calling the program directly from path C:\WINNT\system32\diskpart.exe. Nothing has changed - the command fails.
Thanks anyway, MSG. That can't be normal, because what are the Exec commands and plugins for if it is not possible to call a executable!? If anyone wants to test it: You can use a empty file so that your system stays healthy. ![]() [ADDED] I forgot to say, I can execute successfully. I just kind of don't get whats the big difference!?code: Last edited by ChocJunkie; 14th December 2009 at 12:42. |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Nov 2009
Location: Germany
Posts: 48
|
Re: Execute diskpart
Try
ExecWait "cmd /c %windir%\system32\diskpart /s %userprofile%\Desktop\test.txt" Maybe this helps. |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Oct 2009
Location: Germany
Posts: 120
|
Thanks, but it doesn't help.
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Oct 2009
Location: Germany
Posts: 120
|
Sorry, I'm not realy into the "System" plug-in right now, but is it possible to execute the command using the plug-in?
|
|
|
|
|
|
#7 | |
|
Senior Member
Join Date: Oct 2009
Location: Germany
Posts: 120
|
Ok, I've tried calling "diskpart" from inside a batch file.
I've I'm executing the batch manualy, everything works correct. When I'm calling the batch using my installer, I get a error message that's ... not nice. Quote:
Thanks. ![]() CJ |
|
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Mar 2006
Location: Dallas
Posts: 462
|
diskpart.exe
The exec commands you are using are not adding an extension and cannot find the file without it. |
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Oct 2009
Location: Germany
Posts: 120
|
I simply don't get it ... I've tried the exec functions from different plug-ins, I've tried calling 'diskpart', 'diskpart.exe', 'C:\WINNT\system32\diskpart.exe' and I've tried executing the command by calling it through a batch file.
Does someone know why I can call 'wmic' using ExecCmd::exec but can't call 'diskpart'?! The problem is, I realy need this functionality. >.< |
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Oct 2009
Location: Germany
Posts: 120
|
Ok, sorry for all the trouble. The problem has been found. On normal windows the installer works fine, but I've used it on a special windows version.
Thanks for all help! ![]() CJ |
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Oct 2009
Location: Germany
Posts: 120
|
Ok, even when using x64.nsh calling diskpart.exe fails.
It's neither mine nor NSIS' fault - Micrsoft itself is causing the proplem. Even if looking for exactly C:\windows\system32\diskpart.exe Windows is redirecting the call will to C:\windows\sysWoW64\diskpart.exe. Because that file is missing, the call fails. Further information: http://www.itnewsgroups.net/group/mi...topic8160.aspx Greetings, CJ |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|