Xavier Posted April 4, 2005 Share 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 Link to comment Share on other sites More sharing options...
GaryFrost Posted April 4, 2005 Share 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. Link to comment Share on other sites More sharing options...
Xavier Posted April 5, 2005 Author Share 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? Link to comment Share on other sites More sharing options...
buzz44 Posted April 5, 2005 Share 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 Link to comment Share on other sites More sharing options...
Kerberuz Posted April 5, 2005 Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now