|
-
Jan 14th, 2004, 10:54 AM
#1
Thread Starter
Frenzied Member
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.
-
Jan 14th, 2004, 11:09 AM
#2
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"""
-
Jan 15th, 2004, 09:35 AM
#3
Thread Starter
Frenzied Member
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:
ngen "c:\Program Files\Company Name, Inc\Folder Name\AppName.exe"
-
Jan 15th, 2004, 09:43 AM
#4
PowerPoster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|