yaP - yet another Portablizer

If you are currently developing portable freeware or planning to do so, use this forum to discuss technical implementation, seek out like-minded developers for partnership, or solicit interested users for beta testing.

Moderators: usdcs, Andrew Lee, webfork

Message
Author
User avatar
tproli
Posts: 1165
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: yaP - yet another Portablizer

#391 Post by tproli » Sat Jan 07, 2017 6:18 am

Interesting, thanks.

I just re-analyzed v0.7.1.4 which had 1/54 before but now it shows 6/54.
v0.7.1.0 had 2/54 and now has 7.

User avatar
Midas
Posts: 4067
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: yaP - yet another Portablizer

#392 Post by Midas » Mon Jan 30, 2017 7:13 am

Just noting a message I was faced with while updating the Foxit Reader official yaP launcher for the latest versions of both...

    Image
Last edited by Midas on Sat Feb 10, 2018 5:02 am, edited 1 time in total.

starstuff
Posts: 61
Joined: Sat Mar 09, 2013 7:06 pm

Re: yaP - yet another Portablizer

#393 Post by starstuff » Thu Mar 16, 2017 9:08 pm

helo tproli!

I don't know if this is a bug or not, I'm trying to make a portable Display Fusion using yap, the problem is the regkey after run export of registry is not the same, so I'm using the regimport at the moment

Code: Select all

; configuration file for yaP v0.7.x (http://rolandtoth.hu/yaP/)
; application name: Display Fusion
; version: 8
; website:

[GENERAL]
application =  App\DisplayFusion\DisplayFusion.Exe
!multiple = -1
; commandline =
; workdir =

[BEFORE]
;regkey = HKCU\Software\Binary Fortress Software\DisplayFusion :: {YAPROOT}\Data\displayfusion.reg
regimport = {YAPROOT}\Data\displayfusion.reg

[AFTER]
-regkey = HKCU\Software\Binary Fortress Software
The other regkeys are export fine, except for this regkey which changes.

[HKEY_CURRENT_USER\Software\Binary Fortress Software\DisplayFusion\Triggers]

Here's the 2 comparison of the regkey files

Good Registry Key - This is the correct

Code: Select all

[HKEY_CURRENT_USER\Software\Binary Fortress Software\DisplayFusion\Triggers\7cd6badb-81cb-425d-a74f-f2ffa20c7c1e]
"BFAPIAppVersion"="8.1.2.0"
"BFAPIDataVersion"="1"
"BFAPIIsDeleted"="0"
"BFAPIDateModifiedUTC"="636244544139149214"
"BFAPIMachineID"="ALOHA"
"BFAPIItemHashMD5"="93a3d896beeb932d9e15cd01bc0702f2"
"TriggerData"=hex(1):7b,00,0d,00,0a,00,09,00,22,00,54,00,72,00,69,00,67,00,67,\
  00,65,00,72,00,49,00,73,00,45,00,6e,00,61,00,62,00,6c,00,65,00,64,00,22,00,\
  3a,00,20,00,74,00,72,00,75,00,65,00,2c,00,0d,00,0a,00,09,00,22,00,54,00,72,\
  00,69,00,67,00,67,00,65,00,72,00,45,00,76,00,65,00,6e,00,74,00,22,00,3a,00,\
  20,00,32,00,2c,00,0d,00,0a,00,09,00,22,00,54,00,72,00,69,00,67,00,67,00,65,\
  00,72,00,46,00,72,00,65,00,71,00,75,00,65,00,6e,00,63,00,79,00,22,00,3a,00,\
  20,00,30,00,2c,00,0d,00,0a,00,09,00,22,00,54,00,72,00,69,00,67,00,67,00,65,\
  00,72,00,53,00,6f,00,72,00,74,00,4f,00,72,00,64,00,65,00,72,00,22,00,3a,00,\
  20,00,33,00,2c,00,0d,00,0a,00,09,00,22,00,54,00,72,00,69,00,67,00,67,00,65,\
  00,72,00,54,00,69,00,6d,00,65,00,72,00,49,00,6e,00,74,00,65,00,72,00,76,00,\
  61,00,6c,00,53,00,45,00,43,00,22,00,3a,00,20,00,30,00,2c,00,0d,00,0a,00,09,\
  00,22,00,53,00,74,00,6f,00,70,00,50,00,72,00,6f,00,63,00,65,00,73,00,73,00,\
  69,00,6e,00,67,00,4f,00,74,00,68,00,65,00,72,00,54,00,72,00,69,00,67,00,67,\
  00,65,00,72,00,73,00,22,00,3a,00,20,00,66,00,61,00,6c,00,73,00,65,00,2c,00,\
  0d,00,0a,00,09,00,22,00,4d,00,61,00,74,00,63,00,68,00,55,00,73,00,65,00,50,\
  00,72,00,6f,00,63,00,65,00,73,00,73,00,50,00,61,00,74,00,68,00,22,00,3a,00,\
  20,00,74,00,72,00,75,00,65,00,2c,00,0d,00,0a,00,09,00,22,00,4d,00,61,00,74,\
  00,63,00,68,00,50,00,72,00,6f,00,63,00,65,00,73,00,73,00,50,00,61,00,74,00,\
  68,00,22,00,3a,00,20,00,22,00,57,00,67,00,41,00,36,00,41,00,46,00,77,00,41,\
  00,61,00,41,00,42,00,76,00,41,00,47,00,30,00,41,00,5a,00,51,00,42,00,63,00,\
  41,00,47,00,49,00,41,00,61,00,51,00,42,00,75,00,41,00,46,00,77,00,41,00,57,\
  00,67,00,42,00,70,00,41,00,47,00,30,00,41,00,52,00,41,00,42,00,6c,00,41,00,\
  48,00,4d,00,41,00,61,00,77,00,42,00,30,00,41,00,47,00,38,00,41,00,63,00,41,\
  00,42,00,58,00,41,00,47,00,6b,00,41,00,61,00,77,00,42,00,70,00,41,00,46,00,\
  77,00,41,00,65,00,67,00,42,00,70,00,41,00,47,00,30,00,41,00,4c,00,67,00,42,\
  00,6c,00,41,00,48,00,67,00,41,00,5a,00,51,00,41,00,3d,00,22,00,2c,00,0d,00,\
  0a,00,09,00,22,00,4d,00,61,00,74,00,63,00,68,00,55,00,73,00,65,00,50,00,72,\
  00,6f,00,63,00,65,00,73,00,73,00,43,00,6f,00,6d,00,6d,00,61,00,6e,00,64,00,\
  4c,00,69,00,6e,00,65,00,22,00,3a,00,20,00,66,00,61,00,6c,00,73,00,65,00,2c,\
  00,0d,00,0a,00,09,00,22,00,4d,00,61,00,74,00,63,00,68,00,50,00,72,00,6f,00,\
  63,00,65,00,73,00,73,00,43,00,6f,00,6d,00,6d,00,61,00,6e,00,64,00,4c,00,69,\
  00,6e,00,65,00,22,00,3a,00,20,00,22,00,22,00,2c,00,0d,00,0a,00,09,00,22,00,\
  4d,00,61,00,74,00,63,00,68,00,55,00,73,00,65,00,57,00,69,00,6e,00,64,00,6f,\
  00,77,00,54,00,65,00,78,00,74,00,22,00,3a,00,20,00,66,00,61,00,6c,00,73,00,\
  65,00,2c,00,0d,00,0a,00,09,00,22,00,4d,00,61,00,74,00,63,00,68,00,57,00,69,\
  00,6e,00,64,00,6f,00,77,00,54,00,65,00,78,00,74,00,22,00,3a,00,20,00,22,00,\
  22,00,2c,00,0d,00,0a,00,09,00,22,00,4d,00,61,00,74,00,63,00,68,00,55,00,73,\
  00,65,00,57,00,69,00,6e,00,64,00,6f,00,77,00,43,00,6c,00,61,00,73,00,73,00,\
  22,00,3a,00,20,00,66,00,61,00,6c,00,73,00,65,00,2c,00,0d,00,0a,00,09,00,22,\
  00,4d,00,61,00,74,00,63,00,68,00,57,00,69,00,6e,00,64,00,6f,00,77,00,43,00,\
  6c,00,61,00,73,00,73,00,22,00,3a,00,20,00,22,00,22,00,2c,00,0d,00,0a,00,09,\
  00,22,00,4d,00,61,00,74,00,63,00,68,00,55,00,73,00,65,00,4d,00,6f,00,6e,00,\
  69,00,74,00,6f,00,72,00,50,00,72,00,6f,00,66,00,69,00,6c,00,65,00,22,00,3a,\
  00,20,00,66,00,61,00,6c,00,73,00,65,00,2c,00,0d,00,0a,00,09,00,22,00,4d,00,\
  61,00,74,00,63,00,68,00,4d,00,6f,00,6e,00,69,00,74,00,6f,00,72,00,50,00,72,\
  00,6f,00,66,00,69,00,6c,00,65,00,22,00,3a,00,20,00,22,00,30,00,30,00,30,00,\
  30,00,30,00,30,00,30,00,30,00,2d,00,30,00,30,00,30,00,30,00,2d,00,30,00,30,\
  00,30,00,30,00,2d,00,30,00,30,00,30,00,30,00,2d,00,30,00,30,00,30,00,30,00,\
  30,00,30,00,30,00,30,00,30,00,30,00,30,00,30,00,22,00,2c,00,0d,00,0a,00,09,\
  00,22,00,41,00,63,00,74,00,69,00,6f,00,6e,00,73,00,22,00,3a,00,20,00,5b,00,\
  0d,00,0a,00,09,00,09,00,22,00,41,00,63,00,74,00,69,00,6f,00,6e,00,22,00,3a,\
  00,20,00,7b,00,0d,00,0a,00,09,00,09,00,09,00,22,00,54,00,72,00,69,00,67,00,\
  67,00,65,00,72,00,41,00,63,00,74,00,69,00,6f,00,6e,00,22,00,3a,00,20,00,39,\
  00,39,00,39,00,2c,00,0d,00,0a,00,09,00,09,00,09,00,22,00,4d,00,61,00,74,00,\
  63,00,68,00,44,00,65,00,6c,00,61,00,79,00,4d,00,53,00,22,00,3a,00,20,00,30,\
  00,2c,00,0d,00,0a,00,09,00,09,00,09,00,22,00,41,00,63,00,74,00,69,00,6f,00,\
  6e,00,4d,00,6f,00,6e,00,69,00,74,00,6f,00,72,00,49,00,44,00,22,00,3a,00,20,\
  00,30,00,2c,00,0d,00,0a,00,09,00,09,00,09,00,22,00,41,00,63,00,74,00,69,00,\
  6f,00,6e,00,46,00,75,00,6e,00,63,00,74,00,69,00,6f,00,6e,00,49,00,44,00,22,\
  00,3a,00,20,00,22,00,61,00,62,00,32,00,30,00,61,00,64,00,64,00,64,00,2d,00,\
  64,00,31,00,36,00,63,00,2d,00,34,00,31,00,32,00,66,00,2d,00,38,00,36,00,32,\
  00,32,00,2d,00,37,00,32,00,62,00,31,00,31,00,64,00,34,00,63,00,39,00,64,00,\
  63,00,64,00,22,00,2c,00,0d,00,0a,00,09,00,09,00,09,00,22,00,41,00,63,00,74,\
  00,69,00,6f,00,6e,00,53,00,69,00,7a,00,65,00,4c,00,6f,00,63,00,61,00,74,00,\
  69,00,6f,00,6e,00,52,00,65,00,63,00,74,00,58,00,22,00,3a,00,20,00,30,00,2c,\
  00,0d,00,0a,00,09,00,09,00,09,00,22,00,41,00,63,00,74,00,69,00,6f,00,6e,00,\
  53,00,69,00,7a,00,65,00,4c,00,6f,00,63,00,61,00,74,00,69,00,6f,00,6e,00,52,\
  00,65,00,63,00,74,00,59,00,22,00,3a,00,20,00,30,00,2c,00,0d,00,0a,00,09,00,\
  09,00,09,00,22,00,41,00,63,00,74,00,69,00,6f,00,6e,00,53,00,69,00,7a,00,65,\
  00,4c,00,6f,00,63,00,61,00,74,00,69,00,6f,00,6e,00,52,00,65,00,63,00,74,00,\
  57,00,22,00,3a,00,20,00,30,00,2c,00,0d,00,0a,00,09,00,09,00,09,00,22,00,41,\
  00,63,00,74,00,69,00,6f,00,6e,00,53,00,69,00,7a,00,65,00,4c,00,6f,00,63,00,\
  61,00,74,00,69,00,6f,00,6e,00,52,00,65,00,63,00,74,00,48,00,22,00,3a,00,20,\
  00,30,00,2c,00,0d,00,0a,00,09,00,09,00,09,00,22,00,41,00,63,00,74,00,69,00,\
  6f,00,6e,00,53,00,69,00,7a,00,65,00,4c,00,6f,00,63,00,61,00,74,00,69,00,6f,\
  00,6e,00,49,00,73,00,4d,00,61,00,78,00,69,00,6d,00,69,00,7a,00,65,00,64,00,\
  22,00,3a,00,20,00,66,00,61,00,6c,00,73,00,65,00,2c,00,0d,00,0a,00,09,00,09,\
  00,09,00,22,00,41,00,63,00,74,00,69,00,6f,00,6e,00,4e,00,6f,00,74,00,69,00,\
  66,00,69,00,63,00,61,00,74,00,69,00,6f,00,6e,00,54,00,65,00,78,00,74,00,22,\
  00,3a,00,20,00,22,00,22,00,0d,00,0a,00,09,00,09,00,7d,00,0d,00,0a,00,09,00,\
  5d,00,0d,00,0a,00,7d,00,00,00
Bad Registry Key - This is form after regkey export

Code: Select all

[HKEY_CURRENT_USER\Software\Binary Fortress Software\DisplayFusion\Triggers\7cd6badb-81cb-425d-a74f-f2ffa20c7c1e]
"BFAPIAppVersion"="8.1.2.0"
"BFAPIDataVersion"="1"
"BFAPIIsDeleted"="0"
"BFAPIDateModifiedUTC"="636244544229149214"
"BFAPIMachineID"="ALOHA"
"BFAPIItemHashMD5"="7ac3535fb297ad29be072dbe897c5d6a"
"TriggerData"="{
	\"TriggerIsEnabled\": true,
	\"TriggerEvent\": 0,
	\"TriggerFrequency\": 0,
	\"TriggerSortOrder\": 3,
	\"TriggerTimerIntervalSEC\": 0,
	\"StopProcessingOtherTriggers\": false,
	\"MatchUseProcessPath\": false,
	\"MatchProcessPath\": \"\",
	\"MatchUseProcessCommandLine\": false,
	\"MatchProcessCommandLine\": \"\",
	\"MatchUseWindowText\": false,
	\"MatchWindowText\": \"\",
	\"MatchUseWindowClass\": false,
	\"MatchWindowClass\": \"\",
	\"MatchUseMonitorProfile\": false,
	\"MatchMonitorProfile\": \"00000000-0000-0000-0000-000000000000\",
	\"Actions\": [
	]
}"
What could be the problem here?

cheers!

User avatar
tproli
Posts: 1165
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: yaP - yet another Portablizer

#394 Post by tproli » Mon Mar 20, 2017 3:16 pm

Looks like you would need to use reg save instead reg export yaP is using.

I'm not familiar with reg save/restore (and DOS in general) but here is a config with batch files that seem to work, though I can't test if Triggers are working.
Note that this requires admin rights too.

Code: Select all

; configuration file for yaP v0.7.x (http://rolandtoth.hu/yaP/)
; application name: Display Fusion
; version: 8
; website:

[GENERAL]
application =  App\DisplayFusion\DisplayFusion.Exe
!multiple = -1
!admin = 1

[BEFORE]
batch = before.bat

[AFTER]
batch = after.bat
before.bat:

Code: Select all

@echo off

:: backup registry
REG DELETE "HKCU\Software\Binary Fortress Software\DisplayFusion_backup" /f
REG COPY "HKCU\Software\Binary Fortress Software\DisplayFusion" "HKCU\Software\Binary Fortress Software\DisplayFusion_backup" /s /f
REG DELETE "HKCU\Software\Binary Fortress Software\DisplayFusion" /f
REG ADD "HKCU\Software\Binary Fortress Software\DisplayFusion"

:: restore registry
REG RESTORE "HKCU\Software\Binary Fortress Software\DisplayFusion" "%~dp0settings.hiv"
after.bat:

Code: Select all

@echo off

:: save registry
REG SAVE "HKCU\Software\Binary Fortress Software\DisplayFusion" "%~dp0settings.hiv" /y

:: cleanup registry
REG DELETE "HKCU\Software\Binary Fortress Software\DisplayFusion" /f
REG COPY "HKCU\Software\Binary Fortress Software\DisplayFusion_backup" "HKCU\Software\Binary Fortress Software\DisplayFusion" /s /f
REG DELETE "HKCU\Software\Binary Fortress Software\DisplayFusion_backup" /f

Onesimus Prime
Posts: 130
Joined: Wed Sep 05, 2007 8:42 pm

yaP & roaming profiles

#395 Post by Onesimus Prime » Thu Mar 23, 2017 10:10 am

Hi tproli,
First, thanks for an awesome program!

And now for a bug report...
Sometimes I am in an environment that uses Roaming Profiles, where %AppData% actually resolves to a UNC network location. yaP doesn't want to work with %AppData% files like this at all.

So imagine we've got an %AppData% settings path that actually resolves to this:
\\FileServer\HomeDir$\UserName\AppData\Roaming\More.Program.Settings.xml

It works fine on a personal PC without roaming users; More.Program.Settings.xml gets tucked away nicely in the "MyProgram yaPped" folder as seen below (no huge nest of subfolders created) and gets appropriately moved to and from %AppData%.

Code: Select all

MyProgram yaPped [parent folder]
   App [folder]
   YapLauncher.exe
   YapLauncher.ini
   More.Program.Settings.xml [is moved okay in non-roaming situations]
   settings.reg
However, in a Roaming environment, the settings file would be left behind in %AppData% on the network drive, and multiple levels of corresponding empty folders are created under the program folder:

MyProgram yaPped\FileServer\HomeDir$\UserName\AppData\Roaming

I hope this was a clear enough description; I can try to further clarify if need be.

User avatar
tproli
Posts: 1165
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: yaP - yet another Portablizer

#396 Post by tproli » Thu Mar 23, 2017 10:19 am

yaP is not tested with UNC paths and I suppose it doesn't play nice with them. If it's only one (or a few) files perhaps you could use yaP keywords to copy settings files back and forth.

Or run 3rd party apps on BEFORE/AFTER like this to handle UNC paths (that was the first I found via search).

starstuff
Posts: 61
Joined: Sat Mar 09, 2013 7:06 pm

Re: yaP - yet another Portablizer

#397 Post by starstuff » Fri Mar 24, 2017 7:31 pm

Thank you tproli ! It is working now, I'm still testing the app.

What is the difference between the reg in yap and reg in batch?

@Onesimus Prime
have you tried using symlink? the main setting would be on your computer, and create symlinks to the unc paths

User avatar
tproli
Posts: 1165
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: yaP - yet another Portablizer

#398 Post by tproli » Sat Mar 25, 2017 2:28 pm

yaP uses REG EXPORT internally and not REG SAVE. In case of DisplayFusion it seems that EXPORT cannot export data properly.

starstuff
Posts: 61
Joined: Sat Mar 09, 2013 7:06 pm

Re: yaP - yet another Portablizer

#399 Post by starstuff » Sat Mar 25, 2017 6:20 pm

Thank you tproli!

ripu
Posts: 17
Joined: Sat Aug 30, 2014 9:18 am

Questions on 64-bit yaP

#400 Post by ripu » Tue Apr 11, 2017 7:03 am

  1. Does the yapX64.exe used for 64-bit apps or for 32-bit apps in 64-bit OS? I mean is it for 64-bit apps or for 64-bit OS?
  2. I rename yap.exe to something like MyApp-yap.exe and the same with ini MyApp-yap.ini. Can I also rename yapX64.exe to Anything.exe along with the corresponding ini?
  3. If I click yapX64.exe and there is no corresponding yapX64.ini, will it use yap.ini?
  4. Should the names of yap.exe and yapX64.exe be similar for them to work? Can I rename both to different names like abc.exe and xyz.exe for the same app?
  5. Suppose I set up application = App\5.exe :: MyFolder\3.exe in the yap.ini. Now if I click yap.exe on a 64-bit OS, will the 3.exe run?

User avatar
tproli
Posts: 1165
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: yaP - yet another Portablizer

#401 Post by tproli » Tue Apr 11, 2017 8:15 am

Hi,

sorry I can't test things atm so these answers are untested.

1. you'll need yapX64 if your target applicaton is x64 AND you can't access 64bit registry locations using a 32bit launcher, see eg. here. Normally 32bit yaP is OK. Otoh 64bit exe will be launched on a 64bit system only, otherwise falls back to 32bit target.
2. Sure, that should work. Add a "message" keyword only and see if it comes up or not.
3. I think yes. Again, do a test run with "message" keyword only.
4. No, it's up to you how you name them. Just make sure the corresponding ini files are matching with the yap.exe names, or use one yaP.ini for both.
5. Yes, 3.exe should be launched: http://rolandtoth.hu/yaP/#keyword_application

oO0XX0Oo
Posts: 1
Joined: Fri Jul 21, 2017 4:47 am

Re: yaP - yet another Portablizer

#402 Post by oO0XX0Oo » Fri Jul 21, 2017 4:55 am

Hi,

is the source code for 0.7.1 available somewhere?

E.g. trying to use replaceline with a UTF-16 LE file fails
and I'd like to fix that...

User avatar
Midas
Posts: 4067
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: yaP - yet another Portablizer

#403 Post by Midas » Wed Feb 14, 2018 11:52 am

oO0XX0Oo wrote:
Fri Jul 21, 2017 4:55 am
E.g. trying to use replaceline with a UTF-16 LE file fails and I'd like to fix that...
I was coming here to report a problem and when I read that I recalled this isn't the first time I have run into this problem. I converted the file from UTF-16 to ANSI-1252 and presto, it works.

If only I could get back the last hour spent scratching my head... :o

Another thing that apparently isn't working well is variable substitution. I tested '%desktop%' and '%USERPROFILE%' with yaP v7.1.5 on Windows 7 x64 by adding a 'message' step and got them displayed literally.

What worked was setting a 'uservar' with '%USERPROFILE%\Desktop' and then using it in 'replaceline'...

uwotm8
Posts: 13
Joined: Mon Mar 23, 2015 2:30 am

Report Critical Bug

#404 Post by uwotm8 » Thu Feb 22, 2018 6:02 am

Report CRITICAL BUG:
if the path starts with a comma (","), then yAP will DELETE ALL the LEVEL up, please fix.
Here is more detailed a topic where people are faced with this:
https://forum.ru-board.com/topic.cgi?fo ... ic=49047#3

Post Reply