How to use the SHELL command

I simply want to open NOTEPAD and automatically load a specified file for modification. I would like it to automatically become active (not minimized).
My code: 'Shell ("C:\WINDOWS\NOTEPAD.EXE", Fname)'. I also tried 'i =
Shell ("C:\WINDOWS\NOTEPAD.EXE", Fname)'.
Both ways produce the error "InvalidCastException".

Hello,
Thank you for your post.
I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
and Visual Studio Editor.
I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • LabView equivalent to running batch files using the "shell" command (VisualBasic)

    I'm converting a VisualBasic app to LabView and am having trouble figuring out how to run a batch file with LabView.
    The VB code that I'm trying to replicate is:
    'UNLOAD RTX DRIVERS
    Dim ProcessId As Long
    ProcessId = Shell(App.Path + "\UnloadReloadRTX.bat", vbNormalFocus)
    Wait 400
    I haven't found a LabView equivalent to the Shell command. Any suggestions will be appreciated.
    thanks,
    Todd

    It seems as if this question pops up every week. Use the System Exec.vi found under Funtions - Communications palette. It is the equivalent of Shell.
    - tbob
    Inventor of the WORM Global

  • How to use the telnet command line in Labview

    Hi, someone can help me, I need to use a Telnet session in Labview but without using the http protocol, in this application I can only access the Telnet session using command line, here is an example of how I can access:
    From my computer, click on Start, then Run and then type in CMD.
    In the command line enter “telnet 192.168.0.1 5454” (without the quote marks) to bring up a blank DOS screen with a blinking cursor.
    Type “AT” and press the ENTER key, you should receive an “OK” response.
    Type in capital letters “AT+CMAR=1234” (without the quote marks)

    I had a similar situation and here is what I did...
    In MAX (Measurement and Automation eXplorer)
    Select Devices and Interfaces
    Select VISA TCP/IP Resources
    Create a new resource
    Select Manual Entry of Raw Socket
    Enter the IP address and port (23 is the standard telnet port)
    Give it a name. (VISA Ailas)
    Now this "Device" will show up in the VISA drop down just like any other VISA device.
    Use the VISA read and write just like you were communicating through a com port.
    Since Telnet does not have a stop bit like serial, make sure you enable the termination character.
    On your VISA reads set the number of characters to a big number, then VISA will read until it gets the termination character.
    See my attached snippet of my Telnet read vi
    Message Edited by RTSLVU on 06-16-2010 01:49 PM
    Message Edited by RTSLVU on 06-16-2010 01:50 PM
    Attachments:
    telnet.png ‏40 KB
    max1.png ‏33 KB
    max2.png ‏31 KB

  • How to Use the Shell

    In another thread, the following was said:
    So with your approach, you create the shell based on a Blank project, then after it has been created, you import.
    Using the method being discussed allows you to omit creating the shell first. Instead, you import and create the shell at the same time.
    Choosing one of the types such as Application Help or whatever just creates a project with certain things already in place and with topics that are partially fleshed out with information intended to help guide you along. Those are Project Templates. I created the one with the BigCo stuff in it years ago.
    Cheers... Rick
    That's groovy and all, but how can I use that to simplify my linked FM project? That is, the shell has content. When I link my FM content, it resides along with the unchanged shell content. How do I use this shell content with my imported content to make a better project more quickly?
    Cheers,
    Sean

    So, when I link, RHStyleMapping.css does not pick up the FM styles I use and I don't get to set them up (such as setting my lists to Multilevel) en avance. And, I cannot make some basic changes, for example, such as excluding styles from the output.
    [Edit] I can, as a separate step, manipulate Project Settings, but it seems you have to do this before the first time you generate, or you are sol. And, after I generate, only 4 of 40 FM styles are represented in RHStyleMapping.css and none are in default.css[/]
    Not cool.

  • Applescript MySQL interface (No... not using the shell command)

    I'm a windows guy, so please be gentle if I sound noobish.
    I'm trying to automate an export of the System Profiler info to a MySQL database directly, and I was hoping to get applescript to parse the info from the XML and push it into MySQL.
    Now I know that Applescript can manipulate MySQL by using shell commands for the MySQL command line client, but I was hoping that someone knew of a native applescript interface.

    There's MacSQL http://www.macupdate.com/info.php/id/21293 that will give an alternative route into MySQL. I don't know whether it's any better than using shell scripts.

  • How To Use The Voice Command in Nokia 6300

    Dear all
    the voice command which saved on the Nokia 6300 is a computrized only i can't change it with my voice which return this option is useless to me so is there any other way to use this service using my real voice

    No, on newer Nokia phone you can no longer recorded your own voice tags.
    If you are having difficulty with the phone understanding your voice command please try to change the voice playback setting on the phone. Do the following :
    Menu -> Settings -> Phone -> Language settings -> Voice playback language
    Then select a language that the phone should use for playing back voice commands, you might want to select a language that closely resembles your accent and language.
    Knowledge should be your Advisor when you need help.
    1610»2110»8110»5110»3310»6210»7250i»6220»6230»6230i»6233
    Love me or hate me, its still an obsession. Love me or hate me, that is the question. If you love me then Thank you! If you hate me then ...

  • How to:  using the Place command in an action and remembering the source filename...

    I have a large set of product, architecture, and other subject-specific photos, that I’m preparing for a new website; all to be placed in various galleries.
    For each photo, I want it to have the same background.  If I were doing this manually, I would simply “place” the subject photo into the background, and save it – back to the original photo name.
    In other words, doing this manually, PRODUCT_001.TIF gets placed into STANDARD_BKGRND.TIF, (thereby automatically correctly sizing and centering it), and then saving the result back to PRODUCT_001.TIF; either overwriting the original, or into a new folder.   (I have the original file somewhere else, and am working with an intermediate copy).
    But since I have several hundred photos, how do I create an action (and really – a droplet) that will save the resulting file to the desired name?  Typically placing photo ‘PRODUCT_001’ into photo ‘B’, alters photo ‘STANDARD_BKGRND’, so I can’t save the result back to ‘PRODUCT_001’.  Said differently, in a droplet, each time it's run saves the result back to the same filename 'STANDARD_BKGRND'.
    The end result – I want to apply that droplet to all the PRODUCT_***.TIF files in a given folder, and end up with the same file names as before.
    Thanks in advance for your help!
    Jerry
    PS - I have no scripting experience in PS, but have written code in other applications/scenarios. 

    Actions don't have access to the document name (where the file name is).  Scripts do, however.
    If your products are sequentially numbered, you're in luck.  You can overide the "Save as command" and make sure that your naming uses a sequence which you can set to the same starting number as your product. Here is an example of how to configure File -> Automate -> Batch (assume the set and action are your hand built one)
    Instead of "Document name" you'd type "PRODUCT_" per your example and choose a 3 digit Serial number.
    The "Starting Serial #" is where you can change if your products are numbered say, 101 and up.

  • How to:  using the Place command in an action and remember the correct source filename...

    I have a large set of product, architecture, and other subject-specific photos, that I’m preparing for a new website; all to be placed in various galleries.
    For each photo, I want it to have the same background.  If I were doing this manually, I would simply “place” the subject photo into the background, and save it – back to the original photo name.
    In other words, doing this manually, PRODUCT_001.TIF gets placed into STANDARD_BKGRND.TIF, (thereby automatically correctly sizing and centering it), and then saving the result back to PRODUCT_001.TIF; either overwriting the original, or into a new folder.   (I have the original file somewhere else, and am working with an intermediate copy).
    But since I have several hundred photos, how do I create an action (and really – a droplet) that will save the resulting file to the desired name?  Typically placing photo ‘PRODUCT_001’ into photo ‘B’, alters photo ‘STANDARD_BKGRND’, so I can’t save the result back to ‘PRODUCT_001’.  Said differently, in a droplet, each time it's run saves the result back to the same filename 'STANDARD_BKGRND'.
    The end result – I want to apply that droplet to all the PRODUCT_***.TIF files in a given folder, and end up with the same file names as before.
    Thanks in advance for your help!
    Jerry
    PS - I have no scripting experience in PS, but have written code in other applications/scenarios.

    Its great that your products are cutouts layers,  Its easy to put cutouts on backgrounds and even add layer style to the product layer to enhance the composite. Still cutouts have size and resolution as  do your background images. 
    When you make composites. A document that is place in or pasted into the current document will be resample to match the current documents DPI resolution to preserve the size of the document being place or pasted in size.
    Additionally if your using place if the document being placed in does not fit within the current document's canvas size. Photoshop may scale the image to fit within the canvas.  It depends on your user id Photoshop Preference setting.
    That means you need you handle the sizes involved.
    I would think that you would want the final composite to be the size of the background image.
    You need to know its size and dpi resolution.  You must use image size on your product image and make the image have the same dpi resolution and a size smaller then the background image.  Perhas they have the same dip resolution as the background and are smaller in size. If that the cast their size are good no image resize  is required,
    Then you need to use canvas size to make the document have the same size and resolution as the background image.
    You may want to center the product layer over the canvas however Canvas size will add canvas evenly around the produt layer's layer bounds when you leave the anchor point in the center. 
    When you then place in the background image it will not be resampled for it has the same dpi resolution as the current document and it will not be scaled for it is an exact canvas size fit.  All that remains to be done is  move the current placed layer below the  product layer 
    The document name is the product image file name opened by you or by Photoshop automate batch process.

  • How to execute a shell command in java?

    here, my environment is redhat 7, jdk 1.5.
    i don't know how to use the shell command in java.
    i want to use this function:
    #include <stdlib.h>
    int system(const char * string);
    please give me some ideas. and Thank you so much if coming with a little demo.

    i know i should use JNI. because i have to use C lib.
    but i have already use JNI to wrapper the original code the cpp code and java code is :
    //: appendixb:UseObjImpl.cpp
    //# Tested with VC++ & BC++. Include path must
    //# be adjusted to find the JNI headers. See
    //# the makefile for this chapter (in the
    //# downloadable source code) for an example.
    #include <jni.h>
    #include <stdlib.h>
    extern "C" JNIEXPORT void JNICALL
    Java_UseObjects_changeObject(
    JNIEnv* env, jobject, jobject obj) {
    jclass cls = env->GetObjectClass(obj);
    jfieldID fid = env->GetFieldID(
    cls, "aValue", "I");
    jmethodID mid = env->GetMethodID(
    cls, "divByTwo", "()V");
    int value = env->GetIntField(obj, fid);
    printf("Native: %d\n", value);
    env->SetIntField(obj, fid, 6);
    env->CallVoidMethod(obj, mid);
    value = env->GetIntField(obj, fid);
    system("preprocess -path sha.c");
    printf("Native: %d\n", value);
    } ///:~
    //: appendixb:UseObjects.java
    // From 'Thinking in Java, 2nd ed.' by Bruce Eckel
    // www.BruceEckel.com. See copyright notice in CopyRight.txt.
    class MyJavaClass {
    public int aValue;
    public void divByTwo() { aValue /= 2; }
    public class UseObjects {
    private native void
    changeObject(MyJavaClass obj);
    static {
    // System.loadLibrary("UseObjImpl");
    // Linux hack, if you can't get your library
    // path set in your environment:
    System.load(
    "/root/jproj/UseObjImpl.so");
    public static void main(String[] args) {
    UseObjects app = new UseObjects();
    MyJavaClass anObj = new MyJavaClass();
    anObj.aValue = 2;
    app.changeObject(anObj);
    System.out.println("Java: " + anObj.aValue);
    } ///:~
    i modify this two file which is from TIJ-2edition.
    the output is
    Native: 2
    Native: 3
    Java: 3
    but what i want to be executed "preprocess -path sha.c" does not work.
    i have change the command to, such as "df", "ls" etc. but none of them works
    please help me.

  • Version XI Cannot Find File USING VBA Shell Command

    I open Adobe Reader from an Access VBA Shell command.  After upgrading to Version 11, the Reader opens but I get the Error Message.  "Cannot Find File".
    This was on a Windows 7 Machine running MS Access 2012.  I had an older PX with XP and Access 2003 on it, so I ran the program on it with Version 10 and the Reader opened with the
    file passed to it using the Shell command.  I updated Adobe Reader to XI on the XP machine and I got the "Cannot Find File" message.  I went back to the Widows 7 machine anbd removed Version 11 and reinstalled Version 10 and the Shell command worked like it did before.  Does anyone know if there is a work a round for the Version 11 error as I have many many customers that may update to Version 11 and my program is not going to work for this particular function.
    Appreciate any help, thanks.

    Q1 Answer
    I use Shell because it has worked for years and it is a build in VBA function and ShellExecute uses Windows API, and I took the easy route.
    As I'm sure you know Shell is for exe, com or bat files and ShellExecute enables
    the opening of files such as txt, pdf... etc by file association.
    Q2 Answer
    The exact string is
    "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe" C:\FoxFales Data\FoxFalesStaff\Alerts\GenericSupplies.pdf
    The path for AcroRd32.exe is retreived by reading the registry entry  "HKEY_CLASSES_ROOT\Software\Adobe\Acrobat\Exe\"
    Q3 Answer
    If you paste the above command in the CMD shell you get the same result.  Reader Opens, but opens with
    the message  "Cannot Find File".
    Newest Results
    In the forum I found threads that indicated that if in Security (Enhanced) you had "Enable Protected Mode At Startup"
    enabled there were some unpleasant results.
    So I turned it off and lo and behold Reader XI with the Shell commandfrom VBA works!
    But as a matter of interest I turned it back on and tried the API call ShellExecute, as you so politely suggested,
    and...IT WORKED with "Enable Protected mode At Startup" enabled.
    I don't understand why Reader XI lets ShellExecute work and not Shell, but I'm happy I  have a solution
    Thanks for you help

  • How to use the DISPLAY RECORD Setup Command in an etext file?

    Hi All,
    How to use the DISPLAY RECORD Setup Command in an etext file?
    I want to display a <NEW RECORD> conditionally. The condition will be based on the data coming through from the xml file.
    Please help me with an example. The BI User guide also doesnt show any examples.
    Your help is appreciated.
    Rgds,
    Kiran Panditi

    Hi,
    You can use vb coding in BEx Analyser to calculate your unit price. For this you have to first display the attributes of your object "XYZ". Then you can use VB cosing to calculate the value for the unit price field.
    One more thing cna you clarify whether is it display attribute or variable ?
    Regards,
    Balajee

  • How do I turn off the alt scroll zoom?  When I'm in Adobe photoshop and illustrator using the pen tool, alt is utilized for another short cut.  I would like to use the alt command for the pen tool instead of zooming into the screen.

    How do I turn off the alt scroll zoom? 
    When I'm in Adobe photoshop and illustrator using the pen tool, alt is utilized for another short cut.  I would like to use the alt command for the pen tool instead of zooming into the screen.

    I tend to select things from left to right and every time I am moving in a downward right diagonal motion during lasso selection I am missing a clear view and I am tending to have a more sloppy selection.  All this does is slow me down since I need to go back and hit those areas again.  The big arrowhead just get's in the way.  The original lasso tool with the thin line and small active point at it's lower left was far better for me.
    I don't like turning the cursors to precise because I like to see the active tool icon where my cursor is and as the icon changes as I hold modifier keys down.  If I am forced to get comfortable with using pricise cursors I guess I will, but man, I've never had to do this in my 15 years of photoshop use...
    I would absolutely LOVE to find a way to get the old lasso icon -- without the arrowhead above it.
    Is there any chance this option could be inlcuded in cursor preferences?  I'd give much thanks, Adobe.

  • I am using Photoshop CC2014 15.00.  In the pop-up menu for the Fill command there is a place for Scripted patterns.  Within that part, the tree and the picture frame are grayed. Why?   I've seen demonstrations on how to use the feature but mine doesn't wo

    I am using Photoshop CC2014 15.00.  In the pop-up menu for the Fill command there is a place for Scripted patterns.  Within that part, the tree and the picture frame are grayed.
    Why?   I've seen demonstrations on how to use the feature but mine doesn't work.  I checked the updates and I have the current version.
    Thanks.      LM

    I am running CC 2014.2.1 and I've updated to Yosemite. Not seeing tree or frame as an option in the menu. Coworker still on Mavericks has it.

  • How do I use the 'mv' command??

    I want to move some scripts file into my /User/Local/Bin/
    folder but i cant i get
    usage: mv [-f | -i | -n] [-v] source target
           mv [-f | -i | -n] [-v] source ... directory
    and i dont know what else to do because i really need to move the files.
    So far this is the way im doing it
    sudo mv encode-handheld-5.2.pl /User/Local/Bin/
    And when I do that I get this message...
    mv: rename encode-handheld-5.2.pl to /User/Local/Bin/: No such file or directory
    How do I use the mv command or how am i supposed to mv those files.??
    Help Please!

    You are still not providing the path to the file you're moving.  Did you read my earlier response?  Are you sure this file is in the current working directory?  Try the "ls" command (that's lowercase "LS").  Do you see that file?  If not, follow my earlier directions.
    As to whether the /usr/local/bin directory exists, it should, but you can check with:
    ls -al /usr/local/bin
    If you get an error, the directory does not exist for some reason, which means your system is in an uncertain state.
    BTW, meaning no offense, if you don't know all this stuff, you should be very, very cautious when using the Terminal.  It is a very dangerous place to those who don't have some idea what they're doing.  You can irreparably damage your system (requiring a reinstall) and even destroy your data with very minor typos.

  • How to use the "-R" option in the command zoneadm?

    Please explain in detail, thanks!

    The "-R" option is there to allow to manipulate zones in an alternate Boot Environment (BE). The parameter that you should use is the mount point of the alternate BE.
    Mount the alternate BE in a separate directory with beadm command and then you can use the zoneadm command with this option.

Maybe you are looking for

  • ITunes shows the music and audiobooks I've loaded to my iPod Touch, but they do not show up when I try to play them.

    iTunes shows the music and audiobooks I've loaded to my iPod Touch, but they do not show up when I try to play them.  I reconnect to iTunes and it shows the music and books as being loaded on my iPod. Sometimes the audiobook will play, then disappear

  • Made an error moving iTunes Music and need to create a folder ...

    In August when I had to re-install iTunes, motherboard melt down, I thought I'd transferred iTunes Music back to the F drive, where I keep my media library, correctly. All downloads installed there and when I clicked Add Folder from my backup drive i

  • White screen of... :O

    When i boot my Mac it stays on the white screen then proceeds to a black screen stating theres no bootable device. To get around this i have to press the option button to load up the right part of the hard drive. (Forgot to mention this is because me

  • IBM VIOS with Oracle RAC

    Hi everybody, I have a case of RAC implementation but they are planning to use VIOS (IBM Virtual I/O Server) for OCR, Voting and ASM. Questions: 1) Metalink says VIOS is supported for RAC: http://www.oracle.com/technology/products/database/clustering

  • EA1: Diff Wizard Issues

    The schema difference tool now seems to work reliably, but I find it very limited. The main limitations are 1 it is 'one-way'. It doesn't show you objects in the target schema which aren't in the source schema. I think this is by design - the aim see