AkelPad RePlace Notepad

Just starting out? Need help? Post your questions and find answers here.
SharkyEXE
User
User
Posts: 35
Joined: Sat Feb 26, 2022 6:33 pm

AkelPad RePlace Notepad

Post by SharkyEXE »

Hello

1) I have make modifidied notepad.exe file

2) I deleted original notepad.exe file in directory

C:\Windows\notepad.exe
C:\Windows\System32\notepad.exe
C:\Windows\SysWOW64\notepad.exe

3) I copy modifidied notepad.exe file in directory

C:\Windows\notepad.exe
C:\Windows\System32\notepad.exe
C:\Windows\SysWOW64\notepad.exe

4) If i run modifidied file notepad.exe, start C:\Program Files\AkelPadPortable\AkelPad.exe

Please, how this make?

If write modifidied notepad.exe file on AutoIt language - work solution

0) Deleted original notepad.exe file in directory

C:\Windows\notepad.exe
C:\Windows\System32\notepad.exe
C:\Windows\SysWOW64\notepad.exe

1) Compile this au3 file

Code: Select all

#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Compression=0
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_OutFile=AkelPad_RePlace_Notepad.exe

#NoTrayIcon

ShellExecute ( "C:\Program Files\AkelPadPortable\AkelPad.exe", $CmdLineRaw )

Exit
2) Rename AkelPad_RePlace_Notepad.exe as Notepad.exe

3) Copy Notepad.exe file in directory

C:\Windows\notepad.exe
C:\Windows\System32\notepad.exe
C:\Windows\SysWOW64\notepad.exe

4) If run modifidied file notepad.exe, start C:\Program Files\AkelPadPortable\AkelPad.exe
Olli
Addict
Addict
Posts: 1267
Joined: Wed May 27, 2020 12:26 pm

Re: AkelPad RePlace Notepad

Post by Olli »

Don't copy akelpad.exe by renaming it : just change the shortcut system. If anybody clicks on a *.txt file, akelpad.exe is executed from its original path.
SharkyEXE
User
User
Posts: 35
Joined: Sat Feb 26, 2022 6:33 pm

Re: AkelPad RePlace Notepad

Post by SharkyEXE »

Olli wrote: Sun Oct 09, 2022 10:55 am Don't copy akelpad.exe by renaming it : just change the shortcut system. If anybody clicks on a *.txt file, akelpad.exe is executed from its original path.
Hello

No, No

I have hint - replace original file to mod file

In default i open txt file - txt files open on AkelPad (withOUT change in registry)
BarryG
Addict
Addict
Posts: 4220
Joined: Thu Apr 18, 2019 8:17 am

Re: AkelPad RePlace Notepad

Post by BarryG »

Doesn't Windows (the OS) just replace the Notepad.exe file for not being the original? As part of its security.
SharkyEXE
User
User
Posts: 35
Joined: Sat Feb 26, 2022 6:33 pm

Re: AkelPad RePlace Notepad

Post by SharkyEXE »

BarryG wrote: Sun Oct 09, 2022 11:37 am Doesn't Windows (the OS) just replace the Notepad.exe file for not being the original? As part of its security.
Hello

1) Excusme, my question - how write exe file on PureBasic, such as
"C:\Program Files\AkelPadPortable\AkelPad.exe", $CmdLineRaw
2) My broken-example code on PureBasic

Code: Select all

Filename$ = "C:\Program Files\AkelPadPortable\AkelPad.exe"
param$=ProgramParameter(0)
RunProgram(Filename$, param$, "", #PB_Program_Open|#PB_Program_Read)
Do not work
AZJIO
Addict
Addict
Posts: 2226
Joined: Sun May 14, 2017 1:48 am

Re: AkelPad RePlace Notepad

Post by AZJIO »

Code: Select all

Filename$ = "C:\Program Files\AkelPadPortable\AkelPad.exe"
Count = CountProgramParameters()
If Count
	param$=ProgramParameter(0)
	If FileSize(param$) > 0
		RunProgram(Filename$, param$, GetPathPart(param$))
	Else
		RunProgram(Filename$, param$, GetPathPart(Filename$))
	EndIf
Else
	RunProgram(Filename$)
EndIf
SharkyEXE
User
User
Posts: 35
Joined: Sat Feb 26, 2022 6:33 pm

Re: AkelPad RePlace Notepad

Post by SharkyEXE »

AZJIO wrote: Sun Oct 09, 2022 12:20 pm

Code: Select all

RunProgram(Filename$, param$, "")
Hello

1) I create 1.exe file on PureBasic 4.20 (Windows - x86)

Code: Select all

Filename$ = "C:\Program Files\AkelPadPortable\AkelPad.exe"
RunProgram(Filename$, param$, "")
2) I rename 1.exe in notepad.exe

3) I copy notepad.exe file in directory

C:\Windows\notepad.exe
C:\Windows\System32\notepad.exe
C:\Windows\SysWOW64\notepad.exe

4) I open cmd file - AkelPad started, but cmd file do not open - see gif animation

My operating system: Microsoft Windows 7 Service pack 1 Professional x64
dcr3
Enthusiast
Enthusiast
Posts: 188
Joined: Fri Aug 04, 2017 11:03 pm

Re: AkelPad RePlace Notepad

Post by dcr3 »

If I understood your question.:?:

You want to replace Notepad with AkelPad.

Here one of several links.You can search on the internet [ Replace Notepad with ].

Replace Notepad with notepad++. Just change notepad++ with AkelPad.
https://www.howtogeek.com/howto/12617/h ... windows-7/
SharkyEXE
User
User
Posts: 35
Joined: Sat Feb 26, 2022 6:33 pm

Re: AkelPad RePlace Notepad

Post by SharkyEXE »

AZJIO wrote: Sun Oct 09, 2022 12:20 pm

Code: Select all

Filename$ = "C:\Program Files\AkelPadPortable\AkelPad.exe"
Count = CountProgramParameters()
If Count
	param$=ProgramParameter(0)
	If FileSize(param$) > 0
		RunProgram(Filename$, param$, GetPathPart(param$))
	Else
		RunProgram(Filename$, param$, GetPathPart(Filename$))
	EndIf
Else
	RunProgram(Filename$)
EndIf
Hello

1) I create 1.exe file on PureBasic 4.20 (Windows - x86)

Code: Select all

Filename$ = "C:\Program Files\AkelPadPortable\AkelPad.exe"
Count = CountProgramParameters()
If Count
	param$=ProgramParameter(0)
	If FileSize(param$) > 0
		RunProgram(Filename$, param$, GetPathPart(param$))
	Else
		RunProgram(Filename$, param$, GetPathPart(Filename$))
	EndIf
Else
	RunProgram(Filename$)
EndIf
2) I rename 1.exe in notepad.exe

3) I copy notepad.exe file in directory

C:\Windows\notepad.exe
C:\Windows\System32\notepad.exe
C:\Windows\SysWOW64\notepad.exe

4) I open C:\!\Test_WinRAR29.cmd file - AkelPad started, C:\!\Test_WinRAR29.cmd file open - excellent, super

6) But - I open C:\!\inal11404 -дла оощ ыф цумщлзкщл3з мц ацул MNNMMMqpl v23 953 53262v32 - копия (2).log file - AkelPad started, C:\!\inal11404 -дла оощ ыф цумщлзкщл3з мц ацул MNNMMMqpl v23 953 53262v32 - копия (2).log file NOT open - see gif animation

Maybe - need more spaces in name C:\!\inal11404 -дла оощ ыф цумщлзкщл3з мц ацул MNNMMMqpl v23 953 53262v32 - копия (2).log?

My operating system: Microsoft Windows 7 Service pack 1 Professional x64
AZJIO
Addict
Addict
Posts: 2226
Joined: Sun May 14, 2017 1:48 am

Re: AkelPad RePlace Notepad

Post by AZJIO »

Code: Select all

Filename$ = "C:\Program Files\AkelPadPortable\AkelPad.exe"
#q$ = Chr(34)
Count = CountProgramParameters()
If Count
	param$ = ProgramParameter(0)
	If FileSize(param$) > 0
		RunProgram(Filename$, #q$ + param$ + #q$, GetPathPart(param$))
	Else
		RunProgram(Filename$, param$, GetPathPart(Filename$))
	EndIf
Else
	RunProgram(Filename$)
EndIf
SharkyEXE
User
User
Posts: 35
Joined: Sat Feb 26, 2022 6:33 pm

Re: AkelPad RePlace Notepad

Post by SharkyEXE »

AZJIO wrote: Sun Oct 09, 2022 5:14 pm

Code: Select all

Filename$ = "C:\Program Files\AkelPadPortable\AkelPad.exe"
#q$ = Chr(34)
Count = CountProgramParameters()
If Count
	param$ = ProgramParameter(0)
	If FileSize(param$) > 0
		RunProgram(Filename$, #q$ + param$ + #q$, GetPathPart(param$))
	Else
		RunProgram(Filename$, param$, GetPathPart(Filename$))
	EndIf
Else
	RunProgram(Filename$)
EndIf
Hello

I open C:\!\inal11404 -дла оощ ыф цумщлзкщл3з мц ацул MNNMMMqpl v23 953 53262v32 - копия (2).log file - AkelPad started, C:\!\inal11404 -дла оощ ыф цумщлзкщл3з мц ацул MNNMMMqpl v23 953 53262v32 - копия (2).log file NOT open - see gif animation

If tested, on disk C:\ create folder !

In folder C:\! create empty file inal11404 -дла оощ ыф цумщлзкщл3з мц ацул MNNMMMqpl v23 953 53262v32 - копия (2).log
AZJIO
Addict
Addict
Posts: 2226
Joined: Sun May 14, 2017 1:48 am

Re: AkelPad RePlace Notepad

Post by AZJIO »

Permission to use ingenuity.

Code: Select all

Filename$ = "C:\Program Files\AkelPadPortable\AkelPad.exe"
#q$ = Chr(34)
Count = CountProgramParameters()
If Count
	param$ = ProgramParameter(0)
	If FileSize(param$) > 0
		MessageRequester("1", "|" + param$ + "|")
		RunProgram(Filename$, #q$ + param$ + #q$, GetPathPart(param$))
	Else
		MessageRequester("2", "|" + param$ + "|")
		RunProgram(Filename$, param$, GetPathPart(Filename$))
	EndIf
Else
	MessageRequester("3", "|" + param$ + "|")
	RunProgram(Filename$)
EndIf
SharkyEXE
User
User
Posts: 35
Joined: Sat Feb 26, 2022 6:33 pm

Re: AkelPad RePlace Notepad

Post by SharkyEXE »

AZJIO wrote: Sun Oct 09, 2022 5:47 pm Permission to use ingenuity.

Code: Select all

Filename$ = "C:\Program Files\AkelPadPortable\AkelPad.exe"
#q$ = Chr(34)
Count = CountProgramParameters()
If Count
	param$ = ProgramParameter(0)
	If FileSize(param$) > 0
		MessageRequester("1", "|" + param$ + "|")
		RunProgram(Filename$, #q$ + param$ + #q$, GetPathPart(param$))
	Else
		MessageRequester("2", "|" + param$ + "|")
		RunProgram(Filename$, param$, GetPathPart(Filename$))
	EndIf
Else
	MessageRequester("3", "|" + param$ + "|")
	RunProgram(Filename$)
EndIf
Hello

See animation, please

https://cloud.mail.ru/public/PoXp/1XPWKChSa
AZJIO
Addict
Addict
Posts: 2226
Joined: Sun May 14, 2017 1:48 am

Re: AkelPad RePlace Notepad

Post by AZJIO »

Change in the registry
notepad.exe %1
on the
notepad.exe "%1"
SharkyEXE
User
User
Posts: 35
Joined: Sat Feb 26, 2022 6:33 pm

Re: AkelPad RePlace Notepad

Post by SharkyEXE »

AZJIO wrote: Sun Oct 09, 2022 6:07 pm Change in the registry
notepad.exe %1
on the
notepad.exe "%1"
Hello

Excuse me, please

I respect your work, your help to me

But when I had this idea - I fundamentally do not change the registry, I do not want any associations and other things, only by means of PureBasic

So there is no way to put a path containing spaces in quotation marks?

Thank You!
Locked