scripting@wanadoo.nl




RegWrite()

http://www.scriptlogic.com/kixtart/FunctionLibrary_FunctionList.aspx


actual FunctionLibrary list on 'Scriptlogic' site printer-friendly mirror of UDF topic on 'scripting@wanadoo.nl' site close
25 March 2002 RegWrite()
AuthorRadimus
Action Creates deep registry keys.
SyntaxRegWrite ($key, $value, $data, $type) 
Parameters
  • $key (Required / String) The full path of the reg key to create
  • $value (Required / String) The name of the value create
  • $data (Required / String) the value of the value
  • $type (Optional / String) The type of value, REG_SZ, RED_DWORD, etc. If not specified, it defaults to REG_SZ 
  • RemarksMade to simplify writing of registry values without checking for paths... 
    Returnserror codes (see writevalue). 
    DependenciesNone. 
    Examples
    RegWrite("HKEY_LOCAL_MACHINE\Software\kix\test\regwrite\dword","newvalue1","600","REG_DWORD")
    
     
    Source
    FUNCTION RegWrite ($key, $value, $data, OPTIONAL $type)
      DIM $keyarray,$keypath,$loop,$nul,$ret
      $keyarray=Split("$key","\")
      FOR $loop = 0 TO UBound($keyarray)
        $keypath=$keypath+$keyarray[$loop]+"\"
        IF (KeyExist("$keypath") = 0)
          $nul=AddKey("$keypath")
        ENDIF
      NEXT
      IF NOT $type
        $type="REG_SZ"
      ENDIF
      IF KeyExist("$key")
        $regwrite=WriteValue("$key","$value","$data",$type)
      ENDIF
    ENDFUNCTION ; - RegWrite -
     
      original source of UDF topic. show actual FunctionLibrary list on Scriptlogic site close top
              printer-friendly mirror of UDF topic on scripting@wanadoo.nl site  




    Copyright © 2003 www.scriptlogic.com & scripting@wanadoo.nl - last updated on 20 May 2003


    Site Meter