Home All Groups Group Topic Archive Search About

error with exe programs

Author
19 Nov 2007 4:45 PM
andreas
I use vb.net express 2005 and when I run programs, made by myself, on
several computers I get somewhile (not on all computers) a error message.
Windows cannot access the specfied device, path, or file.....
How is this possible and can I made the program run on these computers?
Thanks for any response

Author
19 Nov 2007 4:50 PM
rowe_newsgroups
> I use vb.net express 2005 and when I run programs, made by myself, on
> several computers I get somewhile (not on all computers) a error message.
> Windows cannot access the specfied device, path, or file.....
> How is this possible and can I made the program run on these computers?

If the application is telling you it can't find something, odds are
that "something" doesn't exist on that computer. What exactly can it
not find? Are you trying to open a text file, save something to a
shared network drive, or something else?

Thanks,

Seth Rowe
Author
19 Nov 2007 6:58 PM
Herfried K. Wagner [MVP]
"andreas" <andr***@pandora.be> schrieb:
>I use vb.net express 2005 and when I run programs, made by myself, on
>several computers I get somewhile (not on all computers) a error message.
> Windows cannot access the specfied device, path, or file.....
> How is this possible and can I made the program run on these computers?

Which actions does your application perform?  Are you using classes and
methods from the 'System.IO' namespace?

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
20 Nov 2007 9:55 AM
andrews
yes, Herfried
I use system.io
Can this be the reason?


Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> schreef in bericht
news:%23ZTDp4tKIHA.5580@TK2MSFTNGP02.phx.gbl...
> "andreas" <andr***@pandora.be> schrieb:
>>I use vb.net express 2005 and when I run programs, made by myself, on
>>several computers I get somewhile (not on all computers) a error message.
>> Windows cannot access the specfied device, path, or file.....
>> How is this possible and can I made the program run on these computers?
>
> Which actions does your application perform?  Are you using classes and
> methods from the 'System.IO' namespace?
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
20 Nov 2007 12:49 PM
Herfried K. Wagner [MVP]
"andrews" <andr***@microsoft.com> schrieb:
> I use system.io
> Can this be the reason?

Yes, some of the methods will show dialogs.  Take a look at this sample,
which will disable the dialog that is shown if an attempt is made to access
the disk if the floppy drive is empty:

\\\
Private Declare Function SetErrorMode Lib "kernel32.dll" ( _
    ByVal uMode As Int32 _
) As Int32

Private Const SEM_FAILCRITICALERRORS As Int32 = &H1
..
..
..
Dim LastMode As Int32 = _
    SetErrorMode(SEM_FAILCRITICALERRORS)
Try
    Dim Directories() As DirectoryInfo = _
        (New DirectoryInfo("A:\")).GetDirectories()
Catch ex As Exception
    MsgBox(ex.Message)
Finally
    SetErrorMode(LastMode)
End Try
///


--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>