Query Windows for current 'user' directory

the system will have multiple users, test records are to be saved to the c:\Documents and Settings\<user>\Application Data\Pacing System\
      how do I determine this path for various users dynamically?
Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
[email protected]
Solved!
Go to Solution.

I like the "Get System Directory" vi found in the File Constants subpalette of the File I/O palette.  It might be LV2009 only.
Note that the Application Data directory is hidden by default in win7.  In win7 x64 this returns "C:\Users\<user>\AppData\Local\Pacing System\"  In XP, it's "C:\Documents and Settings\<user>\Local Settings\Application Data\Pacing System\"
Yamaeda's registry approach gives me "C:\Users\<user>\AppData\Roaming"  Querying the "LOCALAPPDATA" or the "USERPROFILE" keys are also close to what you want.  If XP doesn't have these keys, you could also call a command line and query the %userprofile% environment variable.
@Phil: I've had trouble with the "Default Data Directory" vi before (yesterday in fact).  It depends on an options setting within labview.  (Options>Paths),  I found that when I change this path in the options to use the system directory (uncheck "use default", click the exclamation point button, click on replace, then OK out of options), it gets reset to the default value when labview is restarted, even though it shows up in Labview.ini. This only happens if you use the system-specific path.  It appears to be an old problem:http://forums.ni.com/t5/LabVIEW/Custom-default-data-directory-path-reverts-to-Labview-default/m-p/36...
-Barrett
CLD

Similar Messages

  • How to activate all inactive objects for current user

    Hi
    How to activate all inactive objects for current user ...
    ... I have found a (long winded) way to do this:
    - Environment / Inactive Objects
    - Add to Worklist
    - Display Worklist
    - Select All
    - Activate
    this will open a dialog titled "Inactive Objects for <username>"
    which has the exact functionality I need ... but I can't figure out how to get to this dialog directly - without so many intermediate steps
    the SAP docs repeatedly mention the ability to activate the inactive worklist - but do not mention how
    does anybody know the TCode for this dialog?
    thanks
    ps does the term "mass activation" apply to importing change requests rather than development activation?
    Edited by: FireBean500 on Jun 4, 2010 11:07 PM

    No other way. But usually it's far more simple as all objects are already in our own worklist.
    I wonder why your objects are not already in your worklist, as everytime you create or maintain an object, it is added to your worklist.

  • No data to retrieve in Query 1 for particular User

    Error: No data to retrieve in Query 1 for particular User
    Hello,
    We have webi report in 3.1 version which is running fine in Infoview for particular user.
    But when same report is send into Inbox of other user and if user try to run it in infoview it is giving below error.
    "No data to retrieve in Query 1"
    All the security and  group member level settings for both the user are exactly same. What could be the reason for this behaviour.
    Thanks

    Can you please check user is part of which group in enterprise receipts group.
    Also please check dynamic receipts tab of publication where data can be filtered
    Thanks,
    Swapnil

  • Usually there is a upgrade path for current users of the software at a reduced price. I dont see anything like that for Lightroom 6. Will I have to pay full price just to upgrade to the new LR6 standalone version???

    Usually there is a upgrade path for current users of the software at a reduced price. I dont see anything like that for Lightroom 6. Will I have to pay full price just to upgrade to the new LR6 standalone version???

    The standalone upgrade is 79 US Dollars.
    Go to Products, select Lightroom 6, click on Buy, select Upgrade instead of Full

  • Get the last query from the current user

    Is there a way to get the last query of the current user, so every query could be log with a database trigger?
    Let's just say I execute:
    DELETE xxxx;
    I tried :
    SELECT T.SQL_TEXT FROM V$SQLAREA T where ADDRESS=(SELECT prev_sql_addr FROM v$session where audsid=userenv('sessionid'));
    But the result of this query is :
    'SELECT T.SQL_TEXT FROM V$SQLAREA T where ADDRESS=(SELECT prev_sql_addr FROM v$session where audsid=userenv('sessionid'))'
    Is there a way to execute a query that would return :
    'DELETE xxxx'
    Thanks

    You could join SQL_ADDR in v$session with ADDRESS in v$sqlarea to determine the SID that executed that SQL statement last. Note that PREV_SQL_ADDR in v$session will indicate the previous SQL he executed. Though you would have to look at these tables very often to get all SQL statements issued. One note here, I think if a different user ran the SAME SQL with just bind var differences the SQL_AREA will only show the last user’s information that executed it.
    BTW - it will show deletes also...

  • Howto Refresh SAP BW Query Changes for roles (User menu)

    Hi All,
    I have apply new changes for combine hierarchy. However I have tested in Query Designer/web and its works ok hence the user cant see the change.
    Howto Refresh SAP BW Query Changes for roles (User menu)
    Below is the setup we do have (sap bw 3.5)
    1. User run query from User menu (They logon to bw backend and run query by click on the icon on thier user menu.
    Changes.
    1.Apply combine hierarchy (Rows in Query Designer)
    2. I have display query on the web and its work as expect
    Issue
    1. Query not refresh in user menu (Roles) Users run the query through user menu
    Regards Jon

    thank you

  • Get all Groups for current user

    Hi I try to get all groups for the current logged on user. This is what I do:
    First I try to search with the IGruopSearchFilter to obtain all unique Group IDs. I always get an proxy error by doing this, maybe the query is to much.
    Then I want to use the method group.isUserMember(user.getUniqueID() to check whether the user is a member of that group or not.
    Is there a better way to obtain all groups for a user (without using a query IGroupSearchFilter)?
    Thanks ahead for your help.
    Burkhardt

    Burkhadrt,
    have you tried this?
    https://media.sdn.sap.com/javadocs/preNW04/SP2/60_sp2_javadocs/ume/com/sap/security/api/IUser.html#getParentGroups(boolean)
    This should give you an iterator for all groups the given user is assigned to.
    Hope it helps... and if so:
    if (helpful) {
      points++
    Regards,
    Dominik

  • File permissions, inherit for shared user directory

    im trying to create a public share where users can read each others files, but not write to them.  thats no problem, but im also trying to create a public directory as well, where the users can create a folder inside another users directory. 
    for example
    a new group is created called localnet(name is reflecting a workgroup tied to windows computers), two users (user1 and user2) are assigned part of this group, so that only the group 'localnet' can cross access each others shares inside the /public folder only.
    a directory is created to reflect the new group, the two users dirs are added, and also a public dir is added
    mkdir /usr/share/localnet
    mkdir /usr/share/localnet/user1
    mkdir /usr/share/localnet/user2
    mkdir /usr/share/localnet/public
    now to set the permissions, the users dir is chowned to themselves, and the public dir is chowned to root, all of which are attached to the localnet group
    /usr/share/localnet/user1 user1:localnet drwxr-x---- (chmod 750)
    /usr/share/localnet/user2 user2:localnet drwxr-x---- (chmod 750)
    /usr/share/localnet/public root:localnet drwxrwx---(chmod 770)
    all is fine, but when user1 creates a dir in public, say for example /public/pictures it now inherits a different set of permissions outside of the boundaries of this setup, it inherited (drwxr-wr-w user1:users ), this looks familiar, its the way linux adreses users files. So now user 2 tries to place pictures inside to say /public/pictures/roll1 but this user is denied permissions because user1 owns the dir.  the permissions i need it to inherit is what i set in the parent, and that is (drwxrwx--- anyuser:localnet) 
    what im trying to figure out, is what command can i run to allow the sub directories of the /public to inherit its permissions i guess is what im trying to accomplish
    EDIT: another though, should i be doing this inside the "home" directory instead? (/home/public)  makes more sense to me, would it act any differently there?
    Last edited by wolfdogg (2011-12-06 10:35:12)

    i ran
    chmod -R g+w,g-t,o+t /usr/share/localnet/public
    the directory /usr/share/localnet/public/random_by_user1 now reads
    drwxrwsr-t user1:localnet
    (user2 was able to make a dir inside of this one)
    although that worked, and user2 is now able to make a directory inside of a directory that user1 has made, its not inheriting like this. so even though the recursive set them correctly, the new ones are coming up liek this
    drwxr-sr-x user1:localnet
    (user2 was NOT able to make a dir inside of this one obviously)
    without this elevated permission set.
    so we have it right when i chmod the files, but how do i get them to inherit this natively? thats a sticky right?  how to i make the 'rws' in group sticky, but no delete permission for a non owner?  i think thats the question that shoudl have been stated int eh beginning of the post now that im figuring this out.
    Edit: (i just realized something, my poor choice for an example might lead you to believe that the users personal directories are inside the /public, they are actually not, so in my examples such as the one above where i reference a new test directory like this " /usr/share/localnet/public/user1" let me rephrase that so as not to confuse " /usr/share/localnet/public/random_by_user1"
    the user directories are actually outside of the public eg.. /usr/share/localnet/someuser, where the public shares are inside  /usr/share/localnet/public.  im sure i made that clear, but at this point, confusion might lead to chaos. lol.
    also, i dont want everyone else to have permission, only owner and group, so no need to o+t correct?  remember, its only public for the group, not for everyone.
    Last edited by wolfdogg (2011-12-06 11:55:02)

  • Query Manager and Current User

    Good day everyone,
    Please forgive my ignorance regarding using the Query Manager syntax, but I was wondering :
    1. If there is any specific documentation (official or not) that would explain all the specific issues raised when dealing with this tools (variables, parameters etc)
    2. If not - if any of you guys knew a way to use the current logged on user in a query -- I found materials regarding the $[USER] but I was unable to achieve to any result in Query Manager.
    Thank you for your assistance

    Hi,
    1) Yes, SAP provide a 'How To' document for formatted searches that includes most of what you need to know (it should be in the Document Resource Center in the Channel Partner Portal and is called 'How to Define and Use Formatted Searches). There are a few unofficial tricks that appear on various threads here on the SDN (eg how to get around the issue of SBO not correctly defining a parameter on complex queries).
    2) The following query will return the name of the current user:
    SELECT T0.u_name FROM OUSR T0 WHERE T0.internal_k = $[USER]
    Strangely, this doesn't work on my 2007A preview build but does work on 2005A SP1.
    Kind Regards,
    Owen

  • How can I configure a Build Specification to install for current user only

    Is there any way I can configure an installer build specification to install my application to the current user's folder? This does not seem possible at first glance due to the limited "destinations" available.
    Ideally I'd want the application to be placed in "C:\Users\[USERNAME]\AppData", or some equivilent where it'd be protected from being run by other users without administrative access.
    Has anyone been able to do this? Thanks!
    CLA, CCVID, Certified Instructor

    There is a destination called [Personal] that goes to the user's MyDocuments folder.  Whether program files should be mixed with a documents folder could be debated.
    I see the [Public App Data] choice, but I don't see a [User App Data] option.
    Another possibility would be to allow it to go to Public App Data, but after the installation, run a VI that then moves the program folder to the User's Application Data directory.  However, that probably means updating shortcuts as well.  And I don't know whether that VI would essentially step on itself in trying to do that move.
    Maybe another choice would be to allow it to install to the program file directory, but use CACLS to prevent users from accessing that directory except for explicit permissions to the one or more users you want to allow to execute it.  An advantage is it would allow one user to install a program for another user to use.  The disadvantage is the person doing the installing would almost certainly have to be an administrator.
    A disadvantage of the method you desire is that a user has to be the person logged in and install it for themselves (assuming that group policies allow non-admin users to install their own programs).  Another disadvantage is if you want to have more than one permitted user, it would need to be installed multiple times, one for each.
    Perhaps you could install security at the front end of your applicaiton.  Anyone can run it, but the application determines if the currently logged in user is permitted to run it when comparing against some sort of encrypted file that lists valid users.  If the user is permitted, the program moves onto normal operation.  If not on the list, the program tells them so and never advances onto normal operation.
    Perhaps someone else can determine if there is a path tagged within the installer builder that goes to the User App Data that I am missing.

  • Is it too much to ask MS for a simple ad-hoc query tool for end users?

    Hello
    This is a general MS BI topic and not specific to Power Query, but I couldn't find a more suitable general forum for it.
    This posting is the result of the frustration I have with MS BI stack, whereby a simple ad-hoc drag and drop query tool to get the data in a table format (preferably from a relational
    data source) is missing, something that other big vendors have, such as SAP Business Objects Universe and the associated tools. The deprecated SSRS Report model and SMDL was the closest MS ever got to this functionality (although that had some limitations
    too), which unfortunately is dead now in favour of all sort of "Power" tools that basically can’t deliver the same functionality.
    The requirement is pretty simple: provide users with a tool that they can drag and drop fields from different entities in a data model without having to worry about entity relationships and
    apply necessary filters and get the data out in Excel or CSV, no fancy (or even simple) aggregation or formatting is required, and users should only see the rows they are authorized to see, i.e. row level security (RLS) of data.
    Let’s see what we have at our disposal from MS BI:
    From the modeling perspective, we have relational models in the database that support RLS with views, but obviously cannot maintain PK-FK relationships in the database model between views. Other
    models are .Net Entity Data model Framework model exposed as OData, and SSAS tabular, SSAS PowerPivot, SSAS multidimensional, which you can find a good comparison of their features here:
    http://www.sqlchick.com/entries/2012/3/4/decisions-powerpivot-ssas-tabular -or-ssas-multidimensional-m.html
    From the tools perspective we have:
    Power Query on top of a relational database (SQL Server): Can connect to relational databases easily, generated queries are optimal, detects relationships with entities, but only when entities
    are tables and have PK-FK relationships enforced in the database. So can’t detect relationships with views and hence can’t enforce RLS, so this is not an option unless users keep joining entities, which is not a desirable option either.
    Power Query on top of an OData: Works well except that queries generated for multiple entity expansion are terrible (look here for more details:
    http://social.technet.microsoft.com/Forums/en-US/7a8b8e52-d3a9-42af-bc52-9d5459c00529/odata-multilevel-expand-query-issue?forum=powerquery). In addition all filtering and projections are done at client side, so even if you want 1 row out of 1 million, all
    rows are brought over to Excel before filtered. Overall this results in unacceptable performance even for small sized data.
    Power Query on top of a tabular model: Doesn’t support that type of data source yet (http://social.technet.microsoft.com/Forums/en-US/ebcccb5e-7058-4046-917d-3d7fcf60cbdc/tabular-model-as-data-source-for-power-query?forum=powerquery).
    Even if it did, tabular models don’t support Many-to-Many relationships out of the box and not sure if there are plans to support tabular models in Direct Query mode in Power Query to take care of RLS.
    Excel on top of tabular models or multidimensional models: The tabular model should not be in Direct Query mode and you only get to use PivotTable to query the model. PivotTables are not famous
    for generating optimal MDX queries, so performance is not going to be acceptable if you are dealing with large dimensions, especially large junk and degenerate dimensions. You can use drilltrough to get details of a measure, but you have to specify the columns
    for a drilltrough action upfront, no flexibility for users to select what they want to see.
    PowerPivot on top of relational databases: The query designer cannot detect relationships between views, so users have to perform manual joins, not an option.
    PowerPivot on top of a multidimensional or tabular model: The query designer doesn’t generate optimal MDX queries by drag and drop. Especially there doesn’t seem to be a way to add related
    attributes of a dimension attribute to the query without cross joins which results in poor performance on large dimensions. Other issues found here
    http://sqlblog.com/blogs/marco_russo/archive/2010/08/24/using-ssas-2005-2008-as-powerpivot-data-source-query-designer.aspx. In addition the result set has ugly column names and issues with data types, such as interpreting numeric data types as Text, and
    there’s no straight forward way of getting the data from PowerPivot directly to Excel. The user either has to do a copy/paste (which doesn’t work on large datasets) or create a pivot table, bring the measure, and drillthrough the measure to get the details
    in table format.
    PowerPivot with OData: Treats every entity as a separate table to import, not suitable for our use case.
    Report Builder and SSRS on top of relational, multidimensional or tabular model: Given the query designer is the same as PowerPivot, it has similar issues. In addition, there are 4 more steps
    from designing a query to generating an Excel or CSV output, not an option.
    PowerView: Works against tabular and multidimensional models, but there’s no way of exporting data to Excel sheet. Besides the add-in is not available for Excel 2010.
    Good old MS-Access: Link to tables and views through ODBC, create relationships between entities and give each user a copy of that Access database to create their queries, and deal with the
    nightmares of updates to the model and distribution of new models to the users! Did I mention Access as an option?
    So there you go, 10 options, none of which can deal with a seemingly simple use case sufficiently. At the moment, the best among them appears to be option 6 against a heavily optimized OLAP
    cube, and perhaps #3 when/if Power Query support for tabular models in direct query mode arrives. Perhaps I am missing something very obvious, and would like someone to enlighten me here.
    Thanks
    MR

    Hi, as far as I can infer, that term means it's not loading any resources until needed, opposite of this...
    -bind_at_load
                     Sets a bit in the mach header of the resulting binary which tells dyld to bind all symbols                when the binary is loaded, rather than lazily.
    https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man1/ld.1.html
    Load resources lazily.
    You should never load a resource file until it is actually needed. Prefetching resource files may seem like a way to save time, but this practice actually slows down your app right away. In addition, if you end up not using the resource, loading it wastes memory for no good purpose.
    http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneos programmingguide/PerformanceTuning/PerformanceTuning.html
    And, higher OS versionsare even worse with Bonjour/mDNSResponder, but might see this...
    http://support.apple.com/kb/ht3789

  • How to open IE window for .html user manual?

    how to open an IE window for a .html user manual?
    I'm creating a user manual in .html format, and I want to open that file in an IE window when a user click on the "Help" menu (JMenuItem - using ActionPerformed event).
    Is it possible to do that in java?
    What class shall I use?

    Call the following class from ur ActionPerformed();
         import java.io.IOException;
    public class BrowserControl {
       private static final String WIN_ID = "Windows";
       private static final String WIN_PATH = "rundll32";
       private static final String WIN_FLAG = "url.dll,FileProtocolHandler";
       private static final String UNIX_PATH = "netscape";
       private static final String UNIX_FLAG = "-remote openURL";
      public static void displayURL(String url) {
        boolean windows = isWindowsPlatform();
        String cmd = null;
        try {
          if (windows) {
            cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
            Process p = Runtime.getRuntime().exec(cmd);
          else {
            cmd = UNIX_PATH + " " + UNIX_FLAG + "(" + url + ")";
            Process p = Runtime.getRuntime().exec(cmd);
            try {
              int exitCode = p.waitFor();
              if (exitCode != 0)  {
                cmd = UNIX_PATH + " " + url;
                p = Runtime.getRuntime().exec(cmd);
            catch(InterruptedException x)  {
              System.err.println("Error bringing up browser, cmd='"+cmd+"'");
              System.err.println("Caught: " + x);
        catch(IOException x) {
          // couldn't exec browser
          System.err.println("Could not invoke browser, command=" + cmd);
          System.err.println("Caught: " + x);
      public static boolean isWindowsPlatform()  {
        String os = System.getProperty("os.name");
        if ( os != null && os.startsWith(WIN_ID))
          return true;
        else
          return false;
    }

  • Urgent!! Default query template for all users.

    Hi Guys,
    How do I set the default template for queries for all users.
    I saved the default template and did the setting settings>query on embed>use the default template. So the template eorked for me.
    But when a different usre tried, the template did not load for him.
    So is there a specific setting that can be done so that it apllies for all users.
    Thanks
    simmi

    Hi Simmi,
    There is a way that you can do this. Check this post for details as provided by Prakash:
    Re: Permanent BW Excel Template
    Hope this helps...

  • Disbale Desktop Sharing in Jabber for Windows for single users

    Hi,
    is there possibility to administrative disabling the desktop sharing feature for selected users?
    CUP and CUCM is 8.6. Jabber is 10.5. Use DesktopSharing via Chat without any phone or deskphone only.
    Regards

    I am referring to the new Screen Sharing way in Jabber 10.5 for screen sharing without having a video call running:
    "In addition to the video screen share (BFCP) feature that is available to video-enabled clients when on a call, users can now screen share directly from an IM conversation when video share is not provisioned or available."
    Source: http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/jabber/Windows/10_5/rn/JABW_BK_J559CFFB_00_jabber-windows-release-notes-10-5/JABW_BK_J559CFFB_00_jabber-windows-release-notes-10-5_chapter_00.html

  • Modifying this object is not permitted for current user Error

    Hi,
    i hit the this error when posting in pick list. So far,only one user and manager able to post. The rest of user already set full authorization for pick list. But still hitting this error. I am using web service to initiate 8 different connections for different user login.
    May i know any possibilities will cause this error?

    Did you stop the add-on and tried to do the pick list?
    If you google the error message you will see that this message is from the SDK.
    This message is not about authorizations.
    Hope it helps

Maybe you are looking for