Results 1 to 4 of 4

Thread: ngen.exe Tip & question [Resolved]

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950

    ngen.exe Tip & question [Resolved]

    Found this on MSDN to include ngen in the deployment project.
    I tried running ngen on W98, but it had errors finding the folders in the path, c:\Program Files\Company Name, Inc\Folder Name\AppName.exe
    Although these names displayed correctly at the command line, i'd get a series of errors along the lines of "Can't find file Program", "Can't find file Company", etc. These names are longer than the 8.3 old filenames, and they have a space in them. Any experience with this? Thanks.
    Last edited by salvelinus; Jan 15th, 2004 at 09:35 AM.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    the usual method for getting around that problem is to put the file name in quotes, I've never used ngen but it should support it.

    eg:
    if you run it like this (dodgy example!):
    shell "ngen c:\Program Files\Company Name, Inc\Folder Name\AppName.exe"

    try like this:
    shell "ngen ""c:\Program Files\Company Name, Inc\Folder Name\AppName.exe"""

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    Thanks, putting the file name in quotes worked (at least, didn't raise any errors!). The odd thing was that it worked with quotes at both ends of the file name or just at the start.
    VB Code:
    1. ngen "c:\Program Files\Company Name, Inc\Folder Name\AppName.exe"

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    The reason the errors were happening is that the command line treats spaces as a new argument. So with this:

    ngen.exe My Documents\filex.txt

    ngen actuall gets two arguments:
    My
    Documents\filex.txt

    To solve this, you do this:
    ngen.exe "My Documents\filex.txt"

    Make sure you only quote around each argument, if you put quotes around the whole thing, then only one argument is sent in.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width