Topic: Call Macro  (Read 553 times)

0 Members and 1 Guest are viewing this topic.

Call Macro
« on: January 14, 2018, 03:23:40 PM »

topgundcp

  • Jr. Chef
  • **
  • Location: San Jose, California
  • Date Registered: Oct 2015
  • Posts: 67
In some plugins, there's a macro: Call,TargetAppdata
which will load a variable %TargetAppdata%.
In my case: E:\W10P\Target\Win10PESE\Users\Default\AppData\Roaming

Is there a similar Macro for TargetLocalAppdata ?
« Last Edit: January 15, 2018, 02:30:25 AM by Lancelot »

Re: Call Macro
« Reply #1 on: January 15, 2018, 02:29:46 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7781
See Call Topic at
Macro Library
http://theoven.org/index.php?board=14.0

Re: Call Macro
« Reply #2 on: January 15, 2018, 12:17:54 PM »

topgundcp

  • Jr. Chef
  • **
  • Location: San Jose, California
  • Date Registered: Oct 2015
  • Posts: 67
See Call Topic at
Macro Library
http://theoven.org/index.php?board=14.0
Great, That's what I was looking for. I was using: %LocalAppData%=%TargetDir%\Users\Default\AppData\Local

instead of: Call,TargetLocalSettingsAppdata

However, It would have been nice if it was defined as: Call,TargetLocalAppdata so it is consistent with Windows Environment variable.

Thank You  :thumbsup:
« Last Edit: January 15, 2018, 12:23:39 PM by topgundcp »

Re: Call Macro
« Reply #3 on: January 15, 2018, 02:17:41 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7781
I agree it sounds nicer now
Call,TargetLocalAppdata
or maybe
Call,TargetAppdataLocal

Still, I do not want to check all plugins on servers to make such change for now.


More info:
on xp/2k3 (Gena) relevant folder is
C:\Documents and Settings\<username>\Local Settings\Application Data\
on nt6x (SE)
C:\Users\<username>\AppData\Local

(You can see better examples on Call topic for SE and Gena difference)

That is the reason
Call,TargetLocalSettingsAppdata
name given some years ago.

:turtle:

Re: Call Macro
« Reply #4 on: January 15, 2018, 02:31:25 PM »

bob.omb

  • Chef
  • ***
  • Location: USA
  • Date Registered: Jul 2017
  • Posts: 317
Also as a side note, not quite related but close...

Call,TargetAUAppdata

%TargetAUAppdata%


Would probably be better for PEBakery as -->

Call,ProgramData

%ProgramData%
« Last Edit: January 15, 2018, 02:31:45 PM by bob.omb »

Re: Call Macro
« Reply #5 on: January 15, 2018, 02:57:31 PM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7781
Hi bob.omb

PEBakery has nothing to do on these adjustments.

Sadly, since PEBakery also follow wb wrong design, it also cause misunderstanding. ex: your post

unlike Bart's PEBuilder, both PEBakery and wb are batch engines like cmd.exe -->can not build anything alone and have nothing related to project.


*
About Adjustments through SE/Gena Projects:

As you may notice from Call topic
Target... -> gives target folder
Target....OS -> gives folder path after boot (to write registry ;) )
Host.... -> about host

This way nothing mixes
ex:
Call,ProgramData
for a new user :
-->
which program data
+ the one to copy to ( Call,TargetAUAppdata )
+ the one to write registry ( Call,TargetAUAppdataOS )
+ the one at hostos ( I guess Call,HostAppDataCommonDir )
Code: [Select]
[Process]
If,ExistFile,%api%,AddVariables,%api%,ApiVar,GLOBAL
//-
Call,TargetAUAppdata
Call,TargetAUAppdataOS
Call,HostAppDataCommonDir
Echo,TargetAUAppdata=%TargetAUAppdata%,Warn
Echo,TargetAUAppdataOS=%TargetAUAppdataOS%,Warn
Echo,HostAppDataCommonDir=%HostAppDataCommonDir%,Warn
Message,TargetAUAppdata=%TargetAUAppdata%,Information
Message,TargetAUAppdataOS=%TargetAUAppdataOS%,Information
Message,HostAppDataCommonDir=%HostAppDataCommonDir%,Information
:wink:

:turtle:
« Last Edit: January 15, 2018, 02:58:17 PM by Lancelot »

Re: Call Macro
« Reply #6 on: January 15, 2018, 07:29:33 PM »

topgundcp

  • Jr. Chef
  • **
  • Location: San Jose, California
  • Date Registered: Oct 2015
  • Posts: 67
The reason I posted earlier was, I was looking at Macro_library.script where all the Call's were defined
and Script.project where most Variables were defined.

For: Call, TargetAppData  =====> defined in Windows 10 as %AppData% which is consistent
For: Call, TargetLocalSettingsAppData   ====> %LocalAppData% which is not consistent and that's why I had hard time finding it.
« Last Edit: January 15, 2018, 07:33:35 PM by topgundcp »

Re: Call Macro
« Reply #7 on: January 16, 2018, 02:05:06 AM »

Lancelot

  • Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7781
The reason I posted earlier was, I was looking at Macro_library.script where all the Call's were defined

Macro Library plugin already have links to relevant topics on Plugin Interface

Target.... and Host... are very consistent used on many plugins

And There is a section deserved to Macro Library plugin at http://TheOven.org/

that's why I had hard time finding it.
Well with all links and sections provided, info written, it should not be hard.

Anyway, I hope things works fine on your side to write your plugins.

 

Powered by EzPortal