SOLVED: Registry-Script for File-Type-Associations
#1
Posted 15 June 2008 - 01:36 PM
nearly finished my VistaPE-CD.
Working with VistaPE v.11 and Winbuilder 074.
Now I have some tools "onboard" like f.e. 7zip, foxitpdfreader, vlcplayer...........
But now I wanted to associate special filetypes with these tools, f.e. PDF with Foxitreader, RAR,ZIP,ISO with 7Zip..... and so on.........
I think the best way would be using the Windows registry?
But till now I never worked with the registry ( in Winbuilder scripts ! )
How would a script has to be to realize this?
How do I write something to the vistape-registry? Is there a special "open with"-entry?? Where?
Would be great if anybody could help me..... thanks...
S-DV
#2
Posted 15 June 2008 - 02:40 PM
Need .NET Framework Version 2.0 Redistributable
ConvRegToInf.rar 10.02KB 455 downloads
Inf to Script > WBuilder \ Tools->Convert
#3
Posted 15 June 2008 - 08:03 PM
API's associate_file provides that (or should provide).hello,
nearly finished my VistaPE-CD.
Working with VistaPE v.11 and Winbuilder 074.
Now I have some tools "onboard" like f.e. 7zip, foxitpdfreader, vlcplayer...........
But now I wanted to associate special filetypes with these tools, f.e. PDF with Foxitreader, RAR,ZIP,ISO with 7Zip..... and so on.........
I think the best way would be using the Windows registry?
But till now I never worked with the registry ( in Winbuilder scripts ! )
How would a script has to be to realize this?
How do I write something to the vistape-registry? Is there a special "open with"-entry?? Where?
Would be great if anybody could help me..... thanks...
S-DV
Look in api.Script under [Demo Usage]
Peter
#4
Posted 15 June 2008 - 09:21 PM
First, you will need to use app scripts.
If you're using VistaPE app scripts then this might already be your case for most apps.
---
Second, edit your script (on this case will pick on the pdfReader) and add this line under the [process] section:
associate_file,pdf
So that our script will then look like this:
[Variables]
%ProgramFolder%=PDFReader
%ProgramEXE%=Foxit Reader.exe
%ProgramTitle%=FOXIT PDF Reader
[Process]
Echo,Processing %ProgramTitle%...
If,NotExistFile,"%pFileBox1%\%ProgramEXE%",run,%ScriptFile%,Download
Echo,Processing %ProgramTitle%...
RunFromRam,%pCheckBox1%
CopyProgram,%pFileBox1%
Add_Shortcut,StartMenu,Office
associate_file,pdf
(changes are added in bold)
You can read the whole script from here:
http://vistape.net/p...DFReader.script
-------
There are however, a few more advanced options for associating your files (adding the options to edit, open with another file, etc, etc.)
Look inside the api.script file on your project - on the bottom there is a small set of examples that teach how each command can be used to the max
Here's an example (for vistaPE is similar since the app script code is shared)
http://livexp.boot-l...uild/api.script
associate_file,html
associate_file,html,open,c:\test.exe
associate_file,html,open,c:\test.exe,/run=%2
associate_file,html,edit
associate_file,html,icon,c:\test.exe
associate_file,html,icon,%systemroot%\System32\Shell32.dll,-153
This example should work fairly well for any other app script you like.
#5
Posted 15 June 2008 - 10:26 PM
Sorry Nuno but under VistaPE only the first work1- associate_file,html
2- associate_file,html,open,c:\test.exe
3- associate_file,html,open,c:\test.exe,/run=%2
4- associate_file,html,edit
5- associate_file,html,icon,c:\test.exe
6- associate_file,html,icon,%systemroot%\System32\Shell32.dll,-153
#6
Posted 16 June 2008 - 02:58 PM
I do not know a lot about VistaPE, but as the API functions are only a subset of standard WinBuilder statements, IMHO it should be possible to have under VistaPE the same functionality like under e.g. LiveXP.Sorry Nuno but under VistaPE only the first work
Peter
#7
Posted 16 June 2008 - 03:43 PM
associate_file,pdf
Did not know that it would be so easy............... )))
Thank you very much !
#8
Posted 16 June 2008 - 03:50 PM
[German]ok........
associate_file,pdf
Did not know that it would be so easy............... )))
Thank you very much !
Darum schätze ich WinBuilder, seit ich es kenne!
[/German]
That is the reason that I like WinBuilder since the very first contact.
(Bad translation! Maybe a member with good German AND English knowledge delivers a better translation?)
Peter
#9
Posted 16 June 2008 - 04:18 PM
I would say:[German]
Darum schätze ich WinBuilder, seit ich es kenne!
[/German]
That is the reason that I like WinBuilder since the very first contact.
(Bad translation! Maybe a member with good German AND English knowledge delivers a better translation?)
Peter
That's why i appreciate Winbuilder, since i've been introduced to it.
Or did you wanted a better german version?
#10
Posted 16 June 2008 - 05:24 PM
That's why I felt in love with it at first glance....
(We Italians are a bit more Romantic, it's a known fact....)
@Medevil
WHO introduced Peter to Winbuilder?
http://www.merriam-w...onary/introduce
I imagine something like:
Common Friend:This is Winbuilder...and this is Peter, psc for friends...
Winbuilder: How do you do...
Peter: How do you do, it's a pleasure to meet you, our Common Friend told me about your exceptional abilities....
jaclaz
#11
Posted 16 June 2008 - 05:51 PM
Appearantly not romantic enought. Else you would not just felt in love, but actually fallen in love!Maybe a better English translation would be :
That's why I felt in love with it at first glance....
(We Italians are a bit more Romantic, it's a known fact....)
Common Friend = Mr. Browser@Medevil
WHO introduced Peter to Winbuilder?
http://www.merriam-w...onary/introduce
I imagine something like:
Common Friend:This is Winbuilder...and this is Peter, psc for friends...
Winbuilder: How do you do...
Peter: How do you do, it's a pleasure to meet you, our Common Friend told me about your exceptional abilities....
#12
Posted 16 June 2008 - 06:03 PM
Appearantly not romantic enought. Else you would not just felt in love, but actually fallen in love!
Maybe I would have fallen in love, but Peter is German, so, maybe a little more detached...
..I actually had this in my mind:
http://vagalume.uol....el-in-love.html
jaclaz
#13
Posted 16 June 2008 - 06:31 PM
But what about the nice English word OFFTOPIC?
Peter
#14
Posted 16 June 2008 - 06:47 PM
Sorry, don't understand what you wanna say!But what about the nice English word OFFTOPIC?
Maybe your english is worst than you thought?
#15
Posted 16 June 2008 - 06:54 PM
Sorry, don't understand what you wanna say!
Maybe your english is worst than you thought?
I do not think so.
I never have had problems with my English.
Maybe some English speaking people have.
Peter
#16
Posted 17 June 2008 - 06:30 AM
Oh yes perhaps i can add missing thing by the reg_add commandI do not know a lot about VistaPE, but as the API functions are only a subset of standard WinBuilder statements, IMHO it should be possible to have under VistaPE the same functionality like under e.g. LiveXP.
Peter
In VistaPE the function associate_file is :
[do_associate] echo,"Associate . #1 file" If,#2,NotEqual,"",StrFormat,filename,#2,%CFileName% If,#2,NotEqual,"",StrFormat,path,#2,%CPath% If,#2,Equal,"",StrFormat,filename,%ProgramExe%,%CFileName% If,#2,Equal,"",StrFormat,path,%PE_Programs%\%programFolder%\,%CPath% If,%CPath%,Equal,,StrFormat,path,%PE_Programs%\%programFolder%\,%CPath% # IniWriteTextLine,"%VPE_CFG%","association","#1#$c%CPath%%CFileName%"I don't know after how is interpreted the file vistape.cfg so i can't make any change here
What is the registry key for change the work Folder for a program ? ( this is for the add_shortcut function)
#17
Posted 17 June 2008 - 01:16 PM
Oh yes perhaps i can add missing thing by the reg_add command
Good news!
...
WHO introduced Peter to Winbuilder?
...
I imagine something like:
Common Friend:This is Winbuilder...and this is Peter, psc for friends...
Winbuilder: How do you do...
Peter: How do you do, it's a pleasure to meet you, our Common Friend told me about your exceptional abilities....
jaclaz
Don't need to go very far with your imagination.
It was two years ago during the sunny summer of July when Boot Land was just being inaugurated on the old hosting system that Peter presented some good ideas to make boot disks in a different manner.
At the time I had just finished working on Batcher and had Bart asked to move away from 911cd since the newer boot disk construction projects from Open Builder (later WinBuilder) were not based on bartPE and had no place for discussion inside 911cd.
At the time we were both bartPE/Reatogo users but these build projects were simply too static to allow expanding functionalities and an efficient solution for this matter was really necessary.
http://www.911cd.net...showtopic=17551
At the time I mentioned
There is always a solution, it just takes some time to find it sometimes..
Guess these last two years passed like a breeze.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users