Configuration files and variables

All,
Sorry if this is a repost - I thought I posted it earlier today but I can't find it by searching for my username :(
I've got an application that I would like to enable so that it works with a configuration file. In perl I would use one of the CPAN Config modules and I then just create a file in the form of
NAME=VALUE
I want to be able to set various things based on values in the configuration file, but I have no idea what is considered best practice in Java for doing this. The application is a slideshow app, so I want to set things like window size and slide delay.
At a point in the future, I will probably want to make the application able to modify / create this configuration file using the application interface.
In light of these questions, what is the best way of achieving this ?
Thanks in advance,

java.util.Properties can be used to store the name,value pairs specified in the file. New name,value pairs need can also be added to the file back.
The following code may help you out..
I have a file named props.txt having the values
Name1=Value1
Name2=Value2
The following code will read the values, modify the value for a kay and add a new key,value and updates teh file with these changes.
public class ReadProperties {
    public static void main(String[] args)
        try
            String strFileName = "props.txt";
            Properties prop = new Properties();        
            InputStream inp = null;        
            ClassLoader classLoader = null;
         classLoader = ReadProperties.class.getClassLoader();
            if (null != classLoader)
                 inp = classLoader.getResourceAsStream(strFileName);
           else
                inp = ClassLoader.getSystemResourceAsStream(strFileName);     
            prop.load(inp);
            //This block is used to list all the properties in the file
            Set s =  prop.entrySet();
            for(Iterator it = s.iterator();it.hasNext();)
                Map.Entry map = (Map.Entry)it.next();                              
                System.out.println("map.getKey().toString() : values :  " + map.getKey().toString() + " : "+ prop.getProperty(map.getKey().toString()));               
            // To get only a particular key's value, use
            System.out.println("value for Name1 : " +prop.getProperty("Name1"));         
            //This is to set the proeprties dynamically into the object.
            prop.setProperty("Name3","Value3");
            prop.setProperty("Name1","Value1");
            //If the dynamically aded proeprties neded to be stored in the file.. use the following
            prop.store(new FileOutputStream("props.txt"),null);          
        catch (FileNotFoundException e)
            e.printStackTrace();
        catch (IOException e)
            e.printStackTrace();
}Regards,
Raviprakash.D

Similar Messages

  • Location of xdodelivery.cfg delivery Configuration file and how to use it

    I am trying to use xdodelivery.cfg for setting various Server Properties and calling
    this in my Delivery Wrapper Java Program.
    First of all i am not able to find this file anywhere on Oracle Apps APPL_TOP,So i have created this xdodelivery.cfg file in $CUSTOM_TOP/resource directory.
    Then in my Java Program I have set Java system property by calling java.lang.System.getProperties().put("XDO_TOP", "/path/to/xdotop") which points to Physical Directory of as CUSTOM_TOP as /u01/app/appltop/cust
    Then i am Calling req.setServer("PRINTER_NAME") method in Java Wrapper Program to call PRINTER_NAME properties.
    But i am not able to get any success in it. User Guide is mentioning following thing
    "The location of the configuration file is
    {XDO_TOP}/resource/xdodelivery.cfg
    where {XDO_TOP} is a Java system property that points to the physical directory.
    This system property can be set in two ways:
    • Pass -DXDO_TOP=/path/to/xdotop to the Java startup parameter
    • Use a Java API in your code, such as java.lang.System.getProperties().
    put("XDO_TOP", "/path/to/xdotop")
    The system property must be defined before constructing a DeliveryManager"
    Please give me solution of how to go about it .I mean using xdodelivery.cfg file
    Thanks
    Darshan

    Hi,
    I am facing a similar issue while using the configuration file, can you please list out the steps for setting the XDO_TOP Java System property, I have tried setting a Run Time environment variable XDO_TOP to the path of the xdodelivery.cfg file in my qapache port, but the file is not getting picked up.
    Any pointers would be appriciated,
    Thanks,
    Ankul
    [email protected]

  • Reading Encrypted Password from Configuration File and Decrypt it at login

    Hi All,
    My application reads a configuration file to connect to the ORACLE database. The values defined for password are clear text as given below:
    user: 'mh'
    password='abcd1234'
    Is there is any way I can give an encrypted password in the configuration file instead of a clear text file and at the time of login ORACLE decrypts it. I am using ORACLE 11g Database.
    My company have a requirement that passwords are not stored in the clear in properties files. the reason being I suppose that if the password is stored in plaintext someone could hit the property file directly, get the password and then connect to the database with it.
    For a regular user connecting through an Oracle client or SQL Developer they would need to have the plaintext password in order to connect.
    its based on the requirements of
    International Standards Organization Guidance
    ISO 17799 � 9.5.4 requires password management systems to:
    � enforce the use of individual passwords
    � allow users to select and change their own passwords if appropriate
    � enforce a choice of quality passwords
    � force regular changes of passwords
    � maintain a record of previous user passwords to prevent re-use
    � not display passwords when they are being entered
    � store password files separately from application system data
    � store passwords in encrypted form using a one way encryption algorithm
    � alter default vendor passwords following installation of software
    So if I can store the password encrypted using a one way algorithm then hacker/user couldn't decrypt it and then access the database.
    I have feeling there is a way of configuring this in Oracle advanced Security, but just can't quite get it to work.
    Edited by: user5568473 on 20-May-2013 00:05

    So if I can store the password encrypted using a one way algorithm then hacker/user couldn't decrypt it and then access the database.... and neither can your application. Encryption is needed in this case. The decryption must be written into your application. I've written my own in some cases, but finding a library for your development language is a smarter solution.
    One alternative is using an Oracle wallet. It doesn't fit every circumstance and does have some maintenance headaches.
    You can set up a basic secure password store to encrypt and store the password for a given user@instance combination, and then connect to the database without passing a password. SQL*Net adds in the appropriate password from the wallet for when you connect.
    http://www.oracle.com/technetwork/database/security/twp-db-security-secure-ext-pwd-stor-133399.pdf
    Advanced Security Option also allows you to set up a Public Key Infrastructure connections (SSL encryption and/or authentication). It also uses a wallet to store the SSL certificates and credentials. I don't have personal experience on this approach.
    SSL and the wallet allow you to connect to the database similar to CONNECT/@net_service_name or sqlplus /@net_service_namehttp://docs.oracle.com/cd/B28359_01/network.111/b28530/asossl.htm#CIHCBIEG

  • How i can to create a vi, which read from configuration file and i could modify this indicator and save the config data??

    Hi guys,
    I have in my application a subvi which i use to save the configuration of application. I create one file with the last saved configuration, and i would like to open this values and that i could to modify this indicator value, but i cant since to modify i need 'numeric control' and to read the data from file i need 'numeric indicator '...
    I thought, use a numeric control and use the values from file to the default values, but i didnt get to find the property node to adjust it. is it possible? or any different way to get it....??
    Also, i attached the capture file.. i would like the program DOESNT SHOW the question of
    replace the file!!. i would like directly replace the file when i push save.
    Thanks, i attached the vi.
    Attachments:
    options.vi ‏43 KB
    config.cnf ‏1 KB
    capture.GIF ‏43 KB

    Hi Dennis,
    Your 'write to sreadshhet mod' suprime the dialog of replace file or not!, i want when i push save, it show the dialog input name of file and show the default sim000 but when i push this sim000 and this file already exist, then show the dialog to replace or not, if i replace Ok not problem, but when i push cancel replace it shows error eof!!!.
    Your file, only remove this dialog and only replace the file directly.
    i put the capture, when i choose the file to save and the program say to me this file exist and it give me the option of replace or not,i want when i push cancel replace it continues running without get error.
    is it possible?.
    Thanks.
    Regards, Fonsi.
    Attachments:
    capture.GIF ‏71 KB
    example.vi ‏40 KB

  • Save physical channel information in a configuration file and reuse it in another VI

    Dear all,
    I would like to do a pair of VIs. The first VI configures all psychical channels and store the task information (or physical channel name information) in a file and the second VIs can access this file and use the saved information.
    Can anybody show me a good example of this type of application? I've prepare a simple code, but it does not work now. I am not sure if I am using the right functions.
    Attachments:
    Configuration.vi ‏18 KB

    You can use Measurement I/O>>NI-DAQmx>>Advanced>>DAQmx Utilities>>DAQmx Flatten Channel String, and DAQmx Unflatten Channel String.

  • LAF Configuration File and OHW customization

    1) It is not quite clear how to set up my own look and feel without changing the default cabo xss styles. As you show in presentation I have to register XML file (like amazon-laf.xml) that defines custom LAF in uix-config.xml. But I couldn't find the format specification of such configuration file (i mean amazon-laf.xml).
    2) Is there any possibility to separate the node image of collapsed and expanded branches in TOCTreeNavigator mode? I'd like to have two difeerent images instead of single tn_chapter.gif.
    3) When i change the background color of html pages (topics and/or main header) white region appears between frames and frames are resizable. Is it special feature? Setting "border" attribute value of <html:frameset ...> element to 0 (viewTopic.uix) should remove this region.

    I happen to know that LAF customization isn't very well documented in UIX, and that UIX isn't exactly getting a lot of attention within Oracle. So trying to get the exact customization details from the JDev team (the UIX forum isn't active any more) is quite difficult.
    For us outside of Oracle, using OHW/OHJ may require us to do customization. If Oracle doesn't plan to document the customization, I understand, but please don't simply pass us on to another group that will understand the question even less.

  • [SOLVED] Check for old configuration files and directories in ~/

    Hello,
    Since I started with Arch I tried and uninstalled a few programs and would like to check for possible left overs in ~/
    I tried the "lostfiles" script, but it does not seem to check the home directory. Then I followed this: https://wiki.archlinux.org/index.php/Pa … ny_package - But using the suggested alias in my bash, it gives me the below:
    $ pacman-disowned-files
    [sudo] password for [my user]:
    bash: -path: command not found
    bash: /root: Is a directory
    bash: -print: command not found
    What am I doing wrong?
    Regards
    Martin
    Last edited by onslow77 (2015-02-04 23:52:44)

    Hello,
    ohh, I see, I need to do this (in directory where I put the script)
    sh pacman-disowned -files > test.txt
    That solved the usage of the commands, but it does not however list files [in the test.txt file] that do not belong to any package in my ~/ directory (I put a dummy file in my ~/ to see if it got noticed) - but it did not. So how can I list files and directories in my ~/ directory that is not put there by any package that currently is installed?
    Regards
    Martin
    Last edited by onslow77 (2015-02-04 22:49:11)

  • I deleted the System Configuration files and now my WiFi won't work.

    I've always loved Apple but ever since I upgraded to Yosemite I've been having problems with my WiFi connection, it kept dropping. So I decided to look for a solution and I found some forums that said I should go to System Configuration on Finder (Cmd+Shift+G on Finder, then write /Library/Preferences/SystemConfiguration) and that I should delete all the files there. I did just that and now I can't get online at all. Then I read in some other forums that you should only delete certain files... So you can imagine my face when I read that. I tried taking the files I deleted out of the Trash and everything but I still can't connect to the Internet wirelessly. I'm desperate!
    My wireless connection used to drop every 2 minutes, and I had to go to Network Preferences, Assistant, Diagnostic, and that would fix it for another 5 minutes, 10 if I was lucky. But now I can't get online at all. I've tried everything I could think of and nothing.
    I don't care if my Internet drops anymore, I just want it to go back to the way it was. I'm traveling to Argentina in a week and I need this fixed!!
    If anyone can help me I would really appreciate it.

    The following support article is somewhat outdated. Where it refers to booting from an installation disc, you should boot into Recovery (if running 10.7 or later) by holding down the key combination command-R at the chime. If your startup volume is encrypted with FileVault, you’ll have to unlock it in Disk Utility before you can do anything with it.
    Mac OS X: Gray screen appears during startup

  • Dynamic file and variable substitution

    Hi Experts,
    I am working on a scenario where filename is reading from payload.based on header value ,i am creating file along with item records.I did variable substitution also.whenever header value changes ,a new file shud be created.
    I placed two records in my input message...
    <ns1:MT_DC_Send xmlns:ns1="http://urn:psr/ff/DC">
             <Source>
               <b> <FName>XYZ</FName>
                <FType>F</FType>
                <Input>Item1</Input></b>         </Source>
             <Source>
               <b> <FName>ABC</FName>
                <FType>F</FType>
                <Input>Item2</Input></b>
             </Source>
          </ns1:MT_DC_Send>
    but only one file is getting created with name XYZ.txt(I used cont conversion)
    output fiile data is
    <b>
    Item1
    Item2</b>
    Regards,
    Srinivas

    Srini,
    Thanks for the patience. The link which u sent is not working.
    Please find the total scenario in the below URL's, if u find any discrepancies , please let me know.
    <b>Structures defined</b>:http://www.flickr.com/photo_zoom.gne?id=956871756&size=o
    Create corresponding message types & Interfaces(Outbound:OB/Inbound:IB)
    <b>Mapping Logic:</b>
    First change the message occurrence:
    http://www.flickr.com/photo_zoom.gne?id=956027877&size=o
    Part1 :http://www.flickr.com/photo_zoom.gne?id=956871778&size=o
    Part2 :http://www.flickr.com/photo_zoom.gne?id=956871880&size=o
    Part3 :http://www.flickr.com/photo_zoom.gne?id=956871906&size=o
    UDF used in Part3 mapping:
    Test_Function[Cache:Queue, Input:FName, data]
    String local ="";
    for(int j=0;j<FName.length;j++)
    if(j==0)
    result.addValue(""data[j]"");
    local =FName[j];
    else
    if(FName[j].equals(local))
    result.addValue(""data[j]"");
    local =FName[j];
    else
    result.addContextChange();
    result.addValue(""data[j]"");
    local =FName[j];
    Message Mapping results:http://www.flickr.com/photo_zoom.gne?id=956027763&size=o
    <b>Interface Mapping:</b>
    http://www.flickr.com/photo_zoom.gne?id=956027893&size=o
    <b>Interface Determination:</b>
    http://www.flickr.com/photo_zoom.gne?id=956027913&size=o
    <b>Check your ID Objects:</b>
    http://www.flickr.com/photo_zoom.gne?id=956888454&size=o
    <b>Receiver Comm.Channel:</b>
    http://www.flickr.com/photo_zoom.gne?id=956027857&size=o
    Thats it!!!
    Now run the scenario. I used the same data which I used in the above URL's
    <b>SXMB_MONI</b>:http://www.flickr.com/photo_zoom.gne?id=956871938&size=o
    <b>Outputs</b>:http://www.flickr.com/photo_zoom.gne?id=956027957&size=o
    In the output file the first line which u see in the csv files are Item tag as per ur input. The second line is the filename , I don't know how to suppress the filename element in the output file. <b><i>Our friends has to help it out</i></b>.
    <b>Note:</b> While copying the test data from Mapping editor don't forget to remove the Messages element from the source.
    I hope it helps you!!!!!
    Best regards,
    raj.

  • Configuring file and JDBC adapter using MAX DB

    Dear Experts..!!!
    The problem description is i need to store a text file in Database(MaxDB).....
    in receiver communication channel there is database connection in that i want to know what entrys to be done..... and plz do let me know is there any other things to be done to achieve the output.

    Hi Vinod,
           I also do not have idea about MaxDB, but you can refer these links. It will help you out in getting some more information about MaxDB and XI:
    <a href="/people/joerg.hoffmeister/blog/2006/12/07/maxdbsdn:///people/joerg.hoffmeister/blog/2006/12/07/maxdbsdn
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/maxdb">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/maxdb</a>
    Go through the home page of MaxDB on SDN, it has plenty of information to help you.
    Regards,
    Subhasha ranjan

  • Plugging actions into GUI by means of configuration files and

    Hi,
    I'm looking for a tricky design pattern which will permit to plug Action objects into a Swing UI, using xml config files or whatever format. but it seems to be a little difficult, since requests must collect data from GUI components to perform the correct request.
    the Chain of responsabilities pattern could be a solution for it's based on a chain of handlers.the handlers handle one by one the request and finally the request generates a command which will be executed and which will update the model. finally the GUI will be updated by a sort of ModelChangedEvent. The remaining problem to resolve is where to begin.
    what are the interfaces of the handlers for example
    the solution must be the most generic as possible.
    So any suggestions?
    Ramzy
    Paris

    deja vu... did you or somebody else not post this exact message several months ago?  Or am I just mixing up past present and future again? :-D
    What I remember is this discussion coming up, somebody reminding the poster that there is a NoUpgrade option to allow specific files to not be overwritten in /etc/pacman.conf (for example: NoUpgrade = etc/inittab ). and Judd eventually making some kind of additional option to pacman to make it so that NoUpgrade is the default for something if that's what you want.
    I swear I've read your message word for word in the past.  I'm scared now... :oops:
    Dusty

  • Configuration File using a different user id and Password

    Hi,
    I have a SSIS package that I have deployed to various environments and was able to successfully run.  The last environment causes some problems.  At first I thought that it was a connection issue with SQL Server.  I attempted to change the
    user id and password for the db in the configuration file and am still getting errors.
    When I attempt to connect to the db using those same credentials, I can log in to the database.
    Any idea's what to look for?  Is there anything else I can try?
    Thanks in advance and regards,
    Nadim

    Hi,
    Below is the message; Thanks in advance.  The connection credentials are ok; I can log in with them using a udl file for this purpose.
    Microsoft (R) SQL Server Execute Package Utility
    Version 10.0.2531.0 for 32-bit
    Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
    Started:  9:15:28 PM
    Error: 2014-03-01 21:15:46.33
       Code: 0xC0202009
       Source: DPDMultumMain Connection manager "Staging"
       Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "Login timeout expired".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found
    or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. ".
    End Error
    Error: 2014-03-01 21:15:46.33
       Code: 0xC020801C
       Source: DPDMultumMain Log provider "SSIS log provider for SQL Server"
       Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Staging" failed with error code 0xC0202009.  There may be error messages posted before this
    with more information on why the AcquireConnection method call failed.
    COM error object information is available.  Source: "DPDMultumMain"  error code: 0xC0202009  Description: "SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "Login timeout expired".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found
    or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. ".
    End Error
    ----------------------------  Thanks.  ------------------------------

  • Oracle Report is not finding the prt configuration file on 10G?

    Oracle Report is not finding the prt configuration file on reports server 10G.
    On another enviroment I had installed only Forms and Reports services. Here was finding
    the prt configuration file and running ok.
    Now I have "infrastructure" and "forms and reports services" and the reports server is not finding the prt configuration file.
    I have the Internet Directory, Single Sign-on, oca, OC4J_SECURITY services "infrastructure" and the forms and reports services on the same machine.
    Can somebody help me?
    Celso
    Edited by: user575217 on 17/09/2008 06:52

    Definitions (explicit or implicit) on client side overwrite settings on server side. If not set explicitly, parameters like NLS_SORT and NLS_COMP are derived from environment variable NLS_LANG. If NLS_LANG is not set, it defaults to AMERICAN_AMERICA.US7ASCII. If client OS is Windows, the installer sets NLS_LANG according to the language of the OS (and writes the value into the registry), on UNIX NLS_LANG is not set automatically.

  • Configurations file

    Hi, I would like to design an evironment where two plugins can use or share the same configurations file. One possible solution is to make a copy of the configuration file and put it into the two plugins folder, then just make a require 'config' line for both plugins and it should work. But this way it's a little bit hard to maintain because I'll always keep an eyes of those copy. It's there a smart way to make it easier?
    Thanks.
    Br,
    Fovitan

    Hi Fovitan,
    One thing I've learned: Its not good to have any critical files outside the lrplugin folder upon delivery.
    Reason: Users sometimes assume there isn't, and may move it around without asking, or even delete other files that came with it.
    I mean, if the plugin is using some form of link/reference to some files, then it may still find them, I've just never invented a way to handle this, but maybe you could, or make a feature request if you'd need Lr/SDK support for it to work well...
    Case Study:
    =========
    I used to have plugin dev folders and files:
    - Common (lua modules)
    - Plugin X.lrplugin
    - Plugin Y.lrplugin
    Doc X.txt
    Doc Y.txt
    So when it was time to release, I just zipped up the doc, plugin, and common folder and that was all. Very convenient for me, but users kept misplacing the common folder, and then the plugin would not work, sometimes they even let me know there was a problem ;-}
    Now, I have a plugin that releases other plugins and copies "Common modules" into 'lrplugin' subfolder.
    So, its entirely possible you could invent a scheme that uses pseudo environment variables or a common subdirectory outside lrplugin or something, but I'm having a hard time imagining that being foolproof without an installer.
    PS - I actually have a standard subdirectory under lrplugin named 'Preferences' just for config files.
    Typical released plugin nowadays:
    - Plugin X.lrplugin
      - App (optional sidekick app)
      - Framework (common lua modules)
      - Preferences (config support files)
      - Export Presets (if export plugin with built-in presets)
      file_1.lua
      file_2.lua
    (No installer)
    Summary:
    =======
    If you use common/shared/config modules, only way I know is to have a release procedure to copy stuff to lrplugin folder, or an installer to make sure files will be found outside lrplugin folder - but maybe I've missed some brilliant idea you are about to come up with :-)
    Sorry, if I'm explaining too much about something you already understood - I'd be crucified for it on the tougher forums ;-}
    R

  • How to enforce a different configuration file while invoking SAPShcut.exe

    I'm using sapshcut.exe to logon to SAP. Following is syntax of  command that Iu2019m using for that prupose:
    sapshcut.exe /sysname=IDES /client=800 /user=xxxx /pwd=yyyy
    By default, the configuration file (saplogon.ini) that is being used during this process by sapshcut.exe is located in user directory (SAP GUI 7.2). However, Iu2019d like to use a different configuration file that is located at other location (e.g., h:/test/saplogon.ini). SAP has mentioned to use additional parameter "INI_FILE" for that purposes so Iu2019m using following command:
    sapshcut.exe /sysname=IDES /client=800 /user=xxxx /pwd=yyyy /INI_FILE=h:/test/saplogon.ini
    No matter what value I defined for the u2018INI_FILEu2019 parameter, SAP ignores it and always uses default configuration file located in the user directory and if given SAP system does not exist in that configuration file then I report an error. Interestingly, I found that if use 'saplogon.exe' instead of 'sapshcut.exe' and provide same parameter value for 'INI_FILE' parameter then SAP overwrite the default configuration file and uses saplogon.ini defined there. But i cannot use saplogon.exe as I must have to use sapchcut.exe to directly log into SAP system for automation testing.
    I've also found out that the only way sapshcut.exe can overwrite the default ini file is through the use of environment variable "SAPLOGON_INI_FILE". But rather than using environment variable I'd like to define configuration file during the command line.
    Any help would be really appreciated.

    We stumbled upon the same problem. Thank you for mentioning that using the environment variable works.
    This leads to the following single command line as a workaround.
    First set the needed saplogon.ini and then execute in a nested command shell the call to sapshcut.exe
    cmd /c set SAPLOGON_INI_FILE=C:\config\saplogon.ini & cmd /c "%ProgramFiles%\SAP\FrontEnd\SAPgui\sapshcut.exe"  -user= -pw= -language=E -system=XXX -client=100
    This works, but only if there is not already an instance of saplogon.exe running with a different saplogon.ini.
    Best regards,
    Axel.

Maybe you are looking for