Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to restore a mysqldump on a windows machine, which i perfectly know how. But I need to do it via the Run Dialog in one GO.

So we open the Run Dialog and type :

"[PathToMysql]\mysql.exe" -u [someUser] -p[SomePass] [DatabaseName] < "[PathToDumpFile]"

If I execute the command inside the command prompt (cmd.exe), it works perfectly. But if I run it directly from the Run Dialog, I get the list of all mysql.exe options...

If I skip the (< "[PathToDumpFile]") part and execute the rest in the Run Dialog, I end up with the mysql shell. So there is something in the last part that the run dialog does not like but works in the cmd window.

Anybody has any experience with this or has an alternate suggestion?

If you wonder why from the Run Dialog, it's because it reacts the same as a command sent through WMI, it's just faster to test that way. Since I'll build the command dynamically to run on a remote server that could change whenever, I'd rather not play with a batch file but I'll have to if what I'm looking for proves impossible.

share|improve this question
    
I would say something with the " marks would be the culprit. Can you try to place all arguments inside " to see if it works. –  Doktoro Reichard Sep 13 '13 at 21:05
    
Already tried that, didn't work sadly. –  Nick Sep 16 '13 at 13:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.