How do I launch executable from PS prompt?

Hello,
Very basic question, if I launch powershell and I'm trying to launch executable from "system32" (which is in PATH:), how do I do that without specifying exact path to it (like you can do in "CMD.EXE")
PS C:\Users\g> nesth.exe winhttp show proxy
The term 'nesth.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the s
pelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:10
+ nesth.exe <<<< winhttp show proxy
+ CategoryInfo : ObjectNotFound: (nesth.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

That should work fine unless netsh.exe is not in your path or not installed on your system.
You also need to type the command correctly (no fat fingers):
netsh.exe winhttp show proxy
I hope this post has helped!

Similar Messages

  • How TO CALL c++ EXECUTABLE FROM XI(VERY iMPORTANT)

    hI ALL
    pLEASE DO GIVE SUGGESTIONS AND DOCCUMENTATION LINKS  THAT <b>HOW TO CALL c++ EXECUTABLE FROM XI</b> .THIS IS VERY IMPORTANT AND YOUR HELP WILL BE REWARDED.
    WITH REGARDS
    SUBRATO KUNDU

    Hi Subrato,
    AFAIK you can call C / C++ methods in Java using Java Native  Interface (JNI).
    Please refer the following links for how to do the same.
    <a href="http://www.nag.com/IndustryArticles/CallingCLibraryRoutinesfromJava.pdf">For C:</a>
    <a href="http://www.javaworld.com/javaworld/javatips/jw-javatip17.html">For C++:</a>
    Regards,
    Ananth

  • How do I launch report from menu using RUN_REPORT_OBJECT?

    Hi all,
    Re: How do I launch report from menu (and have it print to the screen) using RUN_REPORT_OBJECT?
    I am using Oracle 9iAS on Windows 2000 and I have a similar problem with launching reports from the menu. The application should call the report via the RUN_REPORT_OBJECT builtin feature from Forms. The report is never displayed.
    The report is in the same folder as the menu form calling it. Do the reports have to be in a specific format? How do I get the report_id?
    The name of the report is seconds_calls. No user-specified parameters are passed. Also, the report object in the object navigator in Forms is Report4 (is this relevant?)
    When I try to run report via the form using this code:
    DECLARE
         report_id REPORT_OBJECT;
         rep_status VARCHAR2(200);
         v_rep VARCHAR2(100);          
         report_job_id VARCHAR2(200);
    --     job_number NUMBER;
    --     server_name VARCHAR2(200) := 'repserver';
    BEGIN
         report_id:= FIND_REPORT_OBJECT('seconds_calls');
         rep_status:=REPORT_OBJECT_STATUS(report_job_id);
         v_rep := RUN_REPORT_OBJECT(report_id);
    END;
    I get this error message:
    FRM-41219 Cannot find report:Invalid ID
    And this message
    FRM-40738 Argument 1 to builtin RUN_REPORT_OBJECT cannot be null
    When I tried to use the same code (above), substituting the object name for the form name,
    I got these messages:
    FRM-41219 Cannot find report:Invalid ID
    FRM-40738 Argument 1 to builtin RUN_REPORT_OBJECT cannot be null
    And FRM-10259 Invalid null argument to packaged procedure or function (???)
    Any ideas?
    Cheers,
    Pippa

    Philippy,
    substr(v_rep,instr(v_rep,'_',-1)+1)
    This code extracts the Reports job id from the Reports Server name. The run_report_object() built-in
    retrieves e.g. RepServ_9 as a job id, but in Reports9i you only need the '9' as a value to retrieve the
    output.
    Use the following sample a template. It is a procedure that expects the reports object name, teh reports server name and the
    output format as an argument. The call to Web.show_document expects the ReportsSrevices to be accessible from teh same server
    (relative addressing is used)
    PROCEDURE RUN_REPORT_OBJECT_PROC (vc_reportobj Varchar2, vc_reportserver varchar2, vc_runformat varchar2) IS
    v_report_id           Report_Object;
    vc_ReportServerJob      VARCHAR2(100); /* unique id for each Report request */
    vc_rep_status      VARCHAR2(100); /* status of the Report job */
    vjob_id               VARCHAR2(100); /* job_id as number only string*
    BEGIN
    /* Get a handle to the Report Object itself. */
    v_report_id:= FIND_REPORT_OBJECT(vc_reportobj);
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESTYPE,CACHE);
    /* Define the Report output format and the name of the Reports Server as well as a user-defined parameter, passing the department number from Forms to the Report. We don't need a parameter form to be displayed, and therefore paramform is set to "no". */
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESFORMAT, vc_runformat);
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_SERVER, vc_reportserver);
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_OTHER,      'p_deptno='||:dept.deptno||'paramform=no');
    vc_ReportServerJob:=RUN_REPORT_OBJECT(report_id);
    /* remove the Reports Server name from teh job id */
    vjob_id := substr(vc_ReportServerJob,length(reportserver)+2,length(vc_ReportServerJob));
    /* Check the report status if finished. */
    vc_rep_status := REPORT_OBJECT_STATUS(vc_ReportServerJob);
    IF vc_rep_status='FINISHED' THEN
    /* Call the Report output to be displayed in a separate browser window.
    The URL for relative addressing is only valid when the Reports Server
    is on the same host as the Forms Server. For accessing a Remote Reports
    Server on a different machine, you must use the prefix http://hostname:port/ */
    WEB.SHOW_DOCUMENT ('/reports/rwservlet/getjobid '||vjob_id ||'?server='vc_reportserver,'_blank');
    ELSE
    message ('Report failed with error message '||vc_rep_status);
    END IF;
    END;
    Frank

  • When I open itunes on my laptop, how do i stop itunes from automatically prompting for my apple account info?

    When I open itunes on my laptop, and I have connected my iPod Touch, how do I stop itunes from automatically prompting for my apple account info?  I'm usually not intending to make any purchases at that time, so do they need to know my account info?

    Rented movies downloaded to an Apple TV can't be transferred to any other device.
    (86941)

  • How can i launch application from the terminal in 32-bit mode?

    how can i launch application from the terminal in 32-bit mode?
    everytime i have to check and uncheck the finder's info panel and it's really annoying, thanks!

    ''Courtesy of cor-el''
    https://support.mozilla.com/en-US/questions/823873
    Other users should note that Firefox has public release versions of 64bit only for Mac And Linux; not for Windows, yet.

  • How to launch executable from a java program

    In c++ we can use a function WinExec to execute exe from a c++ program.
    Is there a way to launch executables using java program. Lets say I have one executable with name "myexecutable.exe" and a java program "myprogram.java". How can I launch "myexecutable.exe" from the java program.
    Is there a way to do this in Java?
    Vijay

    >>
    class LoadExecutable
    static void loadProcess()
    Runtime r = Runtime.getRuntime();
    Process p = r.exex("winword.exe");
    public static void main(String args[])
    loadProcess();
    }Regards
    - ManikantanBoth of these aren't good ideas - neither of them
    deals with the input or output streams at all.
    Everyone who's posted to this thread should read this.
    None of you knows how to use Runtime.exec properly:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-t
    aps.html
    MOD
    Thanks for the tips
    -Regards
    Manikantan

  • Can't launch executable from SQL Server Agent Job

    I'm trying to launch an .exe from SQL Server Agent Job and basically nothing happens. I created a job, with 1 step, type is Operating System (CmdExec), run as sql agent service account, and in the command box I typed "start notepad" (no quotes). The job owner is set to administrator. I manually start the job, it processes successfully yet notepad does not launch. I've tried with other .exe's and result is the same. Any advice? Thanks!

    I tried several things and not just with notepad, I tried a couple other small executables. I've tried:
    c:\notepad       --(I copied it to c:\ thinking it maybe it's not finding the file.)
    c:\notepad.exe
    notepad.exe
    start notepad
    start notepad.exe
    and also launching it from a batch file.
    If I use just notepad the job hangs saying it's executing and I have to stop it. If I use start notepad it comes back as executed but actually nothing happens, ie, notepad does not launch. I've tried different security settings within SQL Server (ie assigning all available default roles to the login at the same time and individually one at a time) with identical results. SQL Server is loging in with local administrator priviledges and so is SQL Server Agent. My settings are the default installation settings (for Windows Server 2003 and SQL Server 2005) except that I read the BOL page "Configuring SQL Server Agent" which indicates the permissions needed for the following:
    Adjust memory quotas for a process
    Act as part of the operating system
    Bypass traverse checking
    Log on as a batch job
    Log on as a service
    Replace a process level token
    And they have been set. Still the same. BTW, I get the same result when trying to launch the file using xp_cmdshell with all the variations, and the proxy account for xp_cmdshell has been set to a login with administrator priviledges....
    I think it's some security setting in Windows Server, if only because I think I've tried all the settings within SQL Server...
    BTW, also, nothing is setup for Proxies under the SQL Server Agent node, but I don't think I should need to if I'm using the administrator level login...

  • How to run an executable from command-line

    I'm learning how to use the Terminal and I got stuck in a silly thing (I suppose it is). How can I run an executable file from command-line in Terminal?
    For example: I have a file named "Hello" in the folder /sample. If I use the ls command (ls sample), I can see the file Hello. Then I move to the directory (cd /sample) and try to run the file Hello (typing "Hello") but I got "command not found" message.
    If I drag the Hello file from Finder to Terminal and hit Return, it runs perfectly. And if I type the full path to the file (even if I'm already inside its directory), it also runs.
    So, my doubt is if there is any command to run an executable from command-line.
    Thanks

    KJK555 wrote:
    Hi VK:
    Can you enlighten me on why it's neccessary to do the "./" thingy in OS X when in unix/linux
    I never had to resort to doing that?
    Kj
    I took the trouble of reading *man bash* and it explains the issue. to add the current directory to PATH you need to add an empty path to PATH like this
    PATH=$PATH::
    you can add it to ~/.bash_profile so that it's executed automatically when you start bash. I suspect the linux system you are talking about had this set up by default or had it added to PATH in /etc/profile which defines PATH globally.

  • How to stop the executable from starting when opened

    Hi Guys,
    I am building an exe with the application builder. I am not able to find a way to stop the exe from running when opened. I dont need the exe to run. I know I m missing a very basic step here but I m not able to do that.
    Could anyone explain me how to do this.
    Regards,
    Nitin

    Hello,
    This is Dominic L. from Applications Engineering at National Instruments. This was reported to R&D (CAR#41DAPUQU) and was fixed in LabVIEW 8.2.1. Here is a link to the current evaluation software download for LabVIEW:
    http://digital.ni.com/demo.nsf/websearch/14f9ce475127ade786256ac60070926c?opendocument
    This particular bug actually renders all the build options for source file settings unusable. While the other options can be set manually in the source VI properties, the start-up VI will always run when an executable is opened.
    Here are three different workarounds to this:
    Option 1 - Upgrade to 8.2.1. 
    Option 2 - Check "Enable debugging" and "Wait for debugger on launch" in the Advanced page of the build specification. One side effect is this will include the block diagrams of the VIs and extra code for debug tool support. Note that if you don't protect the source code (block diagram), it kind of defeats the purpose of creating an executable.
    Option 3 - Use a dummy startup VI to launch the desired startup VI.
    For the third workaround, the attached "Dummy Startup VI.vi" uses VI server to open the desired startup VI's front panel and then closes.  To use the Dummy Startup VI follow these steps:
    Add the Dummy Startup VI to the project.
    Open the Dummy Startup VI and change "Main VI.vi" to the VI you would like to open but not run in the project and save.
    In the source files page of the build, select the Dummy Startup VI as a startup VI and the VI you would like to open but not run as a support VI.
    Build and run.
    I hope this helps.
    Have a great evening!
    Best Regards,
    Dominic L.
    Attachments:
    Dummy Startup VI.vi ‏12 KB

  • Trying to find a way to execute from command prompt using java....

    I want to find a way to execute a command from the command line using a java program this is my code:
    import java.io.*;
    public class SQLHopefully
         public static void main(String[] args)
              try{
              Runtime rt = Runtime.getRuntime();
              Process proc = rt.exec("cmd /k start cmd.exe");
              OutputStream out = proc.getOutputStream();
              System.out.println(out);
              out.write("test.txt".getBytes()); //I THOUGHT THIS WOULD WORK
              InputStream stdin = proc.getErrorStream();
              InputStreamReader isr = new InputStreamReader(stdin);
              BufferedReader br = new BufferedReader(isr);
              String line = null;
              while ( (line = br.readLine()) != null) {
              System.out.println(line);
              stdin = proc.getInputStream();
              isr = new InputStreamReader(stdin);
              br = new BufferedReader(isr);
              line = null;
              while ( (line = br.readLine()) != null) {
              System.out.println(line);
              int exitVal;
              try {
              exitVal = proc.waitFor();
              } catch (InterruptedException e) {
              throw new IOException(e.getMessage());
              if (exitVal != 0) {
              throw new IOException("Exit value was " + exitVal ");
              }catch(IOException e)
              {System.out.println("ummmmm");}
    I hope my code is readable. I am trying to get the command prompt that comes up from the Runtime.exec() to run a file called "test.txt" I know it would be easier to just do it by executing it from java but I want to see if it is possible this way. I thought the out.write would do the trick but I was wrong. Somebody help please....
    Nate

    First read this article:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Second, you should probably send the Enter key to the shell if you want anything to happen. (Not that I know whether it will work, but I do know it won't work if you don't press Enter.)

  • How do you launch browser from a servlet

    I have an interesting issue here. I send data to a servlet and the servlet recieves and processes the data (confirmed through breakpoints) but I want to display the data in a JSP or directly thru the servlet using html tags.
    However I can forward or redirect the data from the servlet to my jsp code but this still doesn't launch a browser.
    A little more detail... I am not sending information from a JSP to the servlet. The servlet is listening on a port for input, so the servlet is being invoked directly when the data comes in. In the current state my servlet sends the results in a session object to a JSP which gets the results but can't display them since it doesn't launch browser.
    Does anybody know how to display my calculated results from the servlet in a browser?

    Ok let me try to be more specific. I have an application that sends data to the servlet over a socket connection. The servlet gets this data and multiplies it by a factor.
    When I put break points in, I see that the servlet gets this data.
    Now I am trying to display the data in a browser.
    Upon entry to doGet the servlet checks if the String variable that gets the parameter is not null. If it is not null then it forwards to a JSP.
    But I tried a scenario where I have a browser open that has the localhost address of the servlet and then I run the program which is outside the war file that contains the servlet to send data to the servlet, but when the servlet gets the data, it does the forward to the JSP but the page is not displayed. However I see the process move to the JSP thru the break points I put in.
    I know its kind of a weird scenario but I suspect that since the program calls the servlet and it gets the data, it must need to launch a new browser in order to be able to display the JSP it forwarded to.
    I could be wrong but so far I have exhausted all possible ideas in my head for now so if you understand what I am saying perhaps you can tell me if you know a better way to do this...
    Thanks

  • How can I launch configurator from host application in a specefic language.

    Hi,
    I want to access R12 configurator from a host application and I have no problems accessing it.
    But I want that the configurator should Launch in Japanese Language. Can I specify any XML parameter to the UIServlet to achieve this or is there any other Method?
    Thanks

    Per the "Deploying a User Interface that Supports MLS" section in Chapter 14 ("Multiple Language Support") of the Oracle Configurator Implementation Guide:
    "When a host application launches Oracle Configurator to configure an item, the language specified in the database ICX session ticket is passed to Oracle Configurator.  Oracle Configurator uses this information to determine which translated text to retrieve from the database and display in the UI."
    So essentially, Configurator will display the same language that the hosting application is displaying, the language the user has logged into EBS with.  (Of course, translated text will only appear in Configurator if you have supplied translations in the CZ_LOCALIZED_TEXTS table.)  If you need Configurator to display a different language than its hosting application, that would require a customization of the initialization string the hosting application sends to Configurator, specifying a different icx_session_ticket parameter value.
    Hope this helps.
    Eogan

  • How to hide a password from a prompted osascript dialogue from a Mac/UNIX Shell Script

    I'm in the final phase of designing a script to automate my Active Directory binding that will be used by multiple people. Because of this, I need to prompt for a user name and password. I've successfully created the prompt, but want to find some way to prevent the password from showing up in the dialog box asking for the password (this will be done remotely, I don't want the password visible).
    It can be turned into stars, dots, not show up at all, anything, I just need it NOT to show visually, but still be able to be passed down to the dsconfigad command.
    I've tested the script itself and it works and a hidden password is the last piece that I need to make it live.
    (Excuse any extra comments on here, I've pieced this together from a lot of different sources)
    Any help you could offer would be greatly appreciated!
    #! /bin/bash
    while :; do # Loop until valid input is entered or Cancel is pressed.
        user=$(osascript -e 'Tell application "System Events" to display dialog "Enter the network user name:" default answer ""' -e 'text returned of result' 2>/dev/null)
        if (( $? )); then exit 1; fi  # Abort, if user pressed Cancel.
        user=$(echo -n "$user" | sed 's/^ *//' | sed 's/ *$//')  # Trim leading and trailing whitespace.
        if [[ -z "$user" ]]; then
            # The user left the project name blank.
            osascript -e 'Tell application "System Events" to display alert "You must enter a user name; please try again." as warning' >/dev/null
            # Continue loop to prompt again.
        else
            # Valid input: exit loop and continue.
            break
        fi
    done
    while :; do # Loop until valid input is entered or Cancel is pressed.
        netpass=$(osascript -e 'Tell application "System Events" to display dialog "Enter the network password:" default answer ""' -e 'text returned of result' 2>/dev/null)
        if (( $? )); then exit 1; fi  # Abort, if user pressed Cancel.
        netpass=$(echo -n "$netpass" | sed 's/^ *//' | sed 's/ *$//')  # Trim leading and trailing whitespace.
        if [[ -z "$netpass" ]]; then
            # The user left the project name blank.
            osascript -e 'Tell application "System Events" to display alert "You must enter a password; please try again." as warning' >/dev/null
            # Continue loop to prompt again.
        else
            # Valid input: exit loop and continue.
            break
        fi
    done
    MACNAME=$(scutil --get ComputerName)
    sudo dsconfigad -add DOMAIN \
    -username $user \
    -password $netpass \
    -computer $MACNAME \
    -mobile disable \
    -mobileconfirm disable \
    -localhome enable \
    -useuncpath enable \
    -shell /bin/bash \
    -ou OU=Macs,CN=Computers,DC=corp,DC=DOMAIN,DC=net \
    -force \
    -localpassword LOCALPASS \
    -groups "GROUPS"
    #sudo rm -- "$0"

    I think you want to change line 18 to read:
        netpass=$(osascript -e 'Tell application "System Events" to display dialog "Enter the network password:" default answer "" with hidden answer' -e 'text returned of result' 2>/dev/null) 
    and of course add the 'with hidden answer' bit to line 23 as well.

  • How to get year-1 from the prompted year - ( offset )

    Hi There BO Experts.
    I am used to SAP BW and now I am learning BO.  Currently working on a BO Web Intelligence solution.
    I am struggeling with variables and prompt.
    I would like the following solution.
    The user is promped for year - that is the current year.
    Based on this I want to be able to make a query selecting only last year.
    In sap BW we have something called offset on variables. I havent seen that in BO.
    Does anyone have a solution ?
    Points will be given.
    Best Regards,
    Ingrid Husby

    Hi Ingrid,
    Refer to the product guide [http://help.sap.com/businessobject/product_guides/boexir3/en/xi3_sap_olap_universes_en.pdf]
    See the section on "Calculated measures in OLAP universes" where I think you could create a prompt for year then - 1 from the imput.
    My senses tell me that if you coded the BeX query with the offset on the variable it should work as the object in the universe will pulled to prompt though from the BeX query...
    Dunno?
    Jacques

  • How to pass Key Event from command prompt to the java application

    If iam running a application that displays JFrame when i pressed CTR+C at the command prompt i.e console window please let me know how can it be passed to the JFrame ie application window

    I doubt that you can pass Ctrl+C to the application since the application is terminated by this key combination.
    You would try adding a WindowListener or may use a shutdown hook to capture the termination of the JVM.

Maybe you are looking for

  • Need advice on multiple imac repairs

    hi all i bought my imac a few years ago its a white intel 17 inch imac i have been having alot of problems with it for the past 8 months its had 3 logic boards replaced in last 7 months the most recent being 2 weeks ago and now i am getting same prob

  • ORA-02289: sequence does not exist

    Hi all. ORACLE Newbie alert! I am using TOAD for Oracle 8.6 The Oracle database version is BANNER Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production PL/SQL Release 9.2.0.6.0 - Production CORE     9.2.0.6.0     Production TNS for Solaris

  • Error in Uploading Resume in Candidate Gateway - HCM 9.0

    Hi, When I try to upload resume through careers page in candidate gateway, I'm receiving the bleow error: 'Your Resume could not be parsed at this time.' I'm not using any resume extractor. I found that I'm receiving this error because of &joB64 = Cr

  • Time data recording

    Hi, Is there any function module for uploading data to infotype 2001 and 2002? (Time data recoring) Thanks.

  • RP_PROIVDE_FROM_LAST

    hi friends, What is the proper use of RP_PROIVDE_FROM_LAST. thanks, SK