16 bit MS-DOS Subsystem error

80 views
Skip to first unread message

Oriol Ventosa

unread,
Dec 15, 2014, 4:30:13 AM12/15/14
to nappu...@googlegroups.com
Hello,

I'm trying to use NAppUpdate to automatically update a WinForms application. The program correctly checks the version but when it is trying to update the files (executing foo.exe), I get a "16 bit MS-DOS Subsystem" error.

I've never seen this error before and I have not found useful information on internet. Could anybody give me some clues to solve it?

I'm working on a 64-bit windows 7. My program uses .NET Framework 4. 

Thanks in advance,

Oriol

Itamar Syn-Hershko

unread,
Dec 15, 2014, 7:52:32 AM12/15/14
to nappu...@googlegroups.com
Did you compile from sources? if so, can you check that updater.exe is not a 0-length file?

--

Itamar Syn-Hershko
http://code972.com | @synhershko
Freelance Developer & Consultant

--
You received this message because you are subscribed to the Google Groups "NAppUpdate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nappupdate+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oriol Ventosa

unread,
Dec 15, 2014, 10:48:50 AM12/15/14
to nappu...@googlegroups.com
Yes, I did compile from sources. foo.exe size is only 1 byte. 
I downloaded the sources from https://github.com/synhershko/NAppUpdate, opened NAppUpdate_Flat.sln with Visual Studio Ultimate 2013, built NAppUpdate.Framework project (release), referenced NAppUpdate.Framework.dll from my project and wrote a new function to check for updates.

What am I doing wrong?

The function I added to my code is the following:

public static void CheckForUpdatesCustom()
        {
            UpdateManager.Instance.UpdateSource = new NAppUpdate.Framework.Sources.SimpleWebSource("https://myPage.......com/myFeed.xml"); // provided is the URL for the updates feed
            UpdateManager.Instance.ReinstateIfRestarted(); // required to be able to restore state after app restart

            UpdateManager.Instance.CheckForUpdates();
            if (UpdateManager.Instance.UpdatesAvailable == 0)
            {
                MessageBox.Show("Your software is up to date");
            }
            else
            {
                DialogResult dr = MessageBox.Show(
                    string.Format("Updates are available to your software ({0} total). Do you want to download and prepare them now? You can always do this at a later time.",
                    UpdateManager.Instance.UpdatesAvailable),
                    "Software updates available",
                     MessageBoxButtons.YesNo);

                if (dr == DialogResult.Yes)
                {
                    UpdateManager.Instance.PrepareUpdates();
                    UpdateManager.Instance.ApplyUpdates(true, true, true);
                }
            }
        }

Thanks for your quick response Itamar.

Itamar Syn-Hershko

unread,
Dec 15, 2014, 11:04:49 AM12/15/14
to nappu...@googlegroups.com
There's some circular reference there. You need to compile the Updater project, then compile the NAppUpdate project - it will pack updater.exe into the NAU.dll

--

Itamar Syn-Hershko
http://code972.com | @synhershko
Freelance Developer & Consultant

Oriol Ventosa

unread,
Dec 15, 2014, 12:48:06 PM12/15/14
to nappu...@googlegroups.com
It worked like a charm! I feel a bit stupid right now. 
Congratulations for your great work and thanks for your effort answering our questions. 

Itamar Syn-Hershko

unread,
Dec 15, 2014, 12:51:57 PM12/15/14
to nappu...@googlegroups.com
You're welcome

--

Itamar Syn-Hershko
http://code972.com | @synhershko
Freelance Developer & Consultant

Reply all
Reply to author
Forward
0 new messages