Jump to content











Photo
- - - - -

When does LiveXP associate .txt with notepad.exe ?


  • Please log in to reply
3 replies to this topic

#1 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 18 December 2010 - 10:17 AM

I have opted not to include notepad in Winbuilder.

I use a script to include Notepad2.

At start-up, I use assoc & ftype to associate .txt to Notepad2. I paused the .cmd file that runs the assoc+ftype commands. They seem to be OK.
assoc .txt=NotePad2.txt

ftype NotePad2.txt="%HOMEDRIVE%\PApps\NotePad2\Notepad2.exe" "%%1"

pause

When LiveXP is booted up, if I check the assoc for .txt it says "notepad.exe %1".

This must be happening after my cmd is run. Any explanation/solution ?

btw : assoc+ftype also does not work for .ini, but works for .log .

Edit : Does Winbuilder allow files to be added to \I386 ? I could add Notepad2.exe renamed to notepad.exe .

Edited by gbrao, 18 December 2010 - 10:19 AM.


#2 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 18 December 2010 - 01:14 PM

I have opted not to include notepad in Winbuilder.

I use a script to include Notepad2.

At start-up, I use assoc & ftype to associate .txt to Notepad2. I paused the .cmd file that runs the assoc+ftype commands. They seem to be OK.

assoc .txt=NotePad2.txt

ftype NotePad2.txt="%HOMEDRIVE%\PApps\NotePad2\Notepad2.exe" "%%1"

pause

When LiveXP is booted up, if I check the assoc for .txt it says "notepad.exe %1".

This must be happening after my cmd is run. Any explanation/solution ?

btw : assoc+ftype also does not work for .ini, but works for .log .

Edit : Does Winbuilder allow files to be added to \I386 ? I could add Notepad2.exe renamed to notepad.exe .

EDIT: To answer the title question: As in every nativeEx based project, the associations are written into the registry by "HoJoPE Hives Factory" in the very beginning of the build. /EDIT

Check \i386\system32\ExpEnvVar.txt whether it contains an entry to write the 'notepad.exe' data into the registry.

If yes, it comes from a RegAddBoot command you have to find and to comment out.

i386 during building the project is a directory like any other. You may copy, delete, rename files whenever you want.

BTW: I would try
ftype txtfile="%HOMEDRIVE%\PApps\NotePad2\Notepad2.exe" "%%1"

ftype inifile="%HOMEDRIVE%\PApps\NotePad2\Notepad2.exe" "%%1"

pause
No assoc.
Are you sure that %HomeDrive% is correct? Mybe it should be %SystemDrive%

Peter

#3 amalux

amalux

    Platinum Member

  • Tutorial Writer
  • 2813 posts
  •  
    United States

Posted 18 December 2010 - 04:34 PM

Edit : Does Winbuilder allow files to be added to \I386 ? I could add Notepad2.exe renamed to notepad.exe .

It sure does :hi:
npreplace.png

#4 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 474 posts
  •  
    India

Posted 18 December 2010 - 05:42 PM

Thanks. I will try out what you suggest.

Are you sure that %HomeDrive% is correct? Mybe it should be %SystemDrive%

I run all my portable apps from the RAMdrive since some write to files in the same folder.
-------
What i really cannot understand is why the assoc+ftype does not work from the cmd file (at startup).
After LiveXP is booted, if I enter the exact same commands in a cmd window, it works OK.

Edited by gbrao, 18 December 2010 - 05:49 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users