Topic: ShortcutsPE  (Read 22025 times)

Re: ShortcutsPE
« Reply #20 on: October 26, 2010, 11:09:09 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Galapo,

I've now found out that the INI AutoIt functions do support unicode files if they're UTF-16 Little Endian. So I think that should be enough.
I do not know much thing about that (long document that give me some ideas), but since since au3 guys do a great job without causing annoyance and wide usage, I am fine following them.

I have to go out in some minutes, and after I come back will test your last work, some hours later.... :turtle:
(aside, also e-mailed BlueLife asking a free time schedule)

may I guess idea in your mind:
project will create projectinfo itsself, hence we get full control of projectinfo file,
than we can use any workarounds we like on supporting sources until we get a better builder. (and untill we get a better builder things ready from today)

following this guessing idea (cutting very shortly):
than projectinfo created and copied to be used by ShortcutCentral.exe,
and converted to ascii to be used by wb other tasks....

I feel Gena getting better better better everyday  :great: I feel the fun & joy & hapiness  :grin:

See you..

Re: ShortcutsPE
« Reply #21 on: October 27, 2010, 11:22:57 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
New package is available for testing at the link in the first post.

Syntax changes to ShortcutCentral.exe is written to the post a few above this one.

ShortcutsPE script now copied %ProjectInfo% to ShortcutCentral.exe location and is used from there after conversion to unicode. ansi %ProjectInfo% file remains in traditional location for use by WB.

Regards,
Galapo.

Re: ShortcutsPE
« Reply #22 on: October 27, 2010, 12:05:21 PM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Sorry, please redownload if you already have since my last post. I had to make a slight correction to a script.

Thanks,
Galapo.

Re: ShortcutsPE
« Reply #23 on: October 27, 2010, 12:53:29 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
I thought of another possible name: what do you think of ShortcutsCentro?
ShortcutsCentro Fine to me  :thumbsup:

Re: ShortcutsPE
« Reply #24 on: October 27, 2010, 01:20:33 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Galapo,

I tried to explain on post 8 - 10 and also previously before this topic, but I failed, please to not blame me not saying at the begining   :innocent: sorry, I am doing my best, here is the thing:

giving example:

Set,%ProgramTitle%,ImgBurn
Set,%ProgramEXE%,ImgBurn.exe
Set,%ProgramFolder%,ImgBurn
Add_Shortcut,Desktop,,,3q,,#$q #$qI like | quoted and parameters with with |#$q #$q



Trying to explain:
|Shortcut_folder|Target_file|LNK_name[|Work_folder|Arguements|Icon[,Index]|State[,Hotkey]|Description|[StartMenu_subfolder]|]

Argument position is toxic,
To fix it must be in the end without |

|Shortcut_folder|Target_file|LNK_name[|Work_folder|[StartMenu_subfolder|Icon[,Index]|State[,Hotkey]|Description|Arguements]


giving example from one of shellexecute lines:

ShellExecute,Hide,%ProjectTemp%\ShortcutsCentral\ShortcutCentral.exe,"/type:loader /lf:%target_sys%\ExpEnvVar.txt#$cPE1Shc /env:ProjectInfo /pi:%ProjectTemp%\ShortcutsCentral\ProjectInfo.ini /lwm:UTF16LE /tl:disable /pre:PE1Shc |#1|#3|#4|#5|#6|#7|#8|#9|#2|"

ShellExecute,Hide,%ProjectTemp%\ShortcutsCentral\ShortcutCentral.exe,"/type:loader /lf:%target_sys%\ExpEnvVar.txt#$cPE1Shc /env:ProjectInfo /pi:%ProjectTemp%\ShortcutsCentral\ProjectInfo.ini /lwm:UTF16LE /tl:disable /pre:PE1Shc |#1|#3|#4|#5|#2|#7|#8|#9|#6"

Trick with au3 is counting number of | (above 9) and after 9th everything is argument.


Reason behind:
arguments can contain | , like your utility ;).
keep argument in one line, but at the end, so anything written after "9th |" is the argument without any limitation  :thumbsup:

It is not my invention, I found this trick from nightman's cfg organisation ;) and also used it with add_pin organisation  :>.
 :cheers:

Re: ShortcutsPE
« Reply #25 on: October 28, 2010, 12:27:54 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Hi Lancelot,

I'm quite reluctant to move #6 to the endfor the reason that providing commandline arguements is quite common and I don't want to have to enter heaps of |||| to get to this parameter. I've coded a solution which is working:

ila_rendered

I'll upload a new test package soon and provide details.

Regards,
Galapo.

Re: ShortcutsPE
« Reply #26 on: October 28, 2010, 04:00:25 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
New test package is now available: http://galapo.boot-land.net/temp/ShortcutsPE.rar
« Last Edit: October 29, 2010, 12:43:06 AM by Galapo »

Re: ShortcutsPE
« Reply #27 on: October 28, 2010, 08:07:01 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
I'm quite reluctant to move #6 to the endfor the reason that providing commandline arguements is quite common and I don't want to have to enter heaps of |||| to get to this parameter.
I fully understand you,
on the other hand on capi it is still 6th parameter which end user mostly will use  :wink:,

one of the reasons I use shortcut parameter as 6th parameter on add_pin was same as yours.
Full Syntax="//Add_Pin,Type,Order(0,1,2,..,8,9),(path\)FileName,Title,Work Folder,Parameters,(path\)IconFile#$cIconIndex,StartMode=(1,2,3)#$cHotKey,ToolTipText"
But on capi, I payed the price with heaps of |||| to fully finish add_pin development without any escape requirement so there will be no chance of an issue in future at capi side.
IniWrite,%PECfg%,PINTOOL,#1#2,#3|#4|#5|#7|#8||#6

But these done to Set Standarts of Add_Pin on capi for pe3 world ;) so there will be no need to update add_pin section of capi  :great:
On the other hand,
no such limitation for your utility since we have a seperate ShorcutCentral script and ShorcutD.exe and its method can be updated easly in future....

ANNNNYYYYWAY,
I wrote above as last notes about this matter,
(more details written on post 8+10 and source codes of add_pin utility of Max_Real QNX available),
No need to write same things over and over again,
Since capi parameters fully ready, we can change things with ShortcutD.exe anytime when things happen.
No need to stuck on this anymore, I guess you are tired working on same thing and will be happy to finish  :punk:

Now going to next post to continue  :thumbsup:

Re: ShortcutsPE
« Reply #28 on: October 28, 2010, 08:10:32 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Galapo,

you need escape for description (tooltip) too for same reasons with parameters.......
better use same escape ( [scarg] - [/scarg] ) to avoid confusion

Example:
ShellExecute,Hide,%ProjectTemp%\ShortcutsCentro\ShortcutCentro.exe,"/type:loader /lf:%target_sys%\ExpEnvVar.txt#$cPE1Shc /env:ProjectInfo /pi:%ProjectTemp%\ShortcutsCentro\ProjectInfo.ini /lwm:UTF16LE /tl:disable /pre:PE1Shc |#1|#3|#4|#5|[scarg]#6[/scarg]|#7|#8|#9|#2|"
-->
ShellExecute,Hide,%ProjectTemp%\ShortcutsCentro\ShortcutCentro.exe,"/type:loader /lf:%target_sys%\ExpEnvVar.txt#$cPE1Shc /env:ProjectInfo /pi:%ProjectTemp%\ShortcutsCentro\ProjectInfo.ini /lwm:UTF16LE /tl:disable /pre:PE1Shc |#1|#3|#4|#5|[scarg]#6[/scarg]|#7|#8|[scarg]#9[/scarg]|#2|"

 :cheers:

Re: ShortcutsPE
« Reply #29 on: October 28, 2010, 08:21:04 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Galapo,

same misunderstanding continues on naming.....

I thought name of script be ShortcutCentro (<-- or any other suggestion)

And name of your .exe be ShortcutD.exe  (<-- or any other suggestion)


As I tried to explain before, I think name of script is wrong "ShortcutsPE" and should have a better name. (like ShortcutCentro OR any other name you like for a more general naming)
Reason Behind:
* a project creating a portable XP/2k3 can also use same script in future..... or for any other task......

.exe is yours and you are free to give it anyname, but only not name of the script (whatever it become) ;).
Reason Behind:
Name of your utility should give the right impression showing it is only one of method provided by the script,
else (when same) it would give impression saying script is special for your utility + your utility is superior than other options.....
I do not want to give these wrong impressions and I guess you would not want too  :great:

Re: ShortcutsPE
« Reply #30 on: October 28, 2010, 10:37:19 PM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
you need escape for description (tooltip) too for same reasons with parameters.......
better use same escape ( [scarg] - [/scarg] ) to avoid confusion
Ok, I'll code this in soon.


same misunderstanding continues on naming.....
Yes, a little bit of misunderstand, just not exactly in the way you assumed.

ShortcutsCentro was indeed the name I was suggesting for the script -- I just hadn't gotten to changing it over to this yet.

Misunderstanding was that script name and EXE name could be the same. I'll think up something different.

Regards,
Galapo.

Re: ShortcutsPE
« Reply #31 on: October 29, 2010, 12:50:26 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
New test package is now available: http://galapo.boot-land.net/temp/ShortcutsPE.rar

New EXE name is FreeShc: "Free" for freedom of shortcut generation; "Free" for freeware; "Free" for sourcecode provided.

Tooltip parameter can now contain a pipe so long as it is either escaped by SCPIPE or [SCPARAM][/SCPARAM].

FreeShc.exe syntax:

FreeShc.exe /TYPE:loader|icon /ENV:direct|projectinfo [/LF:loader_file,section /PI:projectinfo_file /LWM:ANSI|UTF16LE /TL:enable|disable /PRE:prefix /DEBUG[:open]] |SHORTCUT PARAMETERS|

SHORTCUT PARAMETERS syntax:
|Shortcut_folder|Target_file|LNK_name[|Work_folder|Arguements|Icon[,Index]|State[,Hotkey]|Description|[StartMenu_subfolder|]]

Explanation:
/TYPE:loader - sets shortcut generation to loader CFG type rather than icon (to be used in conjunction with /LF:)
/TYPE:icon - sets shortcut generation to icon

/ENV:direct - sets environment variables etc to directly supplied parameters
/ENV:projectinfo - sets environment variables etc from supplied projectinfo file (to be used in conjunction with /PI:

/LF:loader_file,section - sets loader CFG file and INI section to write to

/PI:projectinfo_file - sets path to projectinfo file

/LWM:ANSI - sets loader write mode to ANSI
/LWM:UTF16LE - sets loader write mode to UTF-16 Little Endian

/TL:enable - removes tag line at the end of each INI write to loader file
/TL:disable - does not remove tag line at the end of each INI write to loader file (speed improvement when loader doesn't care about the ending "=ENDOFSECTIONTODELETE"

/PRE:prefix - adds specified prefix to each INI write to loader file

/DEBUG - writes debug log to FreeShc.exe directory
/DEBUG:open - writes debug log to FreeShc.exe directory and opens for viewing

SHORTCUT PARAMETERS should hopefully be self-explanatory.

Special note regarding pipes ( | ) used in arguements' parameter or tooltip's parameter: If Arguements or Tooltip contain contains any pipes, then they need to be escaped, either by replacing "|" with the escape "SCPIPE" or enclosing the parameter like this:  |[SCPARAM]Parameter with pipe (|)[/SCPARAM]|

Examples:
Code: [Select]
FreeShc.exe /TYPE:icon /ENV:projectinfo /PI:%ProjectInfo% |......]
would generate an icon based upon envoronment variables specified in projectinfo and from paramters given. This is Gena's build-time command.

Code: [Select]
FreeShc.exe /TYPE:loader /ENV:projectinfo /LF:%target_sys%\ExpEnvVar.txt,PE1Shc /PI:%ProjectInfo% /LWM:UTF16LE /TL:disable /PRE:PE1Shc |.....|
would generate a section in ExpEnvVar.txt loader file section in UTF16LE encoding PE1Shc based upon envoronment variables specified in projectinfo and from paramters given prefixing each line with "PE1Shc" and not removing tag line remaining in each INI write. This is Gena's boot-time command.

Code: [Select]
FreeShc.exe /TYPE:icon /ENV:direct "|Desktop|%ProgramFiles%\ImgBurn\ImgBurn.exe|ImgBurn|"
would generate an icon on the the desktop for ImgBurn.exe.

Code: [Select]
FreeShc.exe /TYPE:icon /ENV:direct "|%userprofile%\Desktop|%ProgramFiles%\ImgBurn\ImgBurn.exe|ImgBurn|"
would do exactly the same thing as the above.

Regards,
Galapo.
« Last Edit: October 29, 2010, 01:45:12 AM by Galapo »

Re: ShortcutsPE
« Reply #32 on: October 29, 2010, 04:10:15 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
I've updated the test package again -- we're getting there I think!  :transformer:

Regards,
Galapo.

Re: ShortcutsPE
« Reply #33 on: October 29, 2010, 12:21:45 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Galapo,

I also think we are there   :good_job:

Today (tonight) & Tomorrow Iwill be at home (=homepc :wub: ) to work on compatibilties with pe2/3 projects and probably find some more things that may require minor things from your utility.

A lot of work waiting my darling homepc  :victory:

Re: ShortcutsPE
« Reply #34 on: November 03, 2010, 10:59:26 PM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
I've made a correction to ShortcutsPE script and uploaded it here: http://galapo.boot-land.net/temp/6%20ShortcutsPE.script

Replace the one in the test package with this one.

Regards,
Galapo.

Re: ShortcutsPE
« Reply #35 on: November 10, 2010, 11:26:29 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi Galapo,

better tidy up a little bit,
here combining post 31, post 34, e-mail, and capi candidate (r52)
http://www.mediafire.com/?fsy1sa7igmg0tkx

life do not mercy me much working on this,
whenever I focus, another urgent  :super_hero: call come up  for capi etc.  or like today I will be full busy with my girlfriend  :wub: in some hours  :tooth:.
I already have a set of ideas and some minor things left to check, need to clear my mind.....
Coming closer but very slowly...  :turtle: Accept my apology.  :worship:

Re: ShortcutsPE
« Reply #36 on: November 11, 2010, 05:07:53 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Hi Lancelot,

I updated your own updated test package with a new version of '6 ShortcutsPE.script'. I've been seeing if I can get the script working with Win7PE_SE and discovered a bug when script was run in a fresh project.

New test package here: http://galapo.boot-land.net/temp/ShortcutsPE.rar

Regards,
Galapo.

Re: ShortcutsPE
« Reply #37 on: November 11, 2010, 05:54:02 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Well, it took a bit of getting used to, but I've started to figure out how Win7PE_SE works. :driving:

Good news: I've been able to get build-time shortcut generation to work! That means, shortcuts can be set to be created at build like with PE1 projects, rather than when PE boots.

Basic test package here to demonstrate: http://galapo.boot-land.net/temp/Win7PE_SE-ShortcutTestPackage.rar

Note the operative word "basic" -- this is just to illustrate how it can be done and is only set to currently work with Explorer as shell.

Regards,
Galapo.

Re: ShortcutsPE
« Reply #38 on: November 11, 2010, 12:48:26 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
I am glad you like Win7PE_SE :).

Thanks for test package, reading lines were also things in my mind :).(again 2 minds... :>)
+ one more advantage, all shortcut options working
(NigmanCfg is limited, check http://theoven.org//index.php?topic=50.msg383 )
+ another natural advantage, no need shell loader.

You see, there is no need apitype for shortcut centro script and....., ahh time, I have to go but I am very close to get full free time to focus on working with shortcut centro, I just came around for a short time, I have to go now... See you.

edit:
I am back, I now have all time to work on tonight, see you :>.
« Last Edit: November 11, 2010, 04:15:41 PM by Lancelot »

Re: ShortcutsPE
« Reply #39 on: November 11, 2010, 05:25:35 PM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
You see, there is no need apitype for shortcut centro script
Currently, I still see a need as there are still differences between what is required for PE1 vis-a-vis PE2/3.

Compare the lines of code:
Code: [Select]
[Add-Shortcut-2-LNK-Buildtime-Explorer-FreeShc.exe-NoDebug]
ShellExecute,Hide,%ProjectTemp%\ShortcutsCentro\FreeShc.exe,"/type:icon /env:ProjectInfo /pi:%ProjectTemp%\ShortcutsCentro\ProjectInfo.ini |#1|#3|#4|#5|[scparam]#6[/scparam]|#7|#8|[scparam]#9[/scparam]|#2|"

Code: [Select]
[Add-Shortcut-1-LNK-Buildtime-Explorer-FreeShc.exe-NoDebug]
If,Not,ExistFile,%Modelram%\filled,FileCreateBlank,%Modelram%\filled
StrFormat,POS,#3,!CDDrive!,%FromCD%
If,%FromCD%,Equal,0,ShellExecute,Hide,%ProjectTemp%\ShortcutsCentro\FreeShc.exe,"/type:icon /env:ProjectInfo /pi:%ProjectTemp%\ShortcutsCentro\ProjectInfo.ini |#1|#3|#4|#5|[scparam]#6[/scparam]|#7|#8|[scparam]#9[/scparam]|#2|"
Else,ShellExecute,Hide,%ProjectTemp%\ShortcutsCentro\FreeShc.exe,"/type:loader /lf:%target_sys%\ExpEnvVar.txt#$cPE1Shc /env:ProjectInfo /pi:%ProjectTemp%\ShortcutsCentro\ProjectInfo.ini /lwm:UTF16LE /tl:disable /pre:PE1Shc /qlf |#1|#3|#4|#5|[scparam]#6[/scparam]|#7|#8|[scparam]#9[/scparam]|#2|"

Regards,
Galapo.
« Last Edit: November 11, 2010, 05:26:07 PM by Galapo »

 

Powered by EzPortal