Sign in to follow this  
Followers 0
onewayhome

Server 2003 x64 Issues

5 posts in this topic

Does anyone know how to change the default command line interpreter (cmd.exe) that is used for AutoIT's ShellExecute and Run commands? I am having issues with Microsoft's diskpart tool (due to incompatibility with x64 editions of Windows cmd.exe).

Share this post


Link to post
Share on other sites



The command line interpreter is not used for the ShellExecute or Run commands. Please explain your problem with more detail so that we may be able to diagnose and solve your problem.


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

I am trying to run diskpart to automatically partition hard disks attached to the systems I am running. Diskpart itself will run fine when called either from Start->Run or when executing a script from the cmd.exe file located in the c:\Windows\System32 folder. However, when attempting to execute a script from the cmd.exe command line processor from the c:\Windows\SysWow64 folder, it will throw an error regarding not being able to locate the service it needs.

I know that is not a problem related to AutoIT, but the problem is that when I call the batch files to run diskpart from AutoIT using either the "RunWait" or "ShellExecuteWait" command (same problem for both) it will produce the same output errors as when called from the cmd.exe located in the SysWow64 folder.

However, the AutoIT scripts I created will execute without problems when I overwrite the cmd.exe file in the SysWow64 folder with the one from the System32 folder.

I checked any location I can find regarding the path to the system directory (System32) and the path to the default command interpreter (system32\cmd.exe) and the problem should not be coming from any system redirection that I can find.

The command line interpreter is not used for the ShellExecute or Run commands. Please explain your problem with more detail so that we may be able to diagnose and solve your problem.

Share this post


Link to post
Share on other sites

I am still looking for help on this if anyone has any suggestions.

Share this post


Link to post
Share on other sites

However, the AutoIT scripts I created will execute without problems when I overwrite the cmd.exe file in the SysWow64 folder with the one from the System32 folder.

Big no no. You don't ever want to overwrite system files. You now have a 64bit command line interpreter in the 32 bit system folder which could cause you some serious problems, I hope you were only testing this and made a backup which you promptly replaced the 64bit version with.

This should work:

Run(@windowsdir & "\System32\diskpart.exe")
oÝ÷ Øò¢æ«z·¬zÚ'm«lr¸©¶Ëa¢è!vaÆ®¶­s`¤fÆUw&FR67&DF"fײgV÷C²b3#¶&G67&Bæ&BgV÷C²ÄvæF÷w6F"fײgV÷C²b3#µ77FVÓ3"b3#¶F6·'BæWRgV÷C²¥'Vâ67&DF"fײgV÷C²b3#¶&G67&Bæ&BgV÷C² oÝ÷ ÚÞ½éí+ºÚ"µÍ[UÜ]JØÜ    [È ][ÝÉÌLØ]ØÜ]   ][ÝË  ][ÝØÙ    ][ÝÈ  [ÈÚ[ÝÜÙ    [È ][ÝÉÌLÔÞÝ[LÌ][ÝÈ   [ÈÔ   [È ][ÝÙÚÜ^I][ÝÊB[ØÜ    [È ][ÝÉÌLØ]ØÜ]   ][ÝÊB

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
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
Sign in to follow this  
Followers 0