Application - current vi path different - config file

If I want to use config files (ini files) with an application, to store settings between runs of the application,
I would like to name the conifg file the same as the application, just with a different ending:
application.ext with config file application.ini
For this, I am using the 'current vi's path' and work from there.
I realised that the 'current vi's path' of the application is different from the one of the vi itself, even with the original vi being in the same directory as the application.
The application returns the vi in a path that includes the applicatinon as a directory.
e.g.
\programs\application.exe
gives path
\programs\application.exe\original.vi
Thus, it seems that I need a different way of stripping/appending the path for the original vi and for the application, when creating the path for the configuration file.
Is there a way around it?
Is the only way to program a 'smart' stripping tool, that checks if the current path includes an xxx.exe part, and then creates the path for the config file accordingly? (This is what I will do, if there is no simpler solution)
Thanks for any help,
Stephan

Hi Stephan
You don't need a 'smart' stripping tool. Just check in your main vi if it is run by the LV runtime environment or the LV dev. system. Depending on this, either strip the path once or strip it twice.
Thomas
Message Edited by becktho on 12-21-2005 03:12 PM
Using LV8.0
Don't be afraid to rate a good answer...
Attachments:
StripPath.vi ‏16 KB

Similar Messages

  • Log4J: Different config files for different applications?

    Hi all.
    If you run an application which uses Log4J logging it's enough to place the log4j.xml file in the Classpath.
    But how do you specify which configuration file to use during startup of a Java programm if they need different configurations but have the same classpath?
    Thanks in advance
    Carsten

    my log4j knowledge is a bit outdated - but somewhere in your apps you should have a line that loads the properties file, something like:PropertyConfigurator.configure(path_to_log4j.properties);And the log4j.properties file should be in your app's EAR file somewhere - and since the app server creates a context for each application, I don't think there would be any "bleed over". So, does your setup differ from this somehow?
    Good Luck
    Lee

  • Deployment Tool, Different Config Files, Same Results

    I should mention that I'm generating App-V 5 packages for Office 2013. Maybe this question belongs in the App-V forums.
    I can't seem to create a configuration file for the Office Deployment Tool that does what I want. This configuration:
    <Configuration>
    <Add SourcePath="D:\Something\Something\Source\Full Suite" OfficeClientEdition="32">
    <Product ID="ProPlusVolume">
    <Language ID="en-us" />
    </Product>
    <Product ID="VisioProVolume">
    <Language ID="en-us" />
    </Product>
    <Product ID="ProjectProVolume">
    <Language ID="en-us" />
    </Product>
    </Add>
    </Configuration>
    generates an App-V package with the "basic" Office apps (Word, Excel, etc.), along with Visio and Project. That part is fine.
    If I remove the Product elements for Project and Visio, I expect that a "basic" Office package will be created. However, Visio and Project are still in the package, and they are indeed usable. We have limited licenses for Project and Visio, so
    I would like them not to be deployed to every machine.
    I have tried giving the two configuration files their own source folders, that is, running the download command once for each configuration file and telling it to download to two different folders... same results.
    This is similar to John Marcum's follow-up question at
    https://social.technet.microsoft.com/Forums/office/en-US/c9462446-7744-4e3e-8c25-dbcd185a17e4/creating-lync-and-onenote-appv-packages?forum=officesetupdeploy

    Kazzan's reply technically does work, and it is a viable option. However, that reply led me to wonder what the Office Deployment Tool (ODT) is doing to a machine that makes generating different packages difficult or impossible.
    I found that the ODT leaves files behind in the current user's Temp directory, after the package generation is finished. At least one of these folders (named Microsoft Office 15) contains the file system contents of the App-V package. So, I decided
    to clear the Temp directory in between runs of the Office Deployment Tool. Simply clearing this directory was not enough to solve the problem, but I'm still doing it as part of the build process.
    Running Process Monitor showed me activity in HKCU\Software\Microsoft\Office\15.0\ClickToRun. Deleting this entire key does not appear to be necessary, and I'm not sure what that would do if you actually used Office Click-To-Run on the same machine on which
    you're running ODT.  So, I deleted just these keys:
    HKCU\Software\Microsoft\Office\15.0\ClickToRun\Configuration
    HKCU\Software\Microsoft\Office\15.0\ClickToRun\ProductReleaseIDs
    HKCU\Software\Microsoft\Office\15.0\ClickToRun\Scenario\APPVPACKAGE
    Deleting those keys, along with the Temp directory cleanup, is sufficient to let me build multiple Office 2013 App-V 5 packages on the same computer.

  • Source path Flex config files not updated in generated output

    I have a project, built using Flash Builder 4.0 on Mac OS X 10.6.
    One of my source directories is src/main/webapp which contains a WEB-INF directory with this structure:
    webapp
              - WEB-INF (applicationContext.xml etc)
                        - - classes
                        - - flex (services-config.xml, remoting-config.xml, proxy-config.xml, messaging-config.xml)
                        - - lib
    In properties, under Flex Build Path I have set src/main/webapp as an additional source folder.
    When the project compiles, all the artifacts are created, and all of the above, including *.xml files under
    WEB-INF are copied to the output folder, except for the WEB-INF flex directory which has the four xml
    configuration files.
    The same happens when I create a bin-release folder using the Project/Export Release Build menu.
    Any ideas why just the WEB-INF/flex directory is not being copied to bin-debug or bin-release?
    Thanks.

    I don't know a whole lot about beehive pageflow and I haven't done this myself, but I do believe you have run apt to have it generate the various other files pageflow and controls needs. I found some information in the pageflow docs:
    http://beehive.apache.org/docs/1.0.2/netui/projects.html#building
    http://beehive.apache.org/docs/1.0.2/infra/beehive-ant-macros.html
    Greg

  • How to specify a different config file for a weblogic 6.1 server

    Hi,
    I have 2 weblogic startup scripts (startWebLogic.sh and
    startWebLogic_recovery.sh) for the same domain.
    startWebLogic.sh uses config.xml file.
    I would like to use config_recovery.xml as the configuration file for startWebLogic_recovery.sh
    How would I do this ?
    I am using WebLogic Server 6.1 on SunOS 5.8 / HP-UX 11.0.
    Appreciate any help.
    Regards
    Gunaseelan Venkateswaran

    Hello Gunaseelan,
    This is not possible because WLS 6.1 needs a config.xml file, exactly this
    name, to start.
    What you can do is to define a recovery domain, called myrecovery_domain for
    instance, and put the config_recovery.xml, renamed "config.xml".
    Hope this helps,
    Ludovic.
    Developer Relations Engineer
    BEA Support.
    "Gunaseelan Venkateswaran" <[email protected]> a écrit dans le message
    news: 3cd6a324$[email protected]..
    >
    Hi,
    I have 2 weblogic startup scripts (startWebLogic.sh and
    startWebLogic_recovery.sh) for the same domain.
    startWebLogic.sh uses config.xml file.
    I would like to use config_recovery.xml as the configuration file forstartWebLogic_recovery.sh
    >
    >
    How would I do this ?
    I am using WebLogic Server 6.1 on SunOS 5.8 / HP-UX 11.0.
    Appreciate any help.
    Regards
    Gunaseelan Venkateswaran

  • Appropriate directory for themes, logs and config files

    Hello, I would like to know what would be the appropriate directory to place a application's config directory that contains themes, logs and config files for that application.
    I want that directory to be accessible but since ~/Library is now invisible on Lion, that kinda rules it out for accessibility. The only place left now would be ~/Applications, but I don't think it was intended for that.
    There is also an invisible config file that contains the path to the config directory and that's what the app uses to know where the config directory is located. The current emplacement of that config file is in the home directory, which I think is not in accordance to Apple's guidelines. So where should I place that file?
    What should I do?
    Thanks

    Whee wrote:
    I wish I could choose both of your answers as being the good one.
    Thanks for the additional info about the Home and Documents directory, that clears a lot of things up. I needed to know that too. Do you know where that documents is located now? http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFileSy stem/Articles/WhereToPutFiles.html
    Apple prefers you use the system API for these things. Here is one document that explains it.
    So even though I won't use NSDefaults because what I am working on is a cross Platform app that is in C, I will put the config file in ~/Library/Preferences and the config folder in ~/Library/Application Support.
    Almost everything has a C equivalent. You can use CFPreferences instead. I strongly urge you to use one of the system APIs instead of trying to write your own files. For one thing, the user can put their home directory virtually anywhere they want. For another, Lion is rewriting the underlying architecture with the new screen sharing and iCloud. If you use the system APIs, your program will work properly with any new technologies or custom network settings.

  • [SOLVED] Parsing simple config files in pure bash

    Hi everyone,
    I'd like to implement a bash function to parse a simple config file for a script I've wrote. The conifg file contains different sections for different scenarios. Here's an example how it should look like:
    # configuration file
    # global settings
    global {
    DATE_PREFIX="-I"
    SSHFS_OPTS="-C"
    EXT_FULL="full"
    EXT_DIFF="diff"
    EXT_CATALOGUE="catalogue"
    DAR_OPTS="-v -m 256 -y -s 600M -D"
    DAR_NOCOMPR="-Z '*.gz' -Z '*.bz2' -Z '*.zip' -Z '*.png'"
    # system settings
    system {
    DAR_OPTS="-v -m 256 -y -s 200M -D"
    It contains some settings which are global for the whole script and special settings groups which can be used to overwrite global settings.
    The function to parse this config file looks as follows:
    #!/bin/sh
    CONFIG="/home/chi/.daruprc"
    function readconf() {
    match=0
    while read line; do
    # skip comments
    [[ ${line:0:1} == "#" ]] && continue
    # still no match? lets check again
    if [ $match == 0 ]; then
    # do we have an open tag ?
    if [[ ${line:$((${#line}-1))} == "{" ]]; then
    # strip "{"
    group=${line:0:$((${#line}-1))}
    # do we have a match ?
    if [[ ${group} -eq $1 ]]; then
    match=1
    continue
    fi
    continue
    fi
    # found close tag but still no match - continue
    elif [[ ${line:0} == "}" && $match == 0 ]]; then
    continue
    # found close tag after config was read - exit loop
    elif [[ ${line:0} == "}" && $match == 1 ]]; then
    break
    # got a config line return it
    else
    echo $line
    fi
    done < "$CONFIG"
    for line in $(readconf "system"); do
    echo $line
    done
    As you can see I try to just echo the lines at the moment. And here's the problem: It seems I have some " escape issues, if I run it I get the following output:
    ./parseconfig.sh
    DATE_PREFIX="-I"
    SSHFS_OPTS="-C"
    EXT_FULL="full"
    EXT_DIFF="diff"
    EXT_CATALOGUE="catalogue"
    DAR_OPTS="-v
    -m
    256
    -y
    -s
    600M
    -D"
    DAR_NOCOMPR="-Z
    '*.gz'
    -Z
    '*.bz2'
    -Z
    '*.zip'
    -Z
    '*.png'"
    As you can see there are way to much newlines - which leads to problems when I try to use "eval" to initialize the variables.
    I am sure I am missing something simple here, however I am looking for a solution for a few days now - maybe one of the bash gurus on this board can enlighten me ;-).
    Thanks in advance
    PS.: I am trying to do this in pure bash because the script also needs to run on embedded machines with very low memory like my router on which I don't have sed or awk or the like. I also know that I could for example just use different config files to circumvent the whole parsing - but I am just curious if this could work the way I like ;-).
    Last edited by chimeric (2007-11-04 23:20:58)

    chimeric wrote:
    Hi MrWeatherbee,
    well yes, but I want to assign (eval) these lines to get variables out of them. Since the while loop is trapped in its' own subshell I need to return the lines into the parent one to be able to make these variables "visible" in the script itself.
    Right. But I was trying to show you that the way you were going about it wouldn't work at a very fundamental level.
    Without changing too much code just for a quick and dirty demo,
    change:
    # got a config line return it
    else
    echo $line
    fi
    done < "$CONFIG"
    # got a config line return it
    else
    line_array=( "${line_array[@]}" "$line" )
    fi
    done < "$CONFIG"
    numarrayelements=${#line_array[@]}
    and then in the main program code, do this:
    readconf "system"
    for index in $( seq $numarrayelements ); do
    line=${line_array[(($index-1))]}
    echo $line
    done
    Using an array to collect the good lines from the function allows you to reuse them later for whatever purpose. Although other ways exist, you certainly don't want to do what you originally did.
    Edit:
    I posted the code with an incorrectly referenced variable and had to fix it.
    Last edited by MrWeatherbee (2007-11-04 22:46:34)

  • I imported pics to catalogs on different external hard drives.  Later renamed external HDs.  I want to combine catalogs and have my source (NEF) files all together on one drive. Can I merge cats and will new path to source files be correct if when inporti

    I imported different trips to different catalogs on different external hard drives.  Later renamed external HDs.  I want to combine catalogs and have my source (NEF) files all together on one drive.  I’m not really sure how to get those source files back and get rid of the extra long path to where the source files are now located. If I re-link files to their current catalog (many different paths to files in same catalog) can I merge (import catalogs) into one master catalog?  Will the new (Master catalog) have the correct link to the source file?  If not, how or can this be done?
    I have tried to explain my situation as clearly as I can.  Do you understand my situation?
    This maybe something you don’t have time to help me with.  If not can you suggest somewhere I can get an answer?  I really need help.  PLEEEZZZ HELP ME.
    Bruce Schuerman
    Norman, OK
    405_514-4875 (call collect)
    [email protected]

    I imported different trips to different catalogs on different external hard drives.  Later renamed external HDs.  I want to combine catalogs and have my source (NEF) files all together on one drive.  I’m not really sure how to get those source files back and get rid of the extra long path to where the source files are now located. If I re-link files to their current catalog (many different paths to files in same catalog) can I merge (import catalogs) into one master catalog?  Will the new (Master catalog) have the correct link to the source file?  If not, how or can this be done?
    I have tried to explain my situation as clearly as I can.  Do you understand my situation?
    This maybe something you don’t have time to help me with.  If not can you suggest somewhere I can get an answer?  I really need help.  PLEEEZZZ HELP ME.
    Bruce Schuerman
    Norman, OK
    405_514-4875 (call collect)
    [email protected]

  • Can any one suggest me how can I use relative path inside SSIS pacakge to access config file ?

    Can any one suggest me how can I use relative path inside SSIS pacakge to access config file ? Please help me as its urgent.THanks for your help in advance.

    Hi Jay,
    SSIS can only recognize the absolute path of a XML Configuration file, the relative path is not supported. Furthermore, if the XML Configuration file is already generated, we can use the Environment variable package configuration type instead so that
    SSIS runtime automatically looks for the configuration file from the path defined in the environment variable. This is convenient when we need to deploy a package to different environment. We only need to define the environment variable for package configurations
    once on each server, and then the variable can be used by all the packages on this server.
    Regards,
    Mike Yin
    TechNet Community Support

  • How to specify the webLogic server startup script to use different config.xml  file ??

    Hi,
    I have 2 weblogic startup scripts (startWebLogic.sh and
    startWebLogic_recovery.sh) for the same domain.
    startWebLogic.sh uses config.xml file.
    I would like to use config_recovery.xml as the configuration file for startWebLogic_recovery.sh
    How would I do this ?
    I am using WebLogic Server 6.1 on SunOS 5.8 / HP-UX 11.0.
    Appreciate any help.
    Regards
    Gunaseelan Venkateswaran

    I guess you're using Weblogic 6.1 with WLCS 3.5. I think you're supposed to work with one config.xml for the same domain, and not have a different config.xml.
    To start up different applications or EJBs, use the "target" property to control which applications to start up for the particular instance.
    YY

  • How can i get the path to config folder placed inside the jar file?

    Hi i have developed an RCP application using eclipse.
    In my application config directory is there.
    When i export my RCP application as JNLP Project the jar file is created which contains config folder inside it.
    When i download the application using java web start , how can i get the path to config folder placed inside the jar file?
    Will the config folder exists in local cache in my system?
    Help needed.
    -Deepak

    -- This works in CS6:
    tell application "Adobe InDesign CS6"
      set myDocument to active document
      set selectedRectangles to selection of myDocument
      set theGraphicsLink to file path of item link of (graphic 1 of (item 1 of selectedRectangles))
    --> "Macintosh HD:folder/folder/filename.tif"
    end tell

  • Get current RID path from file upload in KM

    Hi all,
    I wrote an customized upload application using upload ui element.
    The question is , how can I get the current RID Path when I trigger the WDJ upload action ?
    Thanks for your help. please.

    Hi,
    Here is some of examples from WDJ for uploading the files, please go thr below link i hope it will help you
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a099a3bd-17ef-2b10-e6ac-9c1ea42af0e9?QuickLink=index&overridelayout=true
    http://wiki.sdn.sap.com/wiki/display/WDJava/KmuploadusingWebdynproapplication
    Thanks,
    Sreeni.

  • SSIS - Change Config File Path LOCATION in SQL Agent Job Step (NOT USING DTEXEC)

    SSISers;
    I am not new to ssis but am trying to deal with promoting of ssis config files differently for a specific project. We are using SQL 2008 R2.
    As a standared pattern used for years, we just use SQL Agent, build a job step for the ssis package, add the ssis package as SQL Integration Services Package type from fileshare (not using Integration Services), and add the necessary production
    config files in the configutation tab of the job step. Easy.  We do not execute our packages with DTEXEC command line.
    A new project has the developers leaving the config files in the package - not removing the config files for deployment. Is there a way to override JUST THE CONFIG FILE PATH LOCATION in the job step for ssis package? Remember, we are NOT using dtexec. 
    I was told that /SET might do it but I do not see a good example anywhere of hooking this in and how it works for a CONFIG FILE PATH LOCATION - I see variable overrides but not CONFIG FILE PATH LOCATION. The packages were written with Absolute config file
    path and not Relative path.
    Please understand that my goal is to let them leave the packages as is, we move the config files to the production sever and all we have to do is flip the location of where the config files are sitting for the ssis pacakge to look for them.  We would
    rather NOT have to use DTEXEC command  line with the job step for reasons that I do no need to get into on this forum.
    Any suggestions are appreciated.

    Hi mg30,
    There is no way to overwrite the XML configurations file just through modifying the SQL Server Agent job steps.  The Dtexec utility will apply the default package configurations for the second time after applying the options specified in the command
    lines or other package configurations configured in the job step.
    If the package is not deployed/installed, the Dtexec utility looks for the XML configurations file according to the file path defined in the Package Configurations Organizer window. In this situation, you need to either disable the package configurations
    or modify the XML file path in the BIDS.
    If the package is already deployed/installed, you need to modify the package as above or re-specify the install folder for the package configurations file. 
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • I recently upgraded to iWork v9.0.3, but when I access each applications the versions are different (i.e. Pages V.4.1, Numbers V2.6, Keynote V5.1.1) with a install date of 3/18/09 -- which is not the current install date of 2 weeks ago. Why?

    I recently upgraded to iWork v9.0.3, but when I access each applications the versions are different (i.e. Pages V.4.1, Numbers V2.6, Keynote V5.1.1) with a install date of 3/18/09 -- which is not the current install date of 2 weeks ago. Shouldn't Pages, Numbers, and Keynote show version 9.?? My MAC confirned installation of v9.0.3 and even accepted the software code. With this discrepancy, how can I determine if the latest was installed and operational? I even downloading v9.0.4, 9.0.5, and 9.1. When I tried installing these downloads it popped up note stating that a later version of Keynote was already installed.

    You used the data.  Verizon can not see what it was sued for.  However your phone can see whats apps used the data.  go to settings-data usage- there will be a place that says data usage cycle.  line the dates up with your cycle.  then there will be a bar graph below that   extend bother white bars one all the way to the left and one all the way to the right.  after those are extended below that will be a list of apps,  there should be one that used over 2 gb and that will show you what app used that data in her purse

  • How to create different log files for each of web applications deployed in OC4J

    Hi All,
    I am using OC4J(from Oracle) v1.0.2.2 and Windows2000. Now I want to know
    1. how to create different log files for each of my deployed web applications ?
    2. what are the advantages in running multiple instances of oc4j and in what case we should run
    multiple instances of OC4J ?
    3. how to run OC4J as Windows2000 Service rather than Windows2000 Application ?
    Thanks and Regards,
    Kumar.

    Hi Avi,
    First of all I have given a first reading to log4j and I think there will some more easy way of logging debugging messages than log4j (If you could provide me a detailed explanation of a servlet,jsp,java bean that uses log4j and how to use log4j then it will be very helpful for me). The other easy ways (if I am not using log4j) to my problem i.e creating different log files for each of web applications deployed in oc4j are
    I have created multiple instances of OC4J that are configured to run on different ports and so on each instance I have deployed a single web application . And I started the 2 oc4j instances by transferring thier error/log messages to a file. And the other way is ..
    I have download from jakarta site a package called servhelper . This servhelper is a thread that is started in a startup servlet and stopped in the destroy method of that startup servlet. So this thread will automatically capture all the system.out.println's and will print those to a file. I believe that this thread program is synchronized. So in this method I need not run multiple instances of OC4J instead each deployed web application on single instance of oc4j uses the same thread program (ofcourse a copy of thread program is put in each of the deployed web applications directories) to log messages on to different log files.
    Can you comment on my above 2 approached to logging debugging messages and a compartive explanation to LOG4J and how to use LOG4J using a simple servlet, simple jsp is appreciated ...
    Thanks and Regards,
    Ravi.

Maybe you are looking for