Jump to content











Photo
- - - - -

Win7PE SE Script Variables

variables script win7pe

  • Please log in to reply
4 replies to this topic

#1 carloscape

carloscape

    Frequent Member

  • Advanced user
  • 108 posts
  •  
    Honduras

Posted 13 September 2011 - 09:49 PM

I am currently working on a script and I wanted to change the specific registry paths to variables.

I know that %PE_Programs% refers to the PE Program Files folder. What I want to know is the variable that refers to ProgramData. The idea is to use a variable instead of X:\ProgramData. Is there an updated list of the available variables? I already saw Paragliders help page . As well as the Winbuilder help page.

#2 homes32

homes32

    Gold Member

  • .script developer
  • 1021 posts
  • Location:Minnesota
  •  
    United States

Posted 14 September 2011 - 01:23 AM

project globals are defined in script.project and is a good place to look if you are wondering.
win7pe_se does not have a global for ProgramData but for my scripts I use

If,NOT,EXISTDIR,"%TargetDir%\ProgramData\",DirMake,"%TargetDir%\ProgramData\"

FileCopy,"%GlobalTemplates%\%ProgramFolder%\someDir\*.*","%TargetDir%\ProgramData"


if you need to use in a bunch of scripts you could create the global yourself:

by manually adding the following code the the variables section of script.project

%ProgramData%=%targetdir%\ProgramData


or run the following code in one of your scripts

Set,%ProgramData%,%targetdir%\ProgramData,PERMANENT



if you just want it created for the duration of the build

Set,%ProgramData%,%targetdir%\ProgramData,GLOBAL


regards,
Homes32

#3 carloscape

carloscape

    Frequent Member

  • Advanced user
  • 108 posts
  •  
    Honduras

Posted 14 September 2011 - 03:43 PM

Thank you

#4 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1335 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 14 September 2011 - 05:04 PM

Just to add to this...

The variables - even the ones like %PE_Programs% are more of a convention among projects - just like support for the API...

Looks like we need to think about this more and "get with the times" now that even Win8 developer preview is out.

#5 homes32

homes32

    Gold Member

  • .script developer
  • 1021 posts
  • Location:Minnesota
  •  
    United States

Posted 14 September 2011 - 06:50 PM

Win8 might just be a good opportunity for a complete project rewrite instead of doing the hack job we did with PE3 on top of PE2.





Also tagged with one or more of these keywords: variables, script, win7pe

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users