Re: long filename issue in Win9x

From: Phaedrus (phaedrus-securityfocus_at_lycanon.org)
Date: 07/18/01


"R v. Dijk" <rd.engind_at_preciamolen.nl> wrote:

RvD> try this :

RvD> make a 'PROGRAM.EXE' executable in your C:\, and reboot windows. 99% chance
RvD> it will start up something like this
RvD> "C:\PROGRAM files\Internet Explorer\blah blah /systray"

RvD> Now PROGRAM will be invoked, with then rest as a parameter list. This caused
RvD> me a headache, because I didn't know where to start

Better yet, create a batch file containing the following four lines,
and save it as "C:\Program.bat":

@echo Incorrect program launch detected!
@echo Incorrect command line:
@echo C:\Program %1 %2 %3 %4 %5 %6 %7 %8 %9
@pause

If this batch file gets launched on your system at startup time, it's
because of an installer bug in a program installed on the system. On
a Win98/WinME system, you should be able to use msconfig's Startup tab
to find and disable the offending program.

The cause of this bug: As Windows users are probably aware, there are
several mechanisms that can be used to launch a program at startup:
most notably, the Startup program group, a 'run=' directive in the
WIN.INI file, and the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run and
RunOnce keys in the registry. With any of these mechanisms, if the
pathname of the program being run contains any spaces, the full
pathname must be in quotes. To be on the safe side, many installers
always put the pathname in quotes; this is fine too. For example,
this would correctly launch the fictitious FooNet in /monitor mode at
startup time:

"C:\Program Files\FooNet\FooNet.exe" /monitor

If the installer program forgets to include the quotes, like this:

C:\Program Files\FooNet\FooNet.exe /monitor

then Windows will see the space in "Program Files" as a command line
delimiter; it will try to launch "C:\Program", and tell it to open
"Files\FooNet\Foonet.exe /monitor". In the extremely likely event
that you don't have anything named "C:\Program" on your system, you'll
get a rather puzzling "Can't run C:\Program.exe" error dialog from
Windows. If you install the "C:\Program.bat" batch file mentioned
earlier, you'll instead see:

Incorrect program launch detected!
Invalid command line:
C:\Program Files\FooNet\Foonet.exe /monitor
Press any key to continue...

Now, if you're a technically savvy user, you can use msconfig to
figure out exactly where this incorrect command line is being stored
(in the Startup group, the registry or WIN.INI), and use the
appropriate tool to fix the problem. If you're not quite this
technically savvy, you can simply uninstall FooNet and mercilessly
harass its manufacturer for a bug fix.



Relevant Pages

  • Re: getting rid of something at startup
    ... Once you've extracted the files from the zip file, launch ... In Autoruns, ... I am running a Thinkpad R40, Windows XP, SP2, ... This file is listed under the startup tab of msconfig. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Installing Two Operating Systems 4 Speed
    ... No doubt an XClent advice but how 2 create a batch file to launch only ... MS-Office on startup and refraining other? ... "only and only" load Windows and MS-Office? ...
    (microsoft.public.windowsxp.general)
  • Re: Startup in the Pocket PC
    ... Windows Embedded MVP ... "Mohammad" wrote in message ... > How can I customize the startup in the pocket pc like the normal Windows. ... > mean to launch a certain application on startup? ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Documents and SettingsMyUsername window on startup
    ... This is usually caused by incorrectly formatted startup entry. ... Download Startup Tracker application from this page: ... Launch the program, and click the "View log" button. ... Microsoft MVP [Windows XP Shell/User] ...
    (microsoft.public.windowsxp.general)