Xavier 0 Posted April 4, 2005 Hi all,I am encountering problems when using Runwait with dos command line.See below (part of the code):$Elements[0] = "Network printers"$RepCible = "u:\Saveprofiles"$TreeCreate[0] = $RepCible & "\" & $Elements[0]RunWait(@ComSpec & " /c " & 'reg export HKCU\Printers " & $TreeCreate[0] & "\HKCU_PRINTERS.reg', "", @SW_HIDE)Runwait won't work cause the Dos "reg export" command need to be in quotes (cause of the space included in network printers); the problem is that Autoit already use quotes for himself .Can anyone help me please to allow the "quoting" of quotes??Thanx in advance.XavierThe newbie Share this post Link to post Share on other sites
GaryFrost 18 Posted April 4, 2005 RunWait(@ComSpec & " /c " & 'reg export "HKCU\Printers ' & $TreeCreate[0] & '\HKCU_PRINTERS.reg"', "", @SW_HIDE) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Share this post Link to post Share on other sites
Xavier 0 Posted April 5, 2005 RunWait(@ComSpec & " /c " & 'reg export "HKCU\Printers ' & $TreeCreate[0] & '\HKCU_PRINTERS.reg"', "", @SW_HIDE)<{POST_SNAPBACK}> Hum it seems like it doesn't work !would yo have a sample of quotes in dos command for me? Share this post Link to post Share on other sites
buzz44 1 Posted April 5, 2005 RunWait(@ComSpec & "" /c reg export HKCU\Printers" & '$TreeCreate[0]' & "\HKCU_PRINTERS.reg"", "", @SW_HIDE) Thats a stab in the dark but try it any way lol. qq Share this post Link to post Share on other sites
Kerberuz 0 Posted April 5, 2005 RunWait(@ComSpec & "" /c reg export HKCU\Printers" & '$TreeCreate[0]' & "\HKCU_PRINTERS.reg"", "", @SW_HIDE)Thats a stab in the dark but try it any way lol.<{POST_SNAPBACK}>I left the msgbox in so you could see the results... Hope this is what you were looking for.$Elements[0] = "Network printers" $RepCible = """c:\temp" $TreeCreate[0] = $RepCible & "\" & $Elements[0] ; RunWait(@ComSpec & ' /c ' & 'reg export HKCU\Printers ' & $TreeCreate[0] & '\HKCU_PRINTERS.reg"', '', @SW_SHOW) ; OR you can do this... $Elements[0] = "Network printers" $RepCible = """c:\temp" $TreeCreate[0] = $RepCible & "\" & $Elements[0] $sString = @ComSpec & ' /c ' & 'reg export HKCU\Printers ' & $TreeCreate[0] & '\HKCU_PRINTERS.reg"'; You now have QUOTES!!! msgbox(0, "", $sString, 10) ; RunWait($sString, '', @SW_SHOW) Kerby Share this post Link to post Share on other sites