Sign in to follow this  
Followers 0
serr57

Dos Command

6 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

#3 ·  Posted (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)

:mellow:

Edit: Fix stupid typo (left batch file name in working directory path).

Edited 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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

:mellow:


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

Share this post


Link to post
Share on other sites

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.

:mellow:

Many thanks, the script is work well from now

bye

ser57

Share this post


Link to post
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
Sign in to follow this  
Followers 0