serr57 Posted June 18, 2010 Share Posted June 18, 2010 Hi everybody, I have to run a dos command to export my portal conf. Here is my script, it doesn't work, but I don't know why. RunWait(@ComSpec & ' /c ' & 'D:\IBM\PortalServer\bin\xmlaccess.bat -in C:\temp\inputfile.xml -user **** -pwd **** -url http://localhost:10038/wps/config -out C:\temp\outputfile.xml', "", @SW_HIDE) Could you help me ? serr57 Link to comment Share on other sites More sharing options...
serr57 Posted June 18, 2010 Author Share Posted June 18, 2010 Hi everybody, I have to run a dos command to export my portal conf. Here is my script, it doesn't work, but I don't know why. RunWait(@ComSpec & ' /c ' & 'D:\IBM\PortalServer\bin\xmlaccess.bat -in C:\temp\inputfile.xml -user **** -pwd **** -url http://localhost:10038/wps/config -out C:\temp\outputfile.xml', "", @SW_HIDE) Could you help me ? serr57 Sorry it was not the good command, here is it: RunWait(@ComSpec & ' /c ' & '"D:\IBM\PortalServer\bin\xmlaccess.bat" -in "C:\temp\inputfile.xml" -user **** -pwd **** -url "http://localhost:10038/wps/config" -out "C:\temp\outputfile.xml"', "", @SW_HIDE) thanks a lot Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 18, 2010 Share Posted June 18, 2010 (edited) Try giving it a valid working directory: RunWait(@ComSpec & ' /c ' & '"D:\IBM\PortalServer\bin\xmlaccess.bat"' & _ ' -in "C:\temp\inputfile.xml"' & _ ' -user ****' & _ ' -pwd ****' & _ ' -url "http://localhost:10038/wps/config"' & _ ' -out "C:\temp\outputfile.xml"', _ "D:\IBM\PortalServer\bin", @SW_HIDE) Edit: Fix stupid typo (left batch file name in working directory path). Edited June 22, 2010 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
serr57 Posted June 22, 2010 Author Share Posted June 22, 2010 Hello, I have tried your script, but no action is taken by it:RunWait(@ComSpec & ' /c ' & '"D:\IBM\PortalServer\bin\xmlaccess.bat"' & _ ' -in "C:\temp\inputfile.xml"' & _ ' -user ****' & _ ' -pwd ****' & _ ' -url "http://localhost:10038/wps/config"' & _ ' -out "C:\temp\WpsConf.xml"', "D:\IBM\PortalServer\bin\", @SW_HIDE) Here is the output of the test : >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\temp\WpsConf.au3" >Exit code: 0 Time: 0.285 In a normal batch file it works perfectly. Also, I would like to know what the role of "_" after &. I have done a script that look like it, and this one is working well Run(@ComSpec & ' /c ' & 'netsh interface set interface name="' & "Local Area Connection" &'" newname="STBA.LU"', "", @SW_HIDE) With no "_". Could you help me Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 22, 2010 Share Posted June 22, 2010 Note fixed stupid typo in my post above. I copy/pasted the batch file path for the working directory and didn't remove the file name. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
serr57 Posted June 24, 2010 Author Share Posted June 24, 2010 Note fixed stupid typo in my post above. I copy/pasted the batch file path for the working directory and didn't remove the file name.Many thanks, the script is work well from nowbyeser57 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