Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser process boost & Admin requirement lift #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions EUD Editor/Module/ProgramData.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1102,24 +1102,29 @@ Module ProgramData
Private Function ReadDEF(BaseDEFtext As String, Key As String)
Try
Dim temptext2 As String
Dim temptext As String = Mid(BaseDEFtext, InStr(BaseDEFtext, vbCrLf & Key))

temptext = Mid(temptext, InStr(temptext, "="))
'Mid(base, InStr(base, Key), 4)
If InStr(temptext, vbCrLf) = 0 Then
temptext2 = Mid(temptext, 2).Trim
If InStr(temptext2, ":") = 0 Then
Return temptext2
Dim start As Integer = InStr(BaseDEFtext, vbCrLf & Key)
If start > 0 Then
Dim temptext As String = Mid(BaseDEFtext, start)

temptext = Mid(temptext, InStr(temptext, "="))
'Mid(base, InStr(base, Key), 4)
If InStr(temptext, vbCrLf) = 0 Then
temptext2 = Mid(temptext, 2).Trim
If InStr(temptext2, ":") = 0 Then
Return temptext2
Else
Return Mid(temptext2, 1, InStr(temptext2, ":"))
End If
Else
Return Mid(temptext2, 1, InStr(temptext2, ":"))
temptext2 = Mid(temptext, 2, InStr(temptext, vbCrLf) - 1).Trim
If InStr(temptext2, ":") = 0 Then
Return temptext2
Else
Return Mid(temptext2, 1, InStr(temptext2, ":"))
End If
End If
Else
temptext2 = Mid(temptext, 2, InStr(temptext, vbCrLf) - 1).Trim
If InStr(temptext2, ":") = 0 Then
Return temptext2
Else
Return Mid(temptext2, 1, InStr(temptext2, ":"))
End If
Return "false"
End If
Catch ex As Exception
Return "false"
Expand Down
34 changes: 20 additions & 14 deletions EUD Editor/Module/initModule.vb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Imports System.IO
Imports Microsoft.Win32

Module initModule
Public DirectoryPath As String
Expand Down Expand Up @@ -182,8 +183,8 @@ Module initModule


If My.User.IsInRole("administrators") = False Then
MsgBox(Lan.GetMsgText("notAdmin"), MsgBoxStyle.Critical, ProgramSet.ErrorFormMessage)
End
' MsgBox(Lan.GetMsgText("notAdmin"), MsgBoxStyle.Critical, ProgramSet.ErrorFormMessage)
'End
End If


Expand Down Expand Up @@ -228,35 +229,40 @@ Module initModule

'

My.Computer.Registry.ClassesRoot.CreateSubKey(".e2s").SetValue("",
Dim classes As RegistryKey = My.Computer.Registry.CurrentUser.OpenSubKey("Software\Classes", RegistryKeyPermissionCheck.ReadWriteSubTree)




classes.CreateSubKey(".e2s").SetValue("",
"e2s", Microsoft.Win32.RegistryValueKind.String)
My.Computer.Registry.ClassesRoot.CreateSubKey("e2s\shell\open\command").SetValue("",
classes.CreateSubKey("e2s\shell\open\command").SetValue("",
Application.ExecutablePath & " ""%l"" ", Microsoft.Win32.RegistryValueKind.String)
My.Computer.Registry.ClassesRoot.CreateSubKey("e2s\DefaultIcon").SetValue("",
classes.CreateSubKey("e2s\DefaultIcon").SetValue("",
My.Application.Info.DirectoryPath & "\Data\icons\e2s.ico" & ",0", Microsoft.Win32.RegistryValueKind.String)


My.Computer.Registry.ClassesRoot.CreateSubKey(".ees").SetValue("",
classes.CreateSubKey(".ees").SetValue("",
"ees", Microsoft.Win32.RegistryValueKind.String)
My.Computer.Registry.ClassesRoot.CreateSubKey("ees\shell\open\command").SetValue("",
classes.CreateSubKey("ees\shell\open\command").SetValue("",
Application.ExecutablePath & " ""%l"" ", Microsoft.Win32.RegistryValueKind.String)
My.Computer.Registry.ClassesRoot.CreateSubKey("ees\DefaultIcon").SetValue("",
classes.CreateSubKey("ees\DefaultIcon").SetValue("",
My.Application.Info.DirectoryPath & "\Data\icons\ees.ico" & ",0", Microsoft.Win32.RegistryValueKind.String)


My.Computer.Registry.ClassesRoot.CreateSubKey(".mem").SetValue("",
classes.CreateSubKey(".mem").SetValue("",
"mem", Microsoft.Win32.RegistryValueKind.String)
My.Computer.Registry.ClassesRoot.CreateSubKey("mem\shell\open\command").SetValue("",
classes.CreateSubKey("mem\shell\open\command").SetValue("",
Application.ExecutablePath & " ""%l"" ", Microsoft.Win32.RegistryValueKind.String)
My.Computer.Registry.ClassesRoot.CreateSubKey("mem\DefaultIcon").SetValue("",
classes.CreateSubKey("mem\DefaultIcon").SetValue("",
My.Application.Info.DirectoryPath & "\Data\icons\mem.ico" & ",0", Microsoft.Win32.RegistryValueKind.String)


My.Computer.Registry.ClassesRoot.CreateSubKey(".e2p").SetValue("",
classes.CreateSubKey(".e2p").SetValue("",
"e2p", Microsoft.Win32.RegistryValueKind.String)
My.Computer.Registry.ClassesRoot.CreateSubKey("e2p\shell\open\command").SetValue("",
classes.CreateSubKey("e2p\shell\open\command").SetValue("",
Application.ExecutablePath & " ""%l"" ", Microsoft.Win32.RegistryValueKind.String)
My.Computer.Registry.ClassesRoot.CreateSubKey("e2p\DefaultIcon").SetValue("",
classes.CreateSubKey("e2p\DefaultIcon").SetValue("",
My.Application.Info.DirectoryPath & "\Data\icons\e2p.ico" & ",0", Microsoft.Win32.RegistryValueKind.String)

'TextEditor.ShowDialog()
Expand Down
21 changes: 14 additions & 7 deletions EUD Editor/Module/parsingModule.vb
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,21 @@ Module parsingModule

Public Function FindSetting(base As String, key As String, Optional strflag As Boolean = False) As String
Try
Dim text As String = Mid(base, InStr(base, key & " "))
'If key = "extraedssetting" Then
' MsgBox(InStr(text, vbCrLf) - key.Count - 4)
'End If
If InStr(text, vbCrLf) = 0 Then
Return Mid(text, key.Count + 4)
Dim start As Integer = InStr(base, key & " ")
If start > 0 Then
Dim text As String = Mid(base, start)
'If key = "extraedssetting" Then
' MsgBox(InStr(text, vbCrLf) - key.Count - 4)
'End If
If InStr(text, vbCrLf) = 0 Then
Return Mid(text, key.Count + 4)
Else
Return Mid(text, key.Count + 4, InStr(text, vbCrLf) - key.Count - 4)
End If
ElseIf strflag Then
Return ""
Else
Return Mid(text, key.Count + 4, InStr(text, vbCrLf) - key.Count - 4)
Return "0"
End If

Catch ex As Exception
Expand Down
18 changes: 9 additions & 9 deletions EUD Editor/My Project/Application.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion EUD Editor/My Project/Application.myapp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<AuthenticationMode>1</AuthenticationMode>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>
2 changes: 1 addition & 1 deletion EUD Editor/My Project/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
이전 버전과의 호환성을 위해 응용 프로그램에 가상화가 필요한 경우
이 요소를 제거합니다.
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
Expand Down