Jump to content

problem with FileOpenBox and RunWait redirection


Laddy
 Share

Recommended Posts

Hello

Hello

I have a problem with FileOpenDialog and forwarding a file (InfoSourceVDI.txt) from the command RunWait

The script creates a file documents at the root of my hard drive.

The script creates a file "Documents" at the root of my hard drive.

It is a problem in the Path of my txt file but I can not add quotes

how?

Global $SunVirtualBox = RegRead("HKEY_LOCAL_MACHINE\Software\Sun\VirtualBox", "InstallDir")
Local $ListInfo = @ScriptDir &"\InfoSourceVDI.txt"
Local $message = "Selectionne la source de ton fichier VDI."
Local $var = FileOpenDialog($message, @DesktopDir & "\", "Fichiers VirtualBox (*.vdi)", 1)

IniWrite( @ScriptDir &"\CloneVDIinfo.ini","parametres","Source",$var)

$IniSource = IniRead(@ScriptDir &"\CloneVDIinfo.ini", "parametres", "Source", "NotFound")
RunWait(@ComSpec & ' /c "' &$SunVirtualBox&'VBoxManage.exe"' &" showhdinfo " &$IniSource &" > " &$ListInfo, "", @SW_HIDE)

Path of RunWait :

C:\Windows\system32\cmd /c "C:\Program files\Sun\Virtualbox\VboxManage.exe" showdinfo F:\xpro.vdi > C:\documents and settings\Laddy\Bureau\InfoSourceVDI.txt

I would like this :

C:\Windows\system32\cmd /c "C:\Program files\Sun\Virtualbox\VboxManage.exe" showdinfo F:\xpro.vdi > "C:\documents and settings\Laddy\Bureau\InfoSourceVDI.txt"

Thank a lot for your help

Laddy

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...