Ask Leo! by Leo A. Notenboom

What's "Invalid startup directory, please check your pif file"?

Search First! Then browse: Categories | Full Archive | By Date | Newsletter

Home » Windows

Anytime I try to start up QBasic 4.5 on Windows XP, I get an error stating "Invalid startup directory, please check your pif file. Choose 'Close' to terminate the application." I know that this is a 16bit MS-DOS Subsystem, but this is the only program I am having trouble with. I recently upgraded to WinXP Pro, and needless to say, I was quite surprised when I couldn't write my programs anymore.

Boy... now there's a blast from the past. QBasic has a long history dating back to the days of MS-DOS. QBasic was the free Basic programming language interpreter that was included with MS-DOS, and eventually Windows, though it appears to have vanished from Windows XP, if not from earlier versions.

I feel a personal connection to QBasic. Why? I worked on it!

First, your question: ".PIF" files were the way that older versions of Windows kept track of the settings for some applications. Each application, say QBasic.exe, would have a corresponding PIF file, such as QBasic.pif.

"QBasic was the free Basic programming language interpreter that was included with MS-DOS"

In Windows XP, I believe it's safe to simply remove the QBasic.pif file. Try renaming it first, and seeing if that resolves your problem. You can also try right-clicking on the PIF file in Windows Explorer, selecting Properties, and changing the startup directory, that your error message is complaining about.

I dug up an old copy of QBasic and fired it up, without a .PIF file, on my Windows XP system:

QBasic

Like I said it brings back memories. While at Microsoft I worked on the on-line help technology used in QBasic's predecessor, QuickBasic, several other products, and in QBasic. Need proof? In a command shell, Type the on-line help file qbasic.hlp. The first two bytes are the "signature" that define what kind of a file this is. The signature for character mode help files? My initials: LN.

Related:

Article C2480 - December 5, 2005

Helpful? Get new articles weekly by email in my FREE newsletter!

Your Name:
Your Email:


Why Subscribe?

Recent Comments
13 Comments

I, too, used Wordstar. :-)

Yes, the article applies. I'll bet you have a .pif file in the same directory as the Wordstar .exe file. Delete that and I'll bet you're good to go.

Posted by: Hans at July 8, 2006 5:41 PM

Free basic is a great resource for running/writing basic programs on XP systems. The FBIDE interface is also highly recommended. Better than the original Qbasic.

http://www.freebasic.net/index.php/download

Posted by: Mark at November 17, 2006 7:22 PM

When i start my computer, this appears C:WINDOWS\DEFAU I.PIF

and C:WINDOWS\o4243127.exe

What does this mean? Can you help? I use Windows XP.Thank you....

Posted by: honey at December 14, 2006 5:40 PM

Looks like a virus or spyware to me. I'd scan for both.

Posted by: Leo Notenboom at December 22, 2006 10:00 AM

When i go install battlefield 1942 it says 'Invalid program file name please check your pif file Choose 'Close' to terminate the application someone please help.

Posted by: Tristan at May 31, 2007 6:16 AM

When i start my computer, this appears C:WINDOWS\DEFAU I.PIF and after that this msg appeared "Invalid startup directory, please check your pif file. Choose 'Close' to terminate the application."...wuts going on actually with my computer?..and sometimes..my computer hang suddenly..someone please help me..T_T

Posted by: alique at August 2, 2007 12:32 AM

I am trying to get into my business folder and then "Invalid startup directory, please check your pif file. Choose 'Close' to terminate the application." Can you please tell me what to do? Thank you

Posted by: Kristijan at November 17, 2007 12:55 AM

when i try to open qbasic 4.5 it says to check my pif file how to I do that? also how to i change my startup directory?

Posted by: Bob at August 16, 2008 3:07 PM

Dear sir,
this is mohsin from dubai when i try to start my game prince2 then coming error ( invalid startup directory please check you pif fil. choose close to terminate the application. please help me thnks

Posted by: mohsin at November 22, 2008 2:46 AM

I deleted the pif files, it works so far. PIF files are the MS-DOS icons. When in doubt, search "*.pif," and delete corrisponding (speeled rong) .pif's from your QBasic directory.

Posted by: Adrian Henderson at May 30, 2009 7:23 PM

Post a comment on "What's "Invalid startup directory, please check your pif file"?":






(Email Address will not be published.)

Remember Me?

By popular demand...
my tip jar
Cuppa Joe
Buy Leo a Latte!

(you may use HTML tags for style)

RSS feed Subscribe to the RSS Feed specifically for comments on this article.

Before commenting, please...

  • Read the article at the top of this page. If your comment shows you didn't, it'll be deleted and ignored.

  • Comment only on this article. Use the Google search box at the top of the page if you have a question about something else.

  • Don't include personal information in the comment. No email addresses. No phone numbers. No physical addresses.

  • Don't spam. Excessive links to unrelated sites within a comment or across multiple comments will cause all such comments to be removed.

  • Don't ask me to recover lost passwords or hacked accounts. I can't, and those comments will be deleted.

  • I can't respond to every comment. And I can't vouch for the accuracy of others who do.

Please wait. Your comment is being processed ...


Question? Ask Leo!