DVader Posted September 13, 2011 Posted September 13, 2011 Okay, we've run across something a bit odd. I have a Windows forms application, that when it starts, downloads and opens a file (with a .ini file extension) to retrieve some system settings. Private Sub SetupKioskInformation() Dim strKioskString As String = "" Dim strProperty() As String = Nothing Dim strObject As String = "" Dim strValue As String = "" Dim bolbtnWebpageOneSet As Boolean = False Dim bolbtnWebpageTwoSet As Boolean = False Try '-------------------------------------------------------- '- Determine if the Kiosk.ini file exists . . . '-------------------------------------------------------- If File.Exists(strApplicationPath & "kiosk.ini") = True Then '---------------------------------------------------- '- If it does open it in a StreamReader . . . '---------------------------------------------------- srStreamReader = New StreamReader(strApplicationPath & "kiosk.ini") Do While srStreamReader.Peek >= 0 '- Do some stuff . . . Loop Catch ex As Exception WriteToErrorReport(ex.Message, ex.StackTrace, "SetupInformationButtons") Finally If srStreamReader IsNot Nothing Then srStreamReader.Close() srStreamReader.Dispose() End If End Try End Sub And it also opens another file to write some log information to. This file has a .log extension. Private Function WriteLastTransferDate() As Boolean Dim bolWriteLastTransferDate As Boolean = True Try swStreamWriter = New StreamWriter(strApplicationPath & strLastTransferDateFileName, False) swStreamWriter.WriteLine(Now.ToShortDateString) Catch ex As Exception bolWriteLastTransferDate = False WriteToErrorReport(ex.Message, ex.StackTrace, "WriteLastTransferDate") Finally If swStreamWriter IsNot Nothing Then swStreamWriter.Close() swStreamWriter.Dispose() End If End Try Return bolWriteLastTransferDate End Function This application is running on Windows 7 32-bit version. On two of the three machines it is installed on everything works fine. But on the third machine, for some reason, when we minimize or close the application we see each of the above mentioned files open in Notepad. The question I have is why should Notepad be opening for either of those files since I'm not using Notepad? Quote
Administrators PlausiblyDamp Posted September 13, 2011 Administrators Posted September 13, 2011 Is there any different software installed on this third machine? What happens if you you use another application to create a file with the same name as one of the above files? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
DVader Posted September 14, 2011 Author Posted September 14, 2011 No, as far as I know, they should be identical machines. Quote
Administrators PlausiblyDamp Posted September 15, 2011 Administrators Posted September 15, 2011 I can't see any reason from the code posted why this should happen, if you step through the code can you spot which line is executed before notepad opens? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.