How to read and update Registry keys on Windows?

I nedd to be able to read registry as well as DACL
to set permissions on WinNT File System.
I did that in VB, but need to do it in Java.
Any help would be appriciated.

I'm not sure if there is any freely available API for reading the registry. I'm really not very knowledgeable with any of the MS Windows operating sytems. I would imgaine the registry keys are compiled- that you can not access them via some plain text file, correct? Is there a DOS command for displaying the results of a particular registry query? This solution would be a hack, but if such a command exists, you could run it via the RunTime class and then parse the output. I would suggest using a search engine, if you have not all ready tried. I am sure that some API exists for reading the registry, but it might be a commerical package.... .... If you find an answer post it. I believe this question has arisen before, but I'm not sure if an answer was posted.

Similar Messages

  • How to read and update the value of property file

    Hi,
    I am not able read the values from property file.
    Please tell me how to read and update the values from property file using Properties class
    This is my property file : - Config.properties its located in D:\newfolder
    Values
    SMTP = localhost
    Now i need to change the value of the SMTP
    New value :
    SMTP =10.60.1.9
    Pls Help me
    Thanks
    Merlin Rosina,

    Post a small (<1 page) example program that forum members can copy and run that demonstrates your problem.

  • Is it possible to install oracle downlaoded from otn and update license key

    Hi Experts,
    I have to install oracle 10gR2 10.2.0.1.
    Customer will provide me the licsense keys but they could not arrange me media/dvd.
    Is it ok to download 10gR2 from url
    http://www.oracle.com/technetwork/database/10201winsoft-095341.html
    and update licsences keys later.
    I need to do installation immediately.
    Please suggest.
    from where to get script to feed license keys
    Thanks & regards

    user12052163 wrote:
    Hi Sir,
    How to update the v$license?http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams093.htm
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/create.htm#sthref418
    http://download.oracle.com/docs/cd/B19306_01/em.102/b25986/oracle_database.htm#sthref681
    v$license is a dynamic view, you don't update it directly.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_1144.htm#REFRN30116
    >
    if we have puchased 10.2.0.1 from oracle then do we not require the oracle media/dvd from oracle?No.
    >
    Can we simple download it from otn and use it?Yes.
    >
    how to unlock locked features in otn forum account download?What?
    >
    >
    or better way to get dvd from oracle itself.I think you can create a service request to do this, but it has been so long since I've done it I don't know if this is still true. Oracle assumes you can connect to the internet, a not unreasonable assumption these days, even if it means downloading to another computer then moving the zips around. Oracle also assumes you want to send all sorts of information over the internet to them from the database, an unreasonable assumption in my view.
    >
    >
    Thanks for your time and support and helpNo problem, just please read and understand what people tell you. You must learn to search the documentation and how to work with support.

  • Creating a external content type for Read and Update data from two tables in sqlserver using sharepoint designer

    Hi
    how to create a external content type for  Read and Update data from two tables in  sqlserver using sharepoint designer 2010
    i created a bcs service using centraladministration site
    i have two tables in sqlserver
    1)Employee
    -empno
    -firstname
    -lastname
    2)EmpDepartment
    -empno
    -deptno
    -location
    i want to just create a list to display employee details from two tables
    empid firstname deptno location
    and same time update  in two tables
    adil

    When I try to create an external content type based on a view (AdventureWorks2012.vSalesPerson) - I can display the data in an external list.  When I attempt to edit it, I get an error:
    External List fails when attached to a SQL view        
    Sorry, something went wrong
    Failed to update a list item for this external list based on the Entity (External Content Type) 'SalesForce' in EntityNamespace 'http://xxxxxxxx'. Details: The query against the database caused an error.
    I can edit the view in SQL Manager, so it seems strange that it fails.
    Any advice would be greatly GREATLY appreciated. 
    Thanks,
    Randy

  • How to read and write a string into a txt.file

    Hi, I am now using BEA Workshop for Weblogic Platform version10. I am using J2EE is my programming language. The problem I encounter is as the above title; how to read and write a string into a txt.file with a specific root directory? Do you have any sample codes to reference?
    I hope someone can answer my question as soon as possible
    Thank you very much.

    Accessing the file system directly from a web app is a bad idea for several reasons. See http://weblogs.java.net/blog/simongbrown/archive/2003/10/file_access_in.html for a great discussion of the topic.
    On Weblogic there seems to be two ways to access files. First, use a File T3 connector from the console. Second, use java.net.URL with the file: protocol. The T3File object has been deprecated and suggests:
    Deprecated in WebLogic Server 6.1. Use java.net.URL.openConnection() instead.
    Edited by: m0smith on Mar 12, 2008 5:18 PM

  • Timeout error while reading and updating in batches in a single transaction

    Problem:-
    In a transaction I do read and update to the database in batches. First batch it runs fine and for second batch it get hanged at
    sqlCommand.ExecuteReader(). The following is not my complete code but required bits of it which will give more information about the problem. At the end of this post please find the error log. Please help me.
    My guess:-
    The problem i see here is with the locks acquired while reading and update still remain when it comes for the second batch which is blocking the next read. But could not find a way to solve it.
    Get connection and open it.
    Begin Transaction.
    sqlUpdateTransaction = sqlUpdateConnection.BeginTransaction(String.Format("UpdateUsageDetailTransaction{0}", storageClassId))
    Get application lock.
    GetApplock
    const String sqlText = @"DECLARE @result int EXEC @result = sp_getapplock Resource=@resourceName,@LockMode='Exclusive',@LockOwner='Transaction',@LockTimeout=@timeout select @result";
    using (SqlCommand sqlCommand = sqlTransaction.Connection.CreateCommand())
    sqlCommand.CommandText = sqlText;
    sqlCommand.Parameters.AddWithValue("@resourceName", resourceName);
    sqlCommand.Parameters.AddWithValue("@timeout", milliSecondsTimeout);
    sqlCommand.CommandTimeout = secondsTimeout;
    sqlCommand.Transaction = sqlTransaction;
    Int32 lockResult = (Int32) sqlCommand.ExecuteScalar();
    Seek and read the range of records.
    using (var sqlReadConnection = new SqlConnection(_connectionString))
    sqlReadConnection.Open();
    SqlTransaction sqlTransaction = _sqlUpdateTransaction;
    _cdrList = CdrOps.FetchByrecordsIdRange(_yearMonth, firstSkid, firstSkid + count - 1, sqlReadConnection);
    sqlReadConnection.Close();
    return _cdrList.Count > 0;
    static public Dictionary FetchByrecordsIdRange(Int32 yearMonth, Int64 startCdrId, Int64 endCdrId, SqlConnection sqlConnection)
    Dictionary cdrList = new Dictionary();
    using (SqlCommand sqlCommand = sqlConnection.CreateCommand())
    sqlCommand.CommandText = "EXEC P_GetCDRData @yearMonth, @startCdrId, @endCdrID";
    sqlCommand.Parameters.AddWithValue("@yearMonth", yearMonth);
    sqlCommand.Parameters.AddWithValue("@startCdrId", startCdrId);
    sqlCommand.Parameters.AddWithValue("@endCdrID", endCdrId);
    sqlCommand.CommandTimeout = DbOps.TwoHourTimeoutValue;
    using (SqlDataReader sqlDataReader = sqlCommand.ExecuteReader())
    FetchrecordPieces(sqlDataReader, cdrList);
    return cdrList;
    Update the records to the list by using a loop Go and check if the number of records read is equal to the batch size then write and flush.
    update()
    _tollUpdatedList.Add((Toll) record);
    _legacyUpdateCount++;
    Dispose.
    Dipose()
    if (_sqlUpdateTransaction != null && _sqlUpdateTransaction.Connection != null)
    sqlUpdateTransaction.Rollback(String.Format("UpdateUsageDetailTransaction{0}", _storageClassId));
    _sqlUpdateTransaction.Dispose();
    _sqlUpdateTransaction = null;
    Commit.
    commit()
    if(_sqlUpdateTransaction != null)
    _sqlUpdateTransaction.Commit();
    _sqlUpdateTransaction.Dispose();
    _sqlUpdateTransaction = null;
    Error log.
    Error: [0x80004005] MonthlyFileDb::Seek - Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

    Thank you, I used beta_lockinfo and observed the following
    spid=59/0/2
    command = SELECT  
    appl=.Net SqlClient Data Provider
    hostprc= 3640
    dbname = DEV_ECAP_P_CAP_ENT_CMN
    prcstatus= SUSPENDED
    spid_ =
    59/0/2
    blklvl = 1
    blkby = 55
    rsctype = 
    locktype =
    lstatus =
    ownertype =
    rscsubtype =
    waittime = 785.139
    waittype = LCK_M_IS
    spid__ = 59/0/2
    nstlvl = 3
    inputbuffer = (@yearMonth int,@startCdrId bigint,@endCdrID bigint)EXEC P_GetCDRData @yearMonth, @startCdrId, @endCdrID
    current_sp = DEV_ECAP_P_CAP_ENT_CMN.dbo.P_GetCDRData
    spid=55
    command = NULL
    appl=.Net SqlClient Data Provider
    hostprc= 3640
    dbname = DEV_ECAP_P_CAP_ENT_CMN
    prcstatus= sleeping
    spid_ =  55
    blklvl = !!
    blkby = 
    rsctype = APPLICATION
    locktype = X
    lstatus = grant
    ownertype = transaction
    rscsubtype = 
    waittime = 
    waittype = 
    spid__ = 55
    nstlvl = 
    inputbuffer =UPDATE UsgDetailCommon SET RunId = t2.RunId FROM UsgDetailCommon t1 INNER JOIN #UsgDetailCommon_Update t2 ON t1.YearMonth = t2.YearMonth AND t1.CdrId = t2.CdrId ;DROP TABLE #UsgDetailCommon_Update
    current_sp = 
    But what is the solution for this...? I am googling and I found similar post but with no solution, here it is not allowing me to post html link 

  • How to read and write a data from extrenal file

    Hi..
    How to read and write a data from extrenal file using Pl/sql?
    Is it possible from Dyanamic Sql or any other way?
    Reagards
    Raju

    utl_file
    Re: How to Create text(dat) file.
    Message was edited by:
    jeneesh

  • Reading and Updating MS Active Directory (AD) through Oracle APEX

    Hi All,
    Has anyone ever read and update the AD components using Oracle APEX?
    I know we can have APEX build in LDAP Authentication, but that is for the Authentication, what about reading other attributes like phone no., department, office etc. from MS AD; and about updating the same information.
    Is Oracle Identity Management the only solution?
    Windows 2008 R2 Server provide SOAP based AD web services (ADWS), has anyone used that with APEX (11g R2 with EPG configuration)?
    Is it possible to have a C# code (through external procedure) which could read and write MS AD; can we use only "C" code in oracle as external proc or C# as well?
    Any pointers would be of great help.
    Thanks,
    Ash

    Ash,
    It's possible to query data from the LDAP server, but it's not as easy as you'd like. I don't know about updating, but fopr querying, you're looking at creating a package using DBMS_LDAP and a pipelined function to get the data. Here's one example from a quick google search; there are others.
    One thing to be aware of that burned me: the default LDAP setting limits requests to 1,000 records. If your search gives more than that, you get an error (and no data at all). So you may find yourself having to use unions to get the full data, which slows things down a bit.
    -David

  • How to Read and Write .XML datas   (HELP Plz...)

    hai everybody
    how to read and write xml datas... plz give clean and simple example..
    bcoz me want to produce such type of module...
    if any one help me .. thats the only way me laid in software ladder
    plz....
    thank u in advance

    thank u for giving idiot..
    but before posting i search in google also..
    but i cant get what me expect..
    thus i posted...
    then who is ................?
    sorry javacoder01
    // plz help me
    Message was edited by:
    drvijayy2k2

  • How to read and write Xml file at client side using JavaScript !

    Hello,
    i am new to javascript.
    I have requirement to read and update XML file at client side.
    Will you please guide what could be the best way to read and update XMl file using javascript.
    Thanks,
    Zuned

    This is a Java forum,not a Javascript forum. Maybe you should ask here [http://www.webdeveloper.com/forum/forumdisplay.php?forumid=3&s|http://www.webdeveloper.com/forum/forumdisplay.php?forumid=3&s].

  • How to read and upload microsoft word file into database using forms9i

    Hi,
    How to read and upload microsoft word file into oracle database using forms9i. I appretiate if anyone can send me example or atleast a sujjetion.
    Thanks in advance
    Mahesh Ragineni

    The webutil package includes the ability up upload from the client to the database. See otn.oracle.com/products/forms and click on webutil for more details.
    Regards
    Grant Ronald
    Forms Product Management

  • How to read and write on ntfs partitions??

    Hello everyone, thanks for viewing my post.  I want to know how to read and write on ntfs partitions under sata hd on my arch64 system.  I'm using kde as my de and dolphin does sees it but can't access it anyway.  I didn't had problem so far on mounting usb drives it just automounts maybe because it is a fat partition not a ntfs?  Please I need your help...Thanks in advance:)

    You will most likely need to rework your fstab.  The one from my desktop is shown below. If you want regular users to be able to access the partition, then you will need to change the gid option as I have done. Although you could create a group just for people you want to have access.
    You will need to know the device that your windows partition is held on of course. In my case it is my first hard disk, first partition, hence /dev/sda1.
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    none /dev/pts devpts defaults 0 0
    none /dev/shm tmpfs defaults 0 0
    /dev/cdrom /media/cdrom auto ro,user,noauto,unhide 0 0
    /dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
    /dev/mapper/nvidia_fbgfhehd1 /boot ext2 defaults 0 1
    /dev/mapper/nvidia_fbgfhehd2 / reiserfs defaults 0 1
    /dev/mapper/nvidia_fbgfhehd3 /var reiserfs defaults 0 1
    /dev/mapper/nvidia_fbgfhehd5 /opt reiserfs defaults 0 1
    /dev/mapper/nvidia_fbgfhehd6 swap swap defaults 0 0
    /dev/mapper/nvidia_fbgfhehd7 /home reiserfs defaults 0 1
    /dev/sdd1 /mnt/andromeda vfat defaults 0 0
    /dev/sda1 /mnt/windows ntfs-3g defaults,user,gid=users 0 0
    My XP partition is set to mount automatically, as I regularly interchange documents between the OS's.
    Hope that helps.

  • How to read and write data in to a specified range of cells(it include multiple row & columns) in excel

    How to read and write data in to a specified range of cells(it include multiple row & columns) in excel

    CVI Comes with a sample project that explains how to read/write to a Excel file: choose "Explore examples..." in CVI welcome page and navigate to <cviSampleDir>\activex\excel folder where you can load excel2000dem.prj.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to read and then extract HTMl source code using java program?

    Hi,
    Could someone tell me how to read and then extract the content of certain tag from html source code. For example, given url http://.... , I would like to know what the <Title> content <Title> in that page is.
    Any help is greatly appreciate.

    Use a URLConnection to make the connection to the page at the needed URL. From the URLConnection, you can get an InputStream that is the stream of data from that page. Just search through the stream and find the <title> tags (don't forget to check for case sensitivity).

  • HT3281 How to download and update iso 6

    I would like to learn how to download and update iso 6 in my iPad

    If you have an iPad 1, the max iOS is 5.1.1. For newer iPads, the current iOS is 6.1.3. The Settings>General>Software Update only appears if you have iOS 5.0 or higher currently installed.
    iOS 5: Updating your device to iOS 5 or Later
    http://support.apple.com/kb/HT4972
    How to install iOS 6
    http://www.macworld.com/article/2010061/hands-on-with-ios-6-installation.html
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect the iPad to the computer, open iTunes. Then select the iPad under the Devices heading on the left, click on the Summary tab and then click on Check for Update.
    Tip - If connected to your computer, you may need to disable your firewall and anitvirus software temporarily.  Then download and install the iOS update. Be sure and backup your iPad before the iOS update. After you update an iPad (except iPad 1) to iOS 6.x, the next update can be installed via wifi (i.e., not connected to your computer).
    Tip 2 - If you're updating via wifi, place your iPad close to your router to preclude getting a corrupted download.
     Cheers, Tom

Maybe you are looking for