Bundle install directory - using variables folder name

Hello,
I have bundle that has to copy a file to a specific folder in the userdirectory.
In windows, I can use the %username% variable to get the folder name.
How can I use that in my bundle .
Ex : c:\users\%username%\....
thanks in advance
Greetings
Lainkes

Lainkes,
The better variable to use would be %USERPROFILE%, which will point to the user profile directory on both Windows XP and Windows 7.
You have a couple of options for your file copy action - you can either use a batch script within a "run script" bundle, or you can use an "install file" action.
I'd recommend the "install file" action if it's not a terribly large file since that action results in the file being uploaded to the repository, and therefore does not require any mapped drives or UNC paths in order to copy to the client.
Simply specify %USERPROFILE% in the "Destination Directory:" box in the install file action.
Jacob
Originally Posted by alain-janquart
Hello,
I have bundle that has to copy a file to a specific folder in the userdirectory.
In windows, I can use the %username% variable to get the folder name.
How can I use that in my bundle .
Ex : c:\users\%username%\....
thanks in advance
Greetings
Lainkes

Similar Messages

  • Using variable coulmn name in sql function

    Hi there,
    I am not an expert with PL/SQL and I can not figure out how to use variable column names in my function.
    My function is:
    CREATE OR REPLACE FUNCTION RESET_TRIGGERS(aTrigger VARCHAR2) RETURN NUMBER IS
    TEMP_ID NUMBER;
    TEMP_USER_ID NUMBER;
    BEGIN
    SELECT 'LIMS.'||'$aTrigger'||'.NEXTVAL' INTO TEMP_ID FROM DUAL;
    SELECT 'LIMS.'||'$aTrigger'||'_USER.NEXTVAL' INTO TEMP_USER_ID FROM DUAL;
    IF TEMP_ID > TEMP_USER_ID THEN
    LOOP
    SELECT LIMS.SQ_U_FINALRESULT_USER.NEXTVAL INTO TEMP_USER_ID FROM DUAL;
    EXIT WHEN TEMP_USER_ID = TEMP_ID;
    END LOOP;
    ELSE
    WHILE TEMP_ID < TEMP_USER_ID LOOP
    SELECT LIMS.SQ_U_FINALRESULT.NEXTVAL INTO TEMP_ID FROM DUAL;
    END LOOP;
    END IF;
    COMMIT;
    RETURN (TEMP_ID);
    END;
    What I want is that I pass a seqencename with aTrigger and that two triggers will be equal if not.
    eg ifaTrigger = 'SQ_U_FINALRESULT'
    than I want the triggers LIMS.SQ_U_FINALRESULT and LIMS.SQ_U_FINALRESULT_USER to be set equal.
    The above function will not work, but what will?????
    I hope you can help me out!
    Cheers

    A very strange function indeed.
    But here is what I think he meant to do:
    SQL> create procedure reset_sequences
      2  ( p_sequence_name in  varchar2
      3  , p_nextval          out number
      4  )
      5  is
      6    l_nextval1 number;
      7    l_nextval2 number
      8    ;
      9    procedure reset_sequence_value
    10    ( p_sequence_name in varchar2
    11    , p_current_value in number
    12    , p_new_value     in number
    13    )
    14    is
    15      l_dummy number;
    16    begin
    17      execute immediate 'alter sequence ' || p_sequence_name || ' increment by ' || to_char(p_new_value-p_current_value);
    18      execute immediate 'select ' || p_sequence_name || '.nextval from dual' into l_dummy;
    19      execute immediate 'alter sequence ' || p_sequence_name || ' increment by 1';
    20    end reset_sequence_value
    21    ;
    22  begin
    23    execute immediate
    24      'select ' || p_sequence_name || '.nextval,' || p_sequence_name || '_user.nextval from dual'
    25    into l_nextval1, l_nextval2
    26    ;
    27    if l_nextval1 < l_nextval2
    28    then
    29      reset_sequence_value(p_sequence_name,l_nextval1,l_nextval2);
    30    end if
    31    ;
    32    if l_nextval1 > l_nextval2
    33    then
    34      reset_sequence_value(p_sequence_name || '_user',l_nextval2,l_nextval1);
    35    end if
    36    ;
    37    p_nextval := greatest(l_nextval1,l_nextval2)
    38    ;
    39  end reset_sequences;
    40  /
    Procedure is aangemaakt.
    SQL> show err
    Er zijn geen fouten.
    SQL> create sequence testseq start with 5 increment by 1
      2  /
    Reeks is aangemaakt.
    SQL> create sequence testseq_user start with 2 increment by 1
      2  /
    Reeks is aangemaakt.
    SQL> declare
      2    l_new_value number;
      3  begin
      4    reset_sequences('testseq',l_new_value);
      5    dbms_output.put_line(l_new_value);
      6  end;
      7  /
    5
    PL/SQL-procedure is geslaagd.
    SQL> select testseq.currval from dual
      2  /
                                   CURRVAL
                                         5
    1 rij is geselecteerd.
    SQL> select testseq_user.currval from dual
      2  /
                                   CURRVAL
                                         5
    1 rij is geselecteerd.Regards,
    Rob.

  • There are question marks on each directory although the Folder name is green

    Hi, I have just upgraded to Lightroom version: 3.5 [775451]. When I opened Lightroom it's not able to find my pictures which are stored on a NAS. I have had this problem before, so I don't believe it has anything to do with the upgrade. On the folder name it looks like Lightroom can see my NAS because the small square is green, but for each folder below there is a question mark. When I Ctrl click on one picture and select Show in Finder, it's saying that the original file could not be found. It show the previous location which is still the correct location. CLicking on the Locate a Finder window opens and I can now see a new directory (folder) with the same name as my NAS drive has, and there is of course no pictures in that folder. Where did this new folder comes from with the same name as my NAS ?
    I appriciate all help.
    Thank you
    Cheers
    Bent

    benta151253 wrote:
    ... So maybe the problem is somewhere else ??
    /Bent
    I'm pretty sure the problem lies somewhere else, because I see it happen in other programs also (i.e. iTunes, simple batch scripts, ...). It might be a shortcoming of some API used in these programs.
    Beat

  • Can I install SAP using a C-name

    Can I force the SAP installation to use a c-name instead of the physical server name?  I tried a 7.4 SR1 install and didn't see anywhere were I could use a different server name.

    Hi Mary,
    To install using a different host name(virtaul) you can use sapinst SAPINST_USE_HOSTNAME=<hostname>
    Regards,

  • Help with using variable for name of table in PLSQL block...

    I am trying to use a variable for the name of a table but getting errors ...i am sure I am close to the correct form here but something is wrong. I sure would appreciate some help!
    DECLARE
    ln_month Number;
    ln_day Number;
    ln_year Number;
    ls_year VarChar2(4);
    ls_prev_table VarChar2(30);
    ls_cur_table VarChar2(30);
    ln_prev_year Number;
    ls_prev_year VarChar2(4);
    ln_prev_month Number;
    BEGIN
    Select To_Number(To_Char(sysdate, 'MM')) into ln_month from dual;
    Select To_Number(To_Char(sysdate, 'DD')) into ln_day from dual;
    Select To_Number(To_Char(sysdate, 'YYYY')) into ln_year from dual;
    If ln_month = 01 Then
    ls_cur_table := "T_CPRS_FDW_CUR_JAN_ACTUALS";
    ls_prev_table := "T_CPRS_FDW_PREV_DEC_ACTUALS";
    ln_prev_year := ln_year - 1;
    /***above is where I am trying to use variables for assignement to years and months tables***//// ln_prev_month := 12;
    End If;
    /*------MORE IF STATEMENTS FOR EACH MONTH ---OF --THE YEAR ...AND its the following 2 variable statements that the compiler doesnt like! */
    If ln_day < 20 Then
    Delete from :ls_prev_table;
    INSERT INTO :ls_prev_table /*(STUFF TO BE INSERTED GOES HERE)*/
    HELP PLEASE!
    null

    Hi,
    The parser does not under variables directly in dml statements.u need to form a statement and the parse and execute the same...
    so the soln is
    Declare
    lv_stmt varchar2(250);
    Begin
    lv_stmt := 'Delete from '&#0124; &#0124;ls_prev_table;
    execute immediate lv_stmt;
    -- Same is the case with the insert stmt--
    End;
    This should solve ur problem.
    u could also give a direct call like
    execute immediate 'Delete from '&#0124; &#0124;ls_prev_table ;
    Note: This statement "execute immediate" holds good for oracle versions 8.x and above which makes the stmt very simple. For lower version u need to use the dbms_sql package to parse and execute the statement which has a series of statements for the same.
    Kiran

  • Additional Results Custom Step using Variables in Name and Value to Log expressions?

    I am trying to create a Custom Step Type for logging additional results - requiring a single Name and Value data pair included in the step.
    I want to pass the name and value data in using two specific variables.
    This functionality can of course be explicitly coded on a test step without problem, but I can't find a way to create a custom test step which inserts such a step i.e. automatically inserting the correct variable names into Name and Value to Log fields.
    Any ideas how to accomplish this? I don't want the custom step users to have to type in the variable names every time they use it.
    I am using TestStand 4.1.1
    Message Edited by CIM1 on 04-20-2009 07:26 AM

    Hi CIM1,
    There are a few ways of doing this.
    The simplest one would be to configure the expression in the Pre-Expression or Post-Expression (depending on whether you would like the Step Type to use the value in the variables or write the value to the variables) and then from here you can lock away the expressions from being edited. The caveat with this method is that you are obviously restricing the Pre/Post-Expressions for the step type. 
    Another Method would be to code some code modules to Write to/Read from the Variables and then calling these in the Steps Pre-Step SubStep or Post-Step Substep. The advantages of this method would be that you can search for the Variable, and if the variable is not present, you could create it before writing to it.
    Hope this Helps.
    Best Regards,
    Steve H 

  • Cursor using variable table name

    I'm new to Oracle, and am wondering if I can create a cursor that can take a variable name as the table it's selecting from. I am working on an application that is loading data to 1 of 3 tables. The table name is stored as a variable and the loads are done using dymanic sql to constuct the insert statement. At the end, I want to select and process some specific info from the table that's been loaded by cycling thru a cursor on whichever of the 3 tables was populated. I could create 3 cursors, one for each table, test the table_name variable, and then reference the specific cursor that way, but I thought there must be another way to do this. I want to be able to do something like this:
    CURSOR loaded_table is select distinct(process_key) from 'v_tablename' (where v_tablename is either TABLE2, TABLE2 or TABLE3)
    Any suggestions would be greatly appreciated.
    Tks...MCR

    It's possible to use dynamic SQL for something like this. If we're only talking about three tables, though, my hunch is that you'll be much happier defining three different cursors. Dynamic SQL is significantly harder to write, debug, and maintain than static SQL, so you're better off resorting to it only when there are so many tables that static SQL is impractical.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com/askDDBC

  • Use Variable value name???

    Is there a way to use a variable value's name to load data?
    What mean is, if I have a variable called "var1" and I load
    "var1" from an XML file so the value of "var1" == "XYZ", is there a
    way to use the value "XYZ" to load data to a Dynamic textbox call
    "XYZ"?
    var1 = "XYZ"
    ( XYZ is a dynamic textbox on the stage and I need to load
    XYZ with incoming data )
    Example: XYZ = "What ever text I have"
    ( but XYZ is really the vaue of "var1")
    Thanks - Gary

    yes, you can resolve strings into objects by using array
    notation. for example, if XYZ is the instance name of a textfield
    on the _root timeline and var1="XYZ", you can use:

  • Arch install experience / install CD uses devfs path names

    Hey, all I'm new to the forums, very happy arch user. I can't remember how I found arch, it must've been fate. I did my share of distro hopping. Actually, I plunged into the deep end with my first Linux install by choosing to run Gentoo. To their credit I was able to get it installed by relying on their solid documentation, even though I was an absolute novice at the time. Still I had to leave Gentoo because on the whole I'm too impatient to compile every single program from source.
    I then drifted to Mandrake for a short time, and then Fedora for a longer time. I became intimately familiar with dependency hell, and tracking down specific versions of libraries. I like using a few bleeding edge programs that are compiled out of CVS or SVN, and I found that it was a nightmare satisfying dependencies and dealing with package conflcts. I also ran Ubuntu for literally about 5 minutes. I won't get into why that lasted such a short time.
    I was on irc the the other day in a dev channel for bmpx, attempting to get the newest version of bmpx to run (still am). One of the devs asked me if I was running FC4 (Fedora Core 4). My response:
    Me: "I don't think I'd have a snowball's chance in hell of getting this working under FC."
    Dev: "I'm running FC5."
    I had to swallow my words. Here I am, a proud arch user with a seg faulting bmpx while the dev is running it on FC. Moral of the story: that guy must be a magician. That or FC is much more up to date now. Still, nothing could convince me to abandon pacman and go back to RPMs. Pacman is a Godsend. The whole ABS system is beautiful.
    I just recently reinstalled a fresh version of arch after something of a hiatus. A while ago I borked my system (I had an ugly situation with my partition table, among other things) and I didn't get around to resurrecting my install for a while.
    Now this was before Xorg7, and uDev, and ArchCK's move to initramfs. Obviously I was upgrading after those things were introduced. To further enrich this unhealthy mix, I have an ATI Radeon 9800, 2 ethernet cards (onboard), and 2 sound cards (PCI, and onboard). It might go without saying that I had a rocky install experience. It was like putting together a jigsaw puzzle blindfolded. Then I came to the Arch site and read about all the changes. Even then it was a messy experience, what with uDev simultaneously loading modules and whatnot (turns out that this can be a problem on systems with multiple soundcards or NICs). Finally after a boatload of troubleshooting, and much reading of the Wiki and the forum, I got everything setup. Queue angelic choir: I even got 3d acceleration via fglrx to work thanks to Iphitus's drivers, and posts in the forum by Cerebral.
    So I'm once again a happy arch user, but I'm glad it wasn't my first arch install. My first install was ultra smooth by comparison.
    If you're still reading you're probably wondering if I'm going to make a point. Well since, I'm new to the forum I figured I'd give a little background for anyone interested, and a little hope to to anyone wrestling with their install.
    Actually I do have a question which I alluded to in the subject of this post. I did an FTP install from a CD I downloaded several months ago.
    The Grub installer gives this message:
    "Arch Linux supports two /dev device systems, DevFS and uDev. You can select the one you want by modifying your bootloader's configuration."
    Obviously now only uDev is supported so that message is outdated. Plus the auto-generated fstab and menu.lst use the DevFS device paths by default.
    So my question is do the newer install CDs generate fstab and bootloader config files using the uDev naming scheme or do they still default to DevFS? I realize I was using an older CD, but it was confusing not knowing that DevFS had been completely abandoned.
    Also there should be an initrd line added to the autogenerated bootloader config (can't remember if it's there or not).
    Maybe these issues have already been addressed in newer install CDs. Hopefully they have for the sake of first-time installers.
    Whew okay I'm done, thanks guys.

    jesus franco wrote:It seems you have 0.7 even though 0.7.1 fixes all those devfs,initrd issues.
    Yea I think I do have the 0.7 CD. I just do FTP installs anyway so I didn't bother downloading a new CD. I was kinda guessing that the newer CD probably sorts out the uDev / DevFS issue but I wasn't sure. Nothing to worry about then!

  • Get os installed directory using java examples

    Hello...
    From my java program how can i find where i installed operating system. I want to get this both from windows and linux server.
    Please help me.....

    Sachb wrote:
    System Properties
    This link is what you are looking for.
    http://scv.bu.edu/Doc/Java/tutorial/java/system/properties.html
    no, not they dont.

  • Possible: renaming files - folder names as variables.

    Here's a bit of background - I have a rather extensive MP3 collection (all legal - I work for an independent music magazine in my spare time) - it's approx 7,000 files big now.
    I have them all stored in folders as follows:
    c:\SAMag\MP3's\Albums (and here comes the tricky bit...)
    EITHER
    \Artist Name Here - Album Title\<.MP3 files here> (No artist names contain a '-' so this is the seperator)
    OR
    \Artists Name Here\Albums Title One\<.MP3 files here>
    \Artists Name Here\Albums Title Two\<.MP3 files here>
    \Artists Name Here\Albums Title Three\<.MP3 files here> (Where there are more than one albums to an artist)
    Playing these files is a nightmare as they all have different naming conventions and odd ID tags. I want to remove all ID tags and rename them to have meaningful file names (so that WinAmp displays a decent, non-confusing, name).
    I would like:
    "<artist name> - <song title> (<album title> - <#>)"
    So, basically - is it possible to rename files in Java. Specifically: using the folder names that they are contained in as variables to put in this name?
    Thanks for any help people!

    Thanks for that.
    I'm pretty new to this whole Java thing (even though
    I've been attempting to do it for a while!) so was
    wondering if you could point me in the right
    direction.
    That is exactly what I did though.
    Do you have the javadocs? If so then you look up java.io.File and read the methods in it.
    Here is the online link....
    http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html

  • Playlist:  Creating playlist using folder names (auto)

    Is there a way to auto-create playlists using existing folder names? I have about 90-100 folders that I had created over the years; manually creating playlist for each folder would be a pain. I am looking for a way to auto create these playlists while iTunes is importing my folders (or otherwise). Any advice highly appreciated.
    Jixy

    iTunes alone has no way to do that. You will need a 3rd party folder watching program.
    Check out iTunes Folder Watch: http://albumbrowser.klarita.net/itfw.html

  • Folder names

    I wonder what is possible to use as Folder names?

    Thank you!
    I tried this morning to give a new folder this name:
    "Tillväxt i liv gm den treenige Gudens flöde"
    But I it did not take it.
    But then I started to call it Tillväxt i liv" and then I added a little part and continued to I had the whole name, then it was okay.
    Why was it like this?
    // Bosse

  • How can I change my "Home directory" folder name?

    Hello, everyone.
    I was given a pre-owned MacBook Pro that's running OS 10.6.8.  How can I change the name on the Home directory folder?  I was able to change the Administrator Account settings, but the Home directory still shows the previous owner's name.  It bothers me a bit, though, to see the previous owner's name still come up on the Home folder.
    I came across the instruction listed below, but I can't get past step 4.  It instructs me "rename it just like I would rename any folder."  I can't seem to rename it, though.  The cursor doesn't come up when I click on the folder name.
    For Mac OS X v10.5 or later
    Enable the root user.
    Log in as root.
    Navigate to the /Users folder.
    Select the Home folder with the short name you want to change, and rename it just like you would rename any folder. Keep in mind that the shortname must be all lowercase, with no spaces, and only contain letters.
    Use the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier) in System Preferences to create a new user with the Account name or Short Name that you used in the previous step.
    Click OK when "A folder in the Users folder already has the name 'account name'. Would you like to use that folder as the Home folder for this user account?" appears. Note: This will correct the ownership of all files in the Home folder, and avoid permissions issues with the contents.
    Choose Log Out from the Apple menu.
    Log in as the newly created user. You should be able to access all of your original files (on the desktop, in Documents, and in the other folders of this Home).
    After verifying that your data is as expected, you can delete the original user account via the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier).
    Disable the root user.
    Any help would be much appreciated.

    Hi everyone,
    I followed this https://discussions.apple.com/docs/DOC-3872
    and got to the stage of having renamed my Home folder with the new name but the Home folder is STILL designated to the old name?
    When I try and create a new user with the new name, I don't get asked if I'd like to use the existing name as Home folder, I get told I can't use the newname because it exists already - thats the end of it - no further options.
    So to clarify - I now have oldname folder STILL assigned as Home folder. A newname folder with all my stuff in - apps, desktop, etc etc but this is just another user folder.
    Interestingly at login stage, the oldname folder isn't an option. I think I've confused the system somewhere by titling things differently at some stage in an attempt to rename Home folder.
    I'm running Mountain Lion (as of yesterday) and because I've kinda lost the use of my User folder as the Home folder, can't get to my Time Machine. I'm in trouble but I'm trying not to panic. Would appreciate any help!
    Laurie

  • How can I get rid of directory path in front of my folder names in Folder listing in Library mode???

    Im using the most recent version of Lightroom 5.3 (updated through CC - even though this has shown up on previous version) on Windows 7 and all the folders in my library are showing up with the directory path in front of my folder names. How can I get rid of this? I do not see any options in preferences to turn this off. I have also turned off preferences in Windows > Folder Options Control Panel "Display full Path in Title bar" option.
    I have Lightroom on several computers and have set up preferences the same on each workstation, and this only shows up on one workstation.
    Any help would be appreciated.
    You can see from the image  below how this is showing up.
    Thanks
    Thanks!

    Click the little down arrow/+ symbol  next the + - in the folders bar.

Maybe you are looking for

  • Create a signature capture for Windows Phone 8.1 App

    I am creating a Windows Phone 8.1 app with signature capture control on one of my page. I am looking for an approach using C# so that I can draw points on a XAML with Canvas control. But it seems like that InkPresenter name space is removed from Wind

  • Why am I getting "The Report Filename Is Empty - Using CR13 vs2010 2003sqls

    I am enhancing a vb.net app that was originally written with vs2010 vb.net, crystal reports 10 and telerik. It has been running for a year. I have made enhancements using vs2010sp1 vb.net,  cr 13,  telerik framework updated. The server is a 2003 serv

  • Edit Appraisals:  Notes only shows one row at a time

    Under the Employee Review tab of MSS-->Edit Appraisals, when I click to create an appraisal, the appraisal form in our system has areas to add notes.  However, in the portal, the area to add notes is only 1 row.  It is scrollable, but you can only se

  • Content Switching Module (CSM): Sessions stuck in closing state

    Hi guys, I'm troubleshooting a CSM with 4.3(1). We migrated a real server from windows to linux, since then lot's of sessions stuck in closing state until the idle timer expires. I traced the traffic from the client to the csm and from the csm to the

  • Open database with corrupt datafile

    hi.. all i'm use oracle10g R2 on RHEL 3 ,because power outage my datafile INDEXES.dbf was corrupted and i can't open my database with this corrupted datafile , i'm try to recover the corrupted block with blockrecover command using RMAN and block reco