How to list the installed softwares from registry using JNI

Hi everybody,
I'm new to JNI.
For example assume Acrobat reader and firefox are the softwares installed in my system
i want to read all the exe files which are below this location.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
I found solution for how to read the following files Example: (AcroRd32.exe and firefox.exe, etc);
which are located in the below path in registry.
by specify the location
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe
by using the RegOpenKeyEx() function.
But now i need to list all the exe files which are under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
Example take Acrobat reader and firefox are the softwares installed means it has to list
AcroRd32.exe
firefox.exe
which is under the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
Through which method i can get all the files.
Provide some sample code for the function too.
kindly reply for this asap.
Also provide the links which is useful for this question.
Regards
Pugazharasu Chandrakesan

I found the answer byself.

Similar Messages

  • How to extract the mouse cursor image without using JNI

    I want to get the image of the mouse cursor of the system using java. The Robot class captures the screen only, but the mouse icon image is not the part of the screen, so it is not easily detected. But we can get the mouse cursor position using API, but how to get the exact image icon, without using JNI. I don't want to generate my own cursor at that position.

    I am building a Remote Desktop kinda app using java..... I want the screen of the remote comp to be viewed on my screen and generate events from my machine to the remote machine. So, I am capturing the screen images of the remote machine. But the cursor is not part of the screen object. i want to extract the cursor image icon from the remote machine to my machine and render the image.

  • How to find the tomcat path from registry?

    Hi,
    How can I find the tomcat path from registry?
    please tell me.
    Thanks
    Gaurav Agrawal

    gauravjlj wrote:
    listen,
    I'm about to create a exe which will do these things.....
    1. first install java
    2. install tomcat
    3. install mysql
    4. deploy my web application with out use of tomcat manager
    first three steps I have done with the help of installer maker. let assume that my tomcat has been installed. but now please tell me how can I deploy my web application.
    that's why I need the tomcat path.
    please tell me.Well, if you've just installed Tomcat you do know where it is so what's the problem? Why not, in fact, include your application in the tomcat directories as you install them? That's all there is to installing tomcat, installing the directories, setting %JAVA_HOME% and (possibly) running the service.bat file.

  • How to get the complete data from Webdynpro using a RFC

    hi guys,
    A form is created in the webdynpro, when that pdf form is called the user have to provide the key field ie the employee number in the form and then when he press the 'go' button a rfc is called and it gives all the details of the employee in the form. Then the user have to input some fields in the form and he have press the submit button. My problem is here, when the user is going to press the submit button that form will be converted to a stream (binary) of data and it is sent to one of the import parameter used in the RFC.
    I have created a RFC and created a import parameter of data type XSTRING, since i want to see what exactly R3 is receiving from web dynpro i am writing this contant in the sever as a text file. When i saw that text file i cant see the complete data.
    And when i searched in R3 the capacity of xstring is 1024 CHAR, so i dont know how to capture the entire data from webdynpro into my R3.
    I give the code what i worte please tell me am i missing anything in my code, or is there any data type which can hold more than 500kb of data which is coming from webdynpro.
    FUNCTION ZSEND_MAIL_ATTACHMENT.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(OUT_PLACE_LEVEL) TYPE  XSTRING OPTIONAL
    *"     VALUE(BIN_DATA) TYPE  INDX_CLUST OPTIONAL
    *"  TABLES
    *"      IT_MESSAGE STRUCTURE  SOLISTI1
    Data Declaration
      DATA: gd_cnt TYPE i,
          gd_sent_all(1) TYPE c,
          gd_error TYPE sy-subrc,
          tab_lines LIKE sy-tabix.
    Structure Declaration
      DATA : BEGIN OF it_file OCCURS 0,
              row(255),
             END OF it_file.
      DATA : BEGIN OF i_split OCCURS 0,
      row(50),
      END OF i_split.
    Internal Table Declaration
      data : it_receivers like table of SOMLRECI1 with header line."occurs 0.
      DATA : objbin LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE. "sOLIX
      DATA : it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
      data : wa_receiver like table of SOMLRECI1 with header line.
      data : it_receiver like table of SOMLRECI1 with header line.
      data : v_bin_data like SOLISTI1 occurs 0 with header line.
      DATA : gd_doc_data LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
    *data bin_data1 like table of solix with header line.
      REFRESH : objbin, it_packing_list, it_receivers, wa_receiver.
      CLEAR   : objbin, it_packing_list, wa_receiver, it_receivers.
      DATA V_SUBJECT(255) VALUE 'HI'.
      gd_doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_message ).
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name = 'SENDFILE'.
      gd_doc_data-obj_descr = v_subject.
      gd_doc_data-sensitivty = 'O'.
      APPEND GD_DOC_DATA.
    Appending The Internal Table it_packing_list
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'RAW'.
      it_packing_list-body_num = tab_lines.
      APPEND it_packing_list.
    *CALL FUNCTION 'GUI_UPLOAD'
    *EXPORTING
    *filename = V_FILE_PATH
    *filetype = 'BIN'
    *TABLES
    *data_tab = BIN_DATA.
      move bin_data to v_bin_data.
      append v_bin_data.
    *move soli to bin_data.
      LOOP AT V_BIN_DATA into objbin.
    MOVE v_bin_data TO objbin-line.
        APPEND objbin.
      ENDLOOP.
      CLEAR it_packing_list.
      DESCRIBE TABLE objbin LINES tab_lines.
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 1.
      it_packing_list-body_start = 1.
      it_packing_list-doc_type = 'PDF'.
      it_packing_list-body_num = tab_lines.
      it_packing_list-doc_size = tab_lines * 255.
      APPEND it_packing_list.
    data file(255) value '/tmp/bali.txt'.
    *Appending The Internal Table it_receivers
    close dataset '/tmp/bali.txt'.
    open dataset '/tmp/bali.txt' for output in text mode encoding default.
    if sy-subrc = 0.
    loop at objbin.
    transfer objbin to '/tmp/bali.txt'.
    endloop.
    else.
    write 'hi'.
    close dataset '/tmp/bali.txt'.
    endif.
      it_receiver-receiver = '[email protected]'.
      it_receiver-rec_type = 'U'.
      it_receiver-com_type = 'INT'.
    APPEND wa_receiver.
    move wa_receiver[] to it_receiver[].
      append it_receiver.
    *Move wa_receiver[] to it_receivers[].
    Clear it_receivers.
    if i_OUT_PLACE_LEVEL NE 0.
    loop at it_receivers into wa_receiver.
       loop at it_receivers into wa_receiver.
    **Function Module To Post The Message To Externa Mail
         CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
             document_data              = gd_doc_data
             put_in_outbox              = 'X'
             commit_work                = 'X'
           TABLES
             packing_list               = it_packing_list
             CONTENTS_TXT               = objbin
             receivers                  = it_receivers
           EXCEPTIONS
             too_many_receivers         = 1
             document_not_sent          = 2
             document_type_not_exist    = 3
             operation_no_authorization = 4
             parameter_error            = 5
             x_error                    = 6
             enqueue_error              = 7
             OTHERS                     = 8.
         clear wa_receiver.
    ENDFUNCTION.

    You have to convert your long string to a table of shorter strings.
    There may be other ways, but one possibility is to use a loop to process you string.
    while (there is something left)
       put the next e.g. 1024 characters in a new row of your table
    endwhile
    If you need to reconstruct your string from the table, don't use simple concatenation since it will remove blanks at the end of lines. Believe me (from experience) sooner or later this will happen.
    Instead you need to either set the subsections of your long string, or insert from the end of your table and keep shifting the contents (probably less efficient) right

  • How to get the \filter directory from registry (or other) during installation of the plugin

    Hello
    I made a script to install the plugin because it needs some libraries to be installed as well, but during the installation, the filter directory isn't defined (it isn't the same for each platform or language)
    for example my filter folder is :
    E:\Program_Files\Photoshop CS2\Modules externes\Filtres
    how do i get this filter directory from registry (or with another way)
    thanks a lot
    Jeff

    sorry i made a little mistake (didn't poste the updated version of my code)
    here is the right code:
    [Code]
    var
      maxnb8bf : Integer;
      maxDirectory:        String;
      nb8bf : Integer;
      PreviousDirectory:        String;
    procedure ProcessDirectory (RootDir: String; Progress: Boolean);
    var
    NewRoot:        String;
    FilePath:        String;
    FindRec:        TFindRec;
    n1 : Integer;
    n2 : Integer;
    begin
    NewRoot := AddBackSlash (RootDir);
    if FindFirst (NewRoot + '*', FindRec) then
    begin
    try
    repeat
    if (FindRec.Name <> '.') AND (FindRec.Name <> '..') then
    begin
    FilePath := NewRoot + FindRec.Name;
    if FindRec.Attributes AND FILE_ATTRIBUTE_DIRECTORY > 0 then
    ProcessDirectory (FilePath, Progress)
    else
    begin
            if (NewRoot <> PreviousDirectory) THEN
            begin;
               if (maxnb8bf < nb8bf) THEN
               begin;
                   maxnb8bf := nb8bf;
                   maxDirectory := PreviousDirectory;
               end;
               nb8bf := 0;
            end;
            n1 := Pos('.8bf', FilePath);
            n2 := Pos('.8BF', FilePath);
            if ((n1 > 0) or (n2 > 0)) THEN
            begin;
               nb8bf := nb8bf + 1;
            end;
            PreviousDirectory := NewRoot;
    end;
    end;
    until NOT FindNext (FindRec);
    finally
    FindClose(FindRec);
    end;
    end;
    end;
    function InitializeSetup(): Boolean;
    var
      V: string;
    begin
      if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Photoshop.exe', 'Path', V) then
        MsgBox('Value is "' + V + '"', mbInformation, MB_OK);
      Result := TRUE;
       maxDirectory := '';
       nb8bf := 0;
       PreviousDirectory := '';
       maxnb8bf := 0;
       ProcessDirectory (V, true);
       //if (maxDirectory <> '') THEN
       // begin;
       //      MsgBox('Value is "' + maxDirectory + '"', mbInformation, MB_OK);
       // end;
    end;
    function NewTargetDir(Param: String): String;
    begin
      Result := maxDirectory;
    end;
    Regards

  • How can I manually install software from recovery partition?

    Hi,
    I'm looking for information about how install preinstalled software after OS upgrade.
    As far as I can see, it is done through 3 different locations:
    Recovery partition (D: drive)
    SMINST Folder (located in %Windows%)
    hp Folder (invisible folder in C
    First step is to identify the machine (brand/model) to allow installation.
    Then, scripts will install packages.
    It should the be possible to manually install the software from the recovery partition.
    As far as this software is bought with the computer (so part of the price) and there is no way of getting the original installers from the support website (only updates available), it would be "fair" to be able to perform a manual install...
    Is there anyone with this knowledge?
    Thx in advance for your help.
    Service is the lifeblood of any organization.
    Everything flows from it and is nourished by it.
    Customer Service is not a department... It's an attitude

    I cannot believe no one replied to you.   I am having the same problem.  I can print but not scan thru the MFNP feature. I'm not sure how/why it is working for printing.   I setup the print driver on all my client laptops to my wifi router/access-point such that its SNMP-enabled on channel 1.  The MNFP port said 161 on the printer when it was working.  Not sure these two protocols are the same... SNMP and MNFP.  I think the latter is Canon's own protocol...not sure how to get it to work with my network. I have a Netgear RV6300 access point connected via wired ethernet to the cable modem which is by Arris (one of those all-in one routers/switch/WAP -- but I'm using the Netgear as my WAP for my WLAN, although the printer gets a DHCP assigned IP on the main router - 10.0.0.9)  At one point I had it set up as static IP 10.0.0.200.  Maybe I will switch back to that...don't know if it will fix scanning though.

  • How to Retrieve the Selected Values from selectOrderShuttle using ADF 11g

    Hi Every One,
    Does anyone has idea how to retrieve the selected Items using shuttle and Order of the items using 'SelectOrderShuttle' component ?
    Thanks

    shuttle's valuechangeevent would fire when you shuttle items back and forth.
        public void selectOrderShuttle1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
            ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
            if (list != null){
                for (int i=0; i<list.size(); i++) {
                    int l = list.size()-1;
                    val = list.get(l).toString(); //returns , delimited string
                    if (val != null){
                        val = val.replaceAll("[\\[\\]]", "");
                        StringTokenizer st = new StringTokenizer (val, ",");
                        int nto = st.countTokens ();
                        for (int j = 0; j < nto; j++)
                            String token = st.nextToken ();                     
                ..........

  • How to store the data read from excel using java code in Ms access database

    Hi. I wrote a code to read the data from excel. May i know how can i save it to Ms access database using java. Also i have many excels. So i should not connect the database using DSN. So is there any other way to achieve this?

    kramish wrote:
    Im pretty sure that Access does support JDBCNo it does not. It supports ODBC.
    just doing a quick Google came up with some pages:
    http://blog.taragana.com/index.php/archive/access-microsoft-access-database-from-java-using-jdbc-odbc-bridge-sample-code/
    http://www.javaworld.com/javaworld/javaqa/2000-09/03-qa-0922-access.html
    Both articles explains how to use the jdbc-odbc bridge. I think I've seen a pure jdbc driver for access but it wasn't from Microsoft and it wasn't free.
    Kaj

  • How to uninstall the installed software updates

    i have installed the update without reading what is it , and now all my compyuter is in hebrew the update called "Mac OS X Update Combined"
    thanks!

    Hi
    It's not the OS X update that is the problem, although it did enable Hebrew as a system language. Here are the instructions to get English (I'm assuming that's your preference?) back as the system language. You may need to follow visually as many of your icon labels will now be in Hebrew.
    Open System Preferences from the Dock (square icon with cogwheels) or from the Apple menu (4 down from the top).
    Click Languages (blue flag on the top line).
    In the list (for Hebrew, the list is on the right), locate US English or UK English, and drag it to the top of the list (above the Hebrew line). Close System Preferences. Log out (Apple menu, bottom option).
    Hope that helps
    Matt

  • How to call third party software from Ecc6 using ABAP

    Hi all,
    I need to execute a third party software using abap coding .
    The software converts doc to pdf, the input from ecc6 would be the file path.
    I need to do this using ABAP.
    thanks
    ziv.

    Hi Ziv
    You can use METHOD cl_gui_frontend_services=>execute
      EXPORTING
        application            = <<<.exe file>>>
        operation              = 'OPEN'
    to run .exe files
    Best Regards
    Yossi

  • How to list the parameters that have been used when running a publication

    All,
    I am trying to run a publication on a crystal report, when I look at the instance, I can see the report title, the status of the instance , run by ... but not the parameter that I have put in the prompt.
    However when I create the Publication base on a crystal report, I do have the opportunity to set a specific  parameter ..
    Now if I go to the same crystal report that has been embeded in my publication and schedule it , afterwards when looking at the history, I can see
    - the status instance, run by who, the report title and the parameter ...
    Any idea is welcome
    thank you
    Philippe

    Hi Petra,
    Please try to check the table OICQ7 with KNUMV from VBAK.
    KR,
    Sergey

  • How to get the measurement data from IMU using SBRIO through SPI?

    Hi All,
    I’am trying to use the SPI communication protocol to realize the bridge between my Vectornav VN100 IMU chip and the LABView through the SBRIO 9602. I amended the SPI sample code from NI website based on my own device and configuration. It compiled and ran well. The problem is the IMU we are using need a 16 bytes command and it will give back a response containing the measurement data. But it seems that with the code I have, I can only send an at most 32 bits command once. Hope anyone who has experience in IMU implementation on LABView could give me some help! Thanks a lot!
    Nick

    Kyle,
    Thank you very much!
    I attached the amended program and the Manual Sheet of the IMU I am using.
    Since I only need to one port, I just amended the configuration for port 1 and adjusted the code for my device. 
    I think the problem exist in the data sending mechanism, you can check the requirement out in P12 and P13 of the manual sheet.
    Best Regards!
    Nick
    Attachments:
    Vectornav VN100.pdf ‏1774 KB
    spi_dual_port_example.zip ‏755 KB

  • How to find the installed CUCM iso is restricted or unrestricted?

    How to find the installed software in CUCM9.1(iso) is restricted or unrestricted??

    Hi,
    what u can do is u can login into OS administration through Putty . u get the details of VMWare .
    Same can be compared and checked with OVA templates in README  file
    http://www.cisco.com/web/software/283088407/97505/cucm_9.1_vmv8_v1.7.ova.README1.txt
    CUCM 7500 user node:
         Cisco Unified Communications Manager (CUCM) configuration that
         supports up to 7500 users per node.
         Details:
         Red Hat Enterprise Linux 5 (32-bit)
         CPU: 2 vCPU with 3600 MHz reservation
         Memory: 6 GB with 6 GB reservation
         Disk: 1 - 110 GB disk with pre-aligned disk partitions
    you can see UNRST in attached snapshot.
    regds,
    aman

  • I have a g4 running os10.4.11, i bought a epson workforce 1100 and tried to set it up but there is not a listing for it when i try to add it before installing the driver software from the supplied cd...anyone know what i can do to get it set up?

    i have a g4 running os10.4.11, i bought a epson workforce 1100 and tried to set it up but there is not a listing for it when i try to add it before installing the driver software from the supplied cd...anyone know what i can do to get it set up?

    Load the drivers and you should then be able to add it in Print Center.

  • HT1349 How do I go about installing software from a disc onto my ipad2? I have no external drive, but do have a PC with iTunes on it. Someone suggested I could load it into iTunes and then sync with the iPad, but this suggestion doesn't seem to work.

    How do I go about installing software from a disc (a language programme) onto my ipad2? Someone told me if I downloaded it to iTunes on my PC I could then sync it to the iPad but hav not been able to do that.

    Even if there was a convenient way, the software will not run on the pad.  Ios is a unique language, and only programs written for ios will run on the pad.   All of the programs are in the app store.  You might look there and see if the company that makes your sfotware also has an ios version, which would be in the store.

Maybe you are looking for

  • HT1349 I lost the last 4 months of my icloud contacts by maybe pressing the wrong button

    I lost the last 4 months of my icloud contacts by maybe pressing the wrong button, how can i get them back please

  • Default PDF reader

    Hello I have an N97 Mini, bought SIM free. I use it as a mobile office. Two problems: I have installed a freeware PDF reader,and the trial version of Adobe Acrobat (now expired) came with the phone (I think - it may have installed when I bought a lic

  • How to update the PHP Class Service back in Flash Builder 4

    I'm not sure if my post title makes any sense or not but let me explain.  I've been working on an application in Flash Builder 4 using the ZendFramework and PHP services and everything is work great. the problem I have is after I make changes to my s

  • APO DP Composite forecast and expost forecast

    Hi every body We want to use composite with standard mode with automatic correction of history by outlier. Univariates are univariates strategy 13 with moving average. It should be possible since I have seen doc explaining that we can store expost fo

  • Work flow triggering

    Hi experts,    I need to trigger an workflow email from my abap program and configure the workflow to get the mail in outlook express. Can anyone pls help on 1. How to configure the workflow to send an email to outlook express