Jump to content

How to modify the config fle using autoit


raji
 Share

Recommended Posts

hi,

Im new to Autoit scripting.I want to modify the config file & i tried the below code 



#include<_XMLDomWrapper.au3>
 

$Filename=@scriptdir & "\Web.config"
$oxml=ObjCreate("Microsoft.XMLDOM")
$oxml.load($Filename &     @CRLF)


$okey=$oxml.selectSinglenode("//add[@key='ReqPerCode']")
ConsoleWrite($okey & @CRLF)
$okey.setAttribute("Value","True")
ConsoleWrite($okey & @CRLF)

 

My config:

<add key="DualOperator" value="False" />
    <add key="ReqPerCode" value="False" />

 

while running this script "D:\AutoItScripts\changekeyvalue.au3"(4,9) : error: can't open include file "_XMLDomWrapper.au3"." this error is thrown.

 

 

 

Link to comment
Share on other sites

  • Developers

Did you make that file available in the script dir as that isn't a standard UDF library?

Jos

ps..  why are you adding  @CRLF at the end of the filename?

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

That's fine, but you need to get that file that contains these UDF's as they are  not standard, so I suggest you do a search for it on the forum.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...