File Association Help Needed . . .
#1
Posted 11 September 2008 - 08:37 PM
Probably a REALLY simple one this time: I can't get the community's "Paint" script to associate with the usual image filetypes --
[Main]
Title=Paint
Type=script
Level=5
Description=Includes MS Paint in the PE build
Author=Boot-Land community
Contact=http://www.boot-land.net/forums
Version=004
Date=2007-03
Selected=True
Locked=True
Download_Level=1
Upload=2008-Feb-02 03:45:05
[Interface]
pCheckBox1=Desktop,1,3,23,42,66,18,False
pCheckBox2=StartMenu,1,3,23,64,74,18,True
pBevel1=pBevel1,1,12,5,13,111,78
pTextLabel1=Shortcut(s):,1,1,23,20,57,18,8,Normal
[Variables]
%TargetSys32%=%TargetDir%\i386\system32
[process]
Expand,"%SourceDir%\i386\mspaint.ex_","%TargetSys32%"
Expand,"%SourceDir%\i386\mfc42u.dl_","%TargetSys32%"
IniWrite,"%ProjectInfo%","UPX-Switches","MSPAINT.exe","-9 --compress-resources=0"
If,%pCheckBox1%,Equal,True,Run,%BuildModelScript%,Add-Shortcut,"DE","#$pSystemRoot#$p\system32\mspaint.exe","Paint"
If,%pCheckBox2%,Equal,True,Run,%BuildModelScript%,Add-Shortcut,"SM\Graphics","#$pSystemRoot#$p\system32\mspaint.exe","Paint"
associate_file,bmp
associate_file,jpg
associate_file,jpeg
associate_file,jpe
associate_file,jfif
associate_file,dib
associate_file,gif
associate_file,tif
associate_file,tiff
associate_file,png
Run,%ScriptLog%,Process-log
[AuthorEncoded]
authorlogo.jpg=924,1232
[EncodedFile-AuthorEncoded-authorlogo.jpg]
...
And, to add insult to injury, I cannot get the program to open anything other than bitmaps on LiveXP (despite the fact that the native app works well with gifs, jpgs, etc.)
Can't quite sort out the bits . . .
Thanks!
#2
Posted 11 September 2008 - 09:35 PM
Probably a REALLY simple one this time: I can't get the community's "Paint" script to associate with the usual image filetypes --
Please post the vlog
Peter
#3
Posted 11 September 2008 - 09:40 PM
Thanks for coming over to help!
I'm going out for the next couple of hours; and then will need to shut down 'til tomorrow -- But what/where is the "vlog" that you want?
See you soon . . .
#4
Posted 11 September 2008 - 10:27 PM
Regards,
Galapo.
#5
Posted 11 September 2008 - 10:30 PM
Try like this:
Title=PaintType=scriptLevel=5Description=Includes MS Paint in the PE buildAuthor=Boot-Land communityContact=http://www.boot-land.net/forumsVersion=004Date=2007-03Selected=TrueLocked=TrueDownload_Level=1Upload=2008-Feb-02 03:45:05[Interface]pCheckBox1=Desktop,1,3,23,42,66,18,FalsepCheckBox2=StartMenu,1,3,23,64,74,18,TruepBevel1=pBevel1,1,12,5,13,111,78pTextLabel1=Shortcut(s):,1,1,23,20,57,18,8,Normal[Variables][process]Require_File,mspaint.exeRequire_File,mfc42u.dllIniWrite,"%ProjectInfo%","UPX-Switches","MSPAINT.exe","-9 --compress-resources=0"If,%pCheckBox1%,Equal,True,Add_Shortcut,Desktop,,#$pSystemRoot#$p\system32\mspaint.exe,PaintIf,%pCheckBox2%,Equal,True,Add_Shortcut,StartMenu,Graphics,#$pSystemRoot#$p\system32\mspaint.exe,Paintassociate_file,bmp,edit,#$pSystemRoot#$p\system32\mspaint.exeassociate_file,jpg,edit,#$pSystemRoot#$p\system32\mspaint.exeassociate_file,jpeg,edit,#$pSystemRoot#$p\system32\mspaint.exeassociate_file,jpe,edit,#$pSystemRoot#$p\system32\mspaint.exeassociate_file,jfif,edit,#$pSystemRoot#$p\system32\mspaint.exeassociate_file,dib,edit,#$pSystemRoot#$p\system32\mspaint.exeassociate_file,gif,edit,#$pSystemRoot#$p\system32\mspaint.exeassociate_file,tif,edit,#$pSystemRoot#$p\system32\mspaint.exeassociate_file,tiff,edit,#$pSystemRoot#$p\system32\mspaint.exeassociate_file,png,edit,#$pSystemRoot#$p\system32\mspaint.exeProcess_log[AuthorEncoded]authorlogo.jpg=924,1232[EncodedFile-AuthorEncoded-authorlogo.jpg]...You can replace edit by openSome example for Associate_File:associate_file,htmlassociate_file,html,open,c:\test.exeassociate_file,html,open,c:\test.exe,/run=%2associate_file,html,editassociate_file,html,icon,c:\test.exeassociate_file,html,icon,%systemroot%\System32\Shell32.dll,-153Use Add_Asso when there is a lot associate to do , process is more speed but require to use hive_load and hive_unload but cannot work if program is outside of %PE_Program% (Like here)hive_load,HKUAdd_Asso,bmpAdd_Asso,jpg
hive_unload,HKU
Pedro
#6
Posted 12 September 2008 - 07:21 AM
Sorry, typo. Should be "log".But what/where is the "vlog" that you want?
But I think Pedro's reply already solved your question.
Peter
#7
Posted 12 September 2008 - 12:23 PM
In your example you use Associate_File without declare the needed variables so it didn't work.
When using API command, you should declare the 3 variables: %ProgramTitle%, %ProgramEXE% and %ProgramFolder%
In most API command there is many parameters that are optional, and you can let them blank, but if they are blank they use the default value
Here you use use Associate_File,jpg
Api convert this to :
First load the registry
Title=PaintType=scriptLevel=5Description=Includes MS Paint in the PE buildAuthor=Boot-Land communityContact=http://www.boot-land.net/forumsVersion=004Date=2007-03Selected=TrueLocked=TrueDownload_Level=1Upload=2008-Feb-02 03:45:05[Interface]pCheckBox1=Desktop,1,3,23,42,66,18,FalsepCheckBox2=StartMenu,1,3,23,64,74,18,TruepBevel1=pBevel1,1,12,5,13,111,78pTextLabel1=Shortcut(s):,1,1,23,20,57,18,8,Normal[Variables]%ProgramTitle%=Paint%ProgramEXE%=mspaint.exe%ProgramFolder%=system32[process]Set,%PE_Programs%,#$pSystemRoot#$pRequire_File,%ProgramEXE%Require_File,mfc42u.dllIniWrite,"%ProjectInfo%","UPX-Switches","MSPAINT.exe","-9 --compress-resources=0"If,%pCheckBox1%,Equal,True,Add_Shortcut,DesktopIf,%pCheckBox2%,Equal,True,Add_Shortcut,StartMenu,Graphicshive_load,HKUAdd_Asso,bmpAdd_Asso,jpgAdd_Asso,pegAdd_Asso,jpeAdd_Asso,jfifAdd_Asso,dibAdd_Asso,gifAdd_Asso,tifAdd_Asso,tiffAdd_Asso,pnghive_unloadProcess_log[AuthorEncoded]authorlogo.jpg=924,1232[EncodedFile-AuthorEncoded-authorlogo.jpg]...
Pedro
Edited by pedrole15, 17 September 2008 - 10:23 PM.
Correct my mistake
#8
Posted 12 September 2008 - 02:34 PM
And, thank you, Pedro, for MakeScript! I would have no way of wrapping myself around some of the more arcane aspects of scriptbuilding without it...
So, if I'm understanding things correctly here, by plugging your codeblock,
Title=Paint Type=script Level=5 Description=Includes MS Paint in the PE build Author=Boot-Land community Contact=http://www.boot-land.net/forums Version=004 Date=2007-03 Selected=True Locked=True Download_Level=1 Upload=2008-Feb-02 03:45:05 [Interface] pCheckBox1=Desktop,1,3,23,42,66,18,False pCheckBox2=StartMenu,1,3,23,64,74,18,True pBevel1=pBevel1,1,12,5,13,111,78 pTextLabel1=Shortcut(s):,1,1,23,20,57,18,8,Normal [Variables] %ProgramTitle%=Paint %ProgramEXE%=mspaint.exe %ProgramFolder%=system32 [process] Set,%PE_Program%,#$pSystemRoot#$p Require_File,%ProgramEXE% Require_File,mfc42u.dll IniWrite,"%ProjectInfo%","UPX-Switches","MSPAINT.exe","-9 --compress-resources=0" If,%pCheckBox1%,Equal,True,Add_Shortcut,Desktop If,%pCheckBox2%,Equal,True,Add_Shortcut,StartMenu,Graphics hive_load,HKU Add_Asso,bmp Add_Asso,jpg Add_Asso,peg Add_Asso,jpe Add_Asso,jfif Add_Asso,dib Add_Asso,gif Add_Asso,tif Add_Asso,tiff Add_Asso,png hive_unload Process_log [AuthorEncoded] authorlogo.jpg=924,1232 [EncodedFile-AuthorEncoded-authorlogo.jpg] ...into the rest of the script, I should finally see the necessary file associations with Paint in my build?
Oh -- one last thing (while I still have a fork in you ): Have I formed the following codeblock correctly for a program which contains directories in its main folder?
[Variables] %ProgramEXE%=TheProgram.exe %ProgramFolder%=Some Program %ProgramTitle%=Some Program [Process] RunFromRam,%CheckBoxRAM% If,%CheckBoxSM%,Equal,True,Add_Shortcut,StartMenu If,%CheckBoxDE%,Equal,True,Add_Shortcut,Desktop Unpack,Some Program Unpack,lang,,,%Target_Prog%,Some Program,lang Unpack,bin,,,%Target_Prog%,Some Program,bin Unpack,Unp,,,%Target_Prog%,Some Program,bin\Unp Unpack,Codecs,,,%Target_Prog%,Some Program,bin\Codecs Unpack,Formats,,,%Target_Prog%,Some Program,bin\Formats Unpack,docs,,,%Target_Prog%,Some Program,docs Process_logHere's the layout which I'm working with:
%Root%\Program Files\Some Program\TheProgram.exe
%Root%\Program Files\Some Program\bin\*.*
%Root%\Program Files\Some Program\lang\*.*
%Root%\Program Files\Some Program\docs\*.*
Been having a hard time with the script syntax (even with MakeScript): Does everything seem to match up correctly here?
Thanks again --
#9
Posted 12 September 2008 - 05:34 PM
Thanks, I am happy if it help someone.And, thank you, Pedro, for MakeScript! I would have no way of wrapping myself around some of the more arcane aspects of scriptbuilding without it...
Yes, I think it's better way to do what you want and also the more elegantI should finally see the necessary file associations with Paint in my build?
Becarefull ,like say Galapo, if an other script overwrite some association
No you make some mistakeBeen having a hard time with the script syntax (even with MakeScript): Does everything seem to match up correctly here?
Syntax ===> Unpack,[Folder],[Archive],[Option],[%Target_Prog%],[%ProgramFolder%],[%programExe%]
No need to specify %Target_Prog% in the parameter 4 because it is the default value
The parameter 6 %ProgramEXE% is required only if you extract all file in a Folder named like here Folder_Name in the %ScriptDir%
then you make some update to some file in this folder
when unpack see there is a folder in %Scriptdir% , it check if the file you have specify in parameter 6 (Default is %ProgramEXE%)exist
If it exist, files are copied from there rather extracted from script
So you code should be like this:
[Variables] %ProgramEXE%=TheProgram.exe %ProgramFolder%=Folder_Name %ProgramTitle%=Title_Name [Process] RunFromRam,%CheckBoxRAM% If,%CheckBoxSM%,Equal,True,Add_Shortcut,StartMenu If,%CheckBoxDE%,Equal,True,Add_Shortcut,Desktop Unpack,Folder Name Unpack,lang,,,,%ProgramFolder%\lang Unpack,bin,,,,%ProgramFolder%\bin Unpack,Unp,,,,%ProgramFolder%\bin\Unp Unpack,Codecs,,,,%ProgramFolder%\bin\Codecs Unpack,Formats,,,,%ProgramFolder%\bin\Formats Unpack,docs,,,,%ProgramFolder%\docs Process_log
Pedro
#10
Posted 12 September 2008 - 08:22 PM
I should be able to put the pieces together now
Have a good weekend . . .
#11
Posted 17 September 2008 - 09:17 PM
I'm sorry but I've make a mistake
Replace %PE_Program% by %PE_Programs%
in this line
Set,%PE_Programs%,#$pSystemRoot#$pand the script should work
Pedro
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users