G
Guest
Hi,
I'm making some minor changes to a VB 6 app that I converted to VB .NET a
couple of years ago and I'm running into an issue with a function that is
seemingly returning a different result in the debugger than when I run the
exe.
The code in question is this;
iniFileName =
Replace(System.Reflection.Assembly.GetExecutingAssembly.Location, ".exe", "")
& ".ini"
This is how I had the code originally and when I run it in the debugger, I
have no problems but when I run the EXE, I get the message
c:\bin\vtexvip.exe.ini not found but it seems to be in XP Pro SP2 only. If I
run it under W2K (Where the app will be run),I have no problems. In the
debugger, the variable inifilename shows the correct value of
c:\bin\vtexvip.ini. This is driving me cookoo.
I decided to change the above code to the following;
iniFileName =
Replace(System.Reflection.Assembly.GetExecutingAssembly.Location, ".exe",
".ini")
but this doesn't work at all. Although once again, in the debugger, the
variable inifilename shows the correct value of c:\bin\vtexvip.ini.
This is just a small app and is running on W2K where the problem does not
seem to exist but eventually, I may need to run it on XP and would like to
address this issue now rather that later so if anyone has any suggestions, it
would be really appreciated.
Thanks a bunch.
I'm making some minor changes to a VB 6 app that I converted to VB .NET a
couple of years ago and I'm running into an issue with a function that is
seemingly returning a different result in the debugger than when I run the
exe.
The code in question is this;
iniFileName =
Replace(System.Reflection.Assembly.GetExecutingAssembly.Location, ".exe", "")
& ".ini"
This is how I had the code originally and when I run it in the debugger, I
have no problems but when I run the EXE, I get the message
c:\bin\vtexvip.exe.ini not found but it seems to be in XP Pro SP2 only. If I
run it under W2K (Where the app will be run),I have no problems. In the
debugger, the variable inifilename shows the correct value of
c:\bin\vtexvip.ini. This is driving me cookoo.
I decided to change the above code to the following;
iniFileName =
Replace(System.Reflection.Assembly.GetExecutingAssembly.Location, ".exe",
".ini")
but this doesn't work at all. Although once again, in the debugger, the
variable inifilename shows the correct value of c:\bin\vtexvip.ini.
This is just a small app and is running on W2K where the problem does not
seem to exist but eventually, I may need to run it on XP and would like to
address this issue now rather that later so if anyone has any suggestions, it
would be really appreciated.
Thanks a bunch.