Windows Environment Variables

Is Coldfusion able to grab the Windows Environment variables
of the user that is viewing a CF page? I am wondering about reading
the windows username currently logged in on the client machine. I
don't think this is the same as CGI variables.

We are running a Novell network. The IIS machine has the
Novell client installed. If the user has not personally logged into
the IIS machine, it will not authenticate them through the CF page.
It worked great if the user already had a profile on Windows. Is
there a way around this besides having users log into the machine,
which really isn't an option?
Suppose I am Average Joe User viewing the site. My own
computer is running the Novell client and I have logged into this,
so therefore windows has a profile for me, and my username is
stored in the Username Environment variable (which is viewable by
typing 'set' in the command prompt). Can CF grab that username
Environment variable off my computer and use it at all? Or is it
all based on the username on the IIS server?

Similar Messages

  • How to use windows environment variable "%appdata%" in TEXT_IO built-in

    Hello Sir/Madam,
    I'm currently using TEXT_IO built-in package to write data file user's "C" drive in Oracle Forms 6i on Windows XP OS. We are in the process of upgrading the OS to Windows7. This new version does not allow to write to "C" or "D" drive. I was wondering how I can use windows environment variable "%appdata%" in this built-in to write the data file to user's AppData folder?
    I would appreciate your help.
    Regards,
    Vani Sonti

    You are obviously not familiar with the architecture of webforms. See here http://www.oracle.com/technetwork/developer-tools/forms/275632-133265.pdf
    I guess you are running your forms locally, so the forms server and the client run on the very same machine. This won't be the case once you run in production, as you will have an application server and clients connecting to the server.
    text_io, tool_env and all the forms built ins will be executed on the machine the forms runtime runs on, and in a 3 tier architecture this is the application server, not the client as the real client will run just a java applet which actually just does what the forms runtime on the server tells it to do (or passes client side events like mouse clicks to the forms runtime on the server).
    A very simple explanation for the architecture would be that the whole GUI part has been ripped off the forms runtime and put into a java applet; the logic part (the old-fashioned forms runtime) where the whole Forms PL/SQL code is executed communicates with the GUI part (which is implemented as a java applet) via HTTP, so there is no need to have both running on the very same machine.
    So if you are writing a file with text_io on c:\dummy.txt this file will be generated on the application server machine as it is executed where the forms runtime runs. If you read environment variables with tool_env.getvar you will get the environment variable from the application server machine.
    If you need those variables from your application server then those built-in packages are what you need, but if you need the real client variables there is no way around java in webforms 6i. But the beans should be simple enough to have them written within no time ;)
    cheers

  • How to include Windows environment variables in e-mail action scheduled task

    Hello Support,
    Is it possible to include Windows environment variables such as %username% or %computername% in the subject line or body of the "Send e-mail" action item of the Task Scheduler?  For example, I would like when I setup a scheduled
    task to perform a certain task and send an e-mail message,  the email should include either the user name or computer name in the subject line and body of the e-mail.  Is that possible?
    Thanks

    Hi,
    You can create a new Scheduled Task preference item to solve your requirement.
    Checkout the below link for more information,
    http://technet.microsoft.com/en-us/library/dd851678.aspx
    Regards,
    Gopi
    JiJi
    Technologies
    I created a scheduled task and that does not provide what I need.  The scheduled task will simple send an mail, but I want to know from which machine or user triggered the email.  I also tried adding the batch file to the scheduled
    task and that did not work even though the scheduled task has the following settings. 
    User Configuration >> Prefence >> Control Panel Settings >> Scheduled Tasks
    When running the task, use the following user account
    NT AUTHORITY\System
    Run whether user is logged on or not 
    Run with highest privileges  HighestAvailable
    Configure for: Windows 7
    I also tried with Computer Configurations

  • Is there any way to get windows environment variables like %USERNAME% with javascript?

    is there any way to get windows environment variables like %USERNAME% with javascript using Adobe 10 pro?

    There is a fair amount of Acrobat JavaScript and Acrobat knowledge need to sort all of this out.
    The identity object holds a lot of sedative information. First, upon installation of Acrobat, only the login name is available in the identity object and the end user of the application needs to complete the "Name", "email" and "Organization Name" in the application's preferences. These are the only fields that are available to Acrobat JavaScript identity object as corporation, email, loginName, and name.
    Using the instructions in The Acrobat JavaScript Console (Your best friend for developing Acrobat JavaScript) you can run the following script in the JS console to see the items of the identity object:
    for(i in identity) {
    console.println(i +": " + identity[i]);
    and the following will appear in the console:
    loginName: georgeK
    name: George Kaiser
    corporation: Example
    email: [email protected]
    true
    The documentation states you need to use a trusted function to access this data, but you can access it at startup of Acrobat/Reader and add the properties of the identity object to an array:
    // application variable to hold the properties of the identity object
    var MyIdentity = new Array();
    // loop through the properties of the identity object
    for (i in identity) {
    // place each property of the identity object into an element of the same name in the Identity array
    MyIdentity[i] = identity[i];
    console.println(i +": " + MyIdentity[i])
    You access the items with:
    var loginUser = MyIdentity[loginName];  // get the loginName property
    In the user application level JavaScript file. See Acrobat Help / User JavaScript Changes for 10.1.1 (Acrobat | Reader) for the location of the application level folder you need to use.
    I would change the name of the array used in this post so an untrusted user cannot get to your data. Some of this data can be used in hacking into a user's system.

  • Windows Environment Variable

    Hey,
    I am trying to use
    cl_gui_frontend_services=>gui_download
    and include the windows environment variable %USERPROFILE%
    in the path for example:
    filename = '%USERPROFILE%/filename.txt'
    that only creates a directory called %USERPROFILE% but not the Variable.
    Has anybody experienced this ?
    Thank your for your help,
    kind Regards
    Christof

    you have to use the following code to get the environment variable value and then use that with gui_download
    call method cl_gui_frontend_services=>environment_get_variable
          exporting
            variable     = p_envir_name
          changing
            value        = ls_envir_path
          exceptions
            cntl_error   = 1
            error_no_gui = 2
            others       = 3.
    call method cl_gui_cfw=>flush
          exceptions
            cntl_system_error = 1
            cntl_error        = 2
            others            = 3.

  • @variable and Operating system variables (Windows environment variables)

    Hi,
    Has anyone experience with using @variable and Operating system variables (Windows environment variables)in XI 3.x Web Intelligence ?
    Help gives the example of @Variable(NUMBER_OF_PROCESSORS). Even with syntax correction @Variable('NUMBER_OF_PROCESSORS') it does not seem to work.
    It works fine for Desktop Intelligence. Environment variables added are read, after restarting DeskI. If already in an existing DeskI session, newly added (unknown) variable names give a prompt with the variable as prompt text as a result. This is the behavior in Web Intelligence, even for environment variables that are always set (like Path, TMP, ...)
    Both WebI Rich Client and WebI via Infoview in XI 3.1 and XI 3.1 SP2 show this behavior (prompt instead of @variable behavior)
    Are there settings that need to be made? other syntax ?
    Is this a DeskI only feature ?
    Thanks!
    Raf
    Edited by: Raf on Oct 30, 2009 3:44 PM

    Hi Abdellatif,
    Ok, that would clarify things.
    You have an idea if this is documented somewhere?
    Reason we ask:the "xi3-1_designer_en" guide, the specification for the @variable function states:
    "BusinessObjects system variables. ...
    Report variables. ...
    Operating system variables. You can enter Windows environment variables in order to obtain information about your installation.
    Custom variables. With Desktop Intelligence, you can use a predefined text file to provide a list of fixed variable values."
    There's no explicit referal to DeskI only for OS system variables, like there is for custom variables.
    Thanks!
    Raf

  • Trouble Setting Windows Environment Variables

    My environment:
    Windows XP Professional
    Intellij 6.0.4
    JDK 1.4.
    I am seeing some very weird behavior when I try to get/set Environment Variables in Windows XP. I use the following code to read the variables:
    Process p = r.exec( "cmd.exe /c set" ); I create an environment varialbe through the Windows control panel, and it does not show up when I execute the above command. However, when I close my IDE and reopen it and run the same code, the variable appears. How is this possible? I am using the Windows XP cmd.exe in my program to read the variables. When I open a DOS window and type the same command, my variable is there.
    This is driving me crazy.
    i want my program to do some work, but then check a system variable to see if it should continue. I want a user to be able to stop processing by setting the environmen variable to true.
    Thanks!
    Nathan

    Runtime.exec has a lot of overloadings. Two of them
    allows you to specify the environment variables.
    exec
    public Process exec(String[] cmdarray,
    String[] envp,
    File dir)
    throws IOExceptionExecutes the specified command and
    arguments in a separate process with the specified
    environment and working directory.
    cmdarray - array containing the command to call and
    its arguments.
    envp - array of strings, each element of which has
    environment variable settings in format name=value.
    dir - the working directory of the subprocess, or null
    if the subprocess should inherit the working directory
    of the current process.
    I had this sample program:
    public class SetVarExample {
    public static void main (String[] args) throws Exception {
         String[] cmd_env= new String[] {"password="+"ABCD","Path=C:\\Sun\\AppServer\\jdk\\bin"};
         String cmd = "cmd /c SET ";
         Runtime.getRuntime().exec(cmd,cmd_env);
    System.out.println( "Finish ...." );
    I tried it in a command prompt. But looks like when the program exits, it's a whole new process and so it does not retain the env variables set in the java program.
    Any suggestions? Am I doing it worng?
    thanks

  • Setting windows environment variables from Java program

    Is there any way to set environment variables from Java program in Windows? Any help is appreciated.
    Here is my situation:
    I need to decrypt an encrypted Oracle user password in a batch file which will be used while running a sql script with sqlplus. I was planning to have bat file which will call a Java program decrypt the password and set it as an env variable in windows which will be available while calling sqlplus.
    thanks

    Runtime.exec has a lot of overloadings. Two of them
    allows you to specify the environment variables.
    exec
    public Process exec(String[] cmdarray,
    String[] envp,
    File dir)
    throws IOExceptionExecutes the specified command and
    arguments in a separate process with the specified
    environment and working directory.
    cmdarray - array containing the command to call and
    its arguments.
    envp - array of strings, each element of which has
    environment variable settings in format name=value.
    dir - the working directory of the subprocess, or null
    if the subprocess should inherit the working directory
    of the current process.
    I had this sample program:
    public class SetVarExample {
    public static void main (String[] args) throws Exception {
         String[] cmd_env= new String[] {"password="+"ABCD","Path=C:\\Sun\\AppServer\\jdk\\bin"};
         String cmd = "cmd /c SET ";
         Runtime.getRuntime().exec(cmd,cmd_env);
    System.out.println( "Finish ...." );
    I tried it in a command prompt. But looks like when the program exits, it's a whole new process and so it does not retain the env variables set in the java program.
    Any suggestions? Am I doing it worng?
    thanks

  • How do I use a OS (Windows) Environment Variable in the source path of me ActionScript 3.0 settings

    I'm sure this can be done as I know we used something similiar at my old work place, below is an image showing what I am attempting to do.
    We used this to create more portable / shareable assets files which when symbols are linking to code, the code was very often in different directories on different machines.
    So we had set up environment variables in the OS to point to source directories and then used these variables in the source paths.
    As long as everyone had these variables set up then it would all work.
    Anyone know the correct way to do this in Flash CC
    Thanks in advance!
    Best Wishes
    Rhys Thomas

    sinious the problem with doing that is that the changed path gets into the code repository as well, so you wind up with everyone going back and forth changing it to their own value, which is a hassle. If you use relative paths and a standard project setup, then it all "just works" without a problem.
    For example, this is the setup I use:
    .dev
         .thisProject
              .Flash1
                   Flash1.as
                   .Flash1
                        Flash1.xfl
                   .view
                        .audioAssets
                        .customViews
              .SoundLib
                   SoundLib.xfl
              SoundLib.swc
         .bin <swfs are output here
              .xml
         .core
              .control
              .model
              .service
              .view
    We have a "base project" that you check out to start a new project (we do heaps of similar work), and the paths are already set up to be relative. Having each project point to its own copy of the core code allows for fine-grained control of which revision you're using--we've even pointed deliberately to old versions or branches on rare occasions.
    The bin folder is actually shared with the website repository, which is in a different directory from the Flash source code (in the website, it has a different name). This allows the generated swfs to be easily updated and ensures that the latest XML is being used both for development and on the site.
    The "thisProject" folder actually includes a Flash Builder workspace with all the standard shortcuts, etc., already set up. This is primarily because of how the "default path" works when you create a new Flash Pro project in FB. Because we output a level up from the workspace, we hack the .metadata folder every time, but that's a small change.

  • Windows - PERL5LIB Environment variables

    Hi All,
    I was trying out xampp and I removed the perl5lib environment variables for Oracle. Unfortunately, I did not save the settings in notepad or something and yes, I know how stupid that was. Consequently, now all the clients are failing on that server. For example, if I click on SQL*Plus, I get the "Need to set ORACLE_HOME" error (same thing for PHP, etc.).
    I would really appreciate it if someone can send me their PATH and PERL5LIB environment variables from a Windows (preferrably XP) installation of Oracle. Also, is there some other way to restore these values? Like a bat file or something that gets installed. Thanks a lot.

    Hi. Thank you for your response. I tried rebooting, but I still get the error.
    Like I said, the only change I made was to the environment variables. It is possible that xampp made some changes behind the scenes, but the only known change was me replacing the Oracle PERL paths with the xampp PERL paths in the Windows environment variables (through "My Computer" --> "Properties").
    Is it possible to do a re-configuration using the installer instead of a complete re-install? If you have any other ideas, I would appreciate it. Thanks.

  • WebForms - Accessing Environment Variable on a Windows Client

    Hi. We access a Windows Environment Variable using Client-Server Forms 6i. We do this as follows:
    Tool_Env.GetVar('ALLUSERSPROFILE', myPath);
    message(myPath);This returns the value 'c:\documents and settings\all users' on Windows XP.
    This returns the value 'c:\programdata' on Windows 7.
    We'd like to keep similar logic in this form once it's migrated to Web Forms. Is there a way to access this 'allusersprofile' environment variable (or any environment variable to determine whether the user is XP or Win7) from a web form running our UNIX server? Maybe somehow using WebUtil or something?
    Any suggestions would be greatly appreciated. Thanks.

    WebUtil enable your form then do this:
    message (CLIENT_WIN_API_ENVIRONMENT.Get_Environment_string('allusersprofile'));To get the Windows version, do this:
    message(CLIENT_WIN_API_ENVIRONMENT.Get_Windows_Version);.
    Edited by: Michael Ferrante on May 23, 2012 5:06 PM

  • Do we need to update snpsagent.conf File and Windows Environmental variable in ERPI 11.1.2.2

    In ERPI 11.1.1.3 Admin guide its mentioned we need to update the below , do we need to do the same in 11.1.2.2 version also
    Updating the snpsagent.conf File
    ä To update the snpsagent.conf file:
    1 Navigate to the folder where Oracle Data Integrator is installed.
    For example, C:\OraHome_1\oracledi\tools\wrapper\conf.
    2 Using a text editor, open the snpsagent.conf file.
    3 Search for: wrapper.java.library.path.1.
    4 On a new line, add the following text:
    wrapper.java.library.path.2=../drivers
    5 Close and save the file.
    Updating the Windows Environment Variable
    After you update the snpsagent.conf file, add the ODI drivers path information to the
    Windows environment variable.
    ä To update the Windows environment variable:
    1 On the desktop, right-click My Computer, select Properties. Select the Advanced tab, and then click
    Environment Variables.
    2 In the System variables section, select the Path variable, and then click Edit.
    3 At the end of the Variable value line, add a semi-colon (;), and then add the Oracle Data Integrator
    driver path.
    For example, C:\OraHome_1\oracledi\drivers.
    4 Click OK three times.
    5 Restart the Oracle Data Integrator Agent Service.
    Thanks

    You should not have to do this in ODI 11.1.1.6 for ERPi 11.1.2.2.

  • Setting widows environment variable like "path "

    I want to set a new value for windows environment variable path. Is there any way to set change the varibale.

    You could also use ORA_FFI package to call Windows API function SetEnvironmentVariable. There is an example below.
    See also:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/setenvironmentvariable.asp
    kernel_lhandle Ora_Ffi.Libhandletype;
    GetEnvironmentVariable_fhandle Ora_Ffi.Funchandletype;
    SetEnvironmentVariable_fhandle Ora_Ffi.Funchandletype;
    FUNCTION ff_GetEnvironmentVariable(
    fhandle Ora_Ffi.funchandletype,
    lpName varchar2,     -- address of environment variable name
    lpBuffer varchar2,     -- address of buffer for variable value
    nSize      pls_integer -- size of buffer, in characters
    ) RETURN pls_integer;
    PRAGMA interface( C, ff_GetEnvironmentVariable, 11265 );
    FUNCTION ff_SetEnvironmentVariable(
    fhandle Ora_Ffi.funchandletype,
    lpName varchar2,     -- address of environment variable name
    lpValue varchar2     -- address of variable value
    ) RETURN pls_integer;
    PRAGMA interface( C, ff_SetEnvironmentVariable, 11265 );
    function SetEnvironmentVariable(lpName varchar2, lpValue varchar2) return pls_integer IS
    BEGIN
    return ff_SetEnvironmentVariable( SetEnvironmentVariable_fhandle, lpName, lpValue );
    END;
    function GetEnvironmentVariable(
    lpName varchar2
    ) return varchar2 as
    lpBuffer char(2000);     -- address of buffer for variable value
    nSize      pls_integer; -- size of buffer, in characters
    res pls_integer;
    begin
    lpBuffer:='*';
    nSize:=2000-1;
    res:=ff_GetEnvironmentVariable(
    GetEnvironmentVariable_fhandle,
    lpName,
    lpBuffer,
    nSize );
    if res>0 then
    return substr( lpBuffer, 1, res );
    else
    return null;
    end if;
    end;
    -- Initialization
    /* Load the library */
    kernel_lhandle:=Ora_Ffi.Load_library
    ( '', 'kernel32.dll' );
    /* GetEnvironmentVariable */
    GetEnvironmentVariable_fhandle:=Ora_Ffi.Register_Function
    ( kernel_lhandle, 'GetEnvironmentVariableA', Ora_Ffi.C_Std );
    Ora_Ffi.Register_Parameter
    ( GetEnvironmentVariable_fhandle, Ora_Ffi.C_CHAR_PTR );
    Ora_Ffi.Register_Parameter
    ( GetEnvironmentVariable_fhandle, Ora_Ffi.C_CHAR_PTR );
    Ora_Ffi.Register_Parameter
    ( GetEnvironmentVariable_fhandle, Ora_Ffi.C_INT );
    Ora_Ffi.Register_Return
    ( GetEnvironmentVariable_fhandle, Ora_Ffi.C_INT );
    /* SetEnvironmentVariable */
    SetEnvironmentVariable_fhandle:=Ora_Ffi.Register_Function
    ( kernel_lhandle, 'SetEnvironmentVariableA', Ora_Ffi.C_Std );
    Ora_Ffi.Register_Parameter
    ( SetEnvironmentVariable_fhandle, Ora_Ffi.C_CHAR_PTR );
    Ora_Ffi.Register_Parameter
    ( SetEnvironmentVariable_fhandle, Ora_Ffi.C_CHAR_PTR );
    Ora_Ffi.Register_Return
    ( SetEnvironmentVariable_fhandle, Ora_Ffi.C_INT );
    To change the variable PATH you could use something like the following code:
    s:=dll_path||';'||WIN32.GetEnvironmentVariable( 'PATH' );
    res:=WIN32.SetEnvironmentVariable( 'PATH', s );

  • Path environment variable

    I'm having a problem with Forms (6.0.8.11.3) and the FORMS60_PATH environment variable. I've changed it in the Registry, and on advice from another developer, created a Windows environment variable named FORMS60_PATH and given the value of the path to my development directory. Still when I issue a CALL_FORM('awards'), nothing happens. If I use the whole path like: CALL_FORM('d:\myforms\awards'); it works fine.
    HELP!!

    A few things to check are:
    In which Oracle_home did you define your forms60_path?It's in HOME2 which is the only place I found the FORMS60_PATH registry entry. If I do a TOOL_ENV.GETVAR('FORMS60_PATH', v_path), I get my development path as I defined in the registry. Any other suggestions?
    Also make sure the value is not longer then the limit (255). no problem there
    Thanks

  • Java environment variables

    Hi,
    Just curious... What are the different environment variables that Java looks at, and what is the purpose for each of them?? To clarify that I'm talking about, I think some of them are JAVA_HOME, JAVAC(?), CLASSPATH, etc.
    Thanks

    There are three environment variables that Java generally uses:
    1. PATH
    2. CLASSPATH
    3. JAVA_HOME
    PATH is actually a windows environment variable where you specify the paths of executable files. For Java, this environment variable helps it locate java compiler, java runtimes - java, javaw and other tools in the JDK.
    CLASSPATH is specific to Java; it helps Java tools find Java class files
    JAVA_HOME is used by Java Applications to point to the directory where JDK is installed.
    For the current status of environment variables in Windows, run a command prompt and type 'set' (without quotes) followed by enter. Windows will then list all environment variables defined.

Maybe you are looking for

  • How to populate a field from database through personalization

    I need to populate value of a field from database on self service transaction web page. This field is not configured as EIT or SIT, nor available in seeded transaction.I need to know abt creating some item through personalization where i can write a

  • Selecting pictures from the same folder in the main library

    Hello, Still related to the folders. Is there a way to select, from the main library, all the pictures that belong to one given folder? That would be usefull to me if I want to make a slide show and find a specific picture and want to get all the oth

  • Sizing an Oracle E-Business Suite Server

    Is there a formula to determine server specifications for an Oracle EBS?

  • Database Cache and Gateways

    We are considering using Oracle Database Cache to speed up a web application that reads data from a mainframe database. Since Database Cache only works with Oracle databases, we plan to create a new Oracle database that acts as a gateway (using ODBC)

  • Solaris & Windows 2000 Problems???

    I've mounted my windows partition so that solaris can see it, via the vfstab file in the /etc directory. Whenever I try to copy files from my windows partition to my solaris partition i get the following error: "Invalid device or address" What I'm wo