Jump to content











Photo
- - - - -

[Win7PE_SE] %PE_Programs% variable is wrongly being translated after update

%pe_programs% update

  • Please log in to reply
14 replies to this topic

#1 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 04 December 2011 - 10:45 AM

Hello folks,

WHAT I DID: Updated my Win7PE_SE project through the "download" button using the "recommended" option and the "w7pese.cwcodes.net" server yesterday (12/03/2011 - afternoon).

THE PROBLEM: I have create a few scripts that use registry entries to integrate programs into PE environment. Like:

reg_add,0x1,"%reg%MicrosoftWindows NTCurrentVersionImage File Execution Optionstaskmgr.exe","Debugger","#$q%PE_Programs%%ProgramFolder%%ProgramEXE%#$q"

BEFORE THE WIN7PE_SE UPDATE:

When the RunFromRam command is True --> %PE_Programs%%ProgramFolder%%ProgramEXE% becomes --> X:Program FilesProcess HackerProcessHacker.exe (WORK!)
When the RunFromRam command is False --> %PE_Programs%%ProgramFolder%%ProgramEXE% becomes --> Y:ProgramsProcess HackerProcessHacker.exe (WORK!)

AFTER THE WIN7PE_SE UPDATE:

When the RunFromRam command is True --> %PE_Programs%%ProgramFolder%%ProgramEXE% becomes --> %SystemDrive%Program FilesProcess HackerProcessHacker.exe (DO NOT WORK!)
When the RunFromRam command is False --> %PE_Programs%%ProgramFolder%%ProgramEXE% becomes --> Y:ProgramsProcess HackerProcessHacker.exe (WORK!)

LOG FILE FROM A BUILD WITH THE PROBLEM: http://www.mediafire...ueet867zekjia1p

Now, when I set RunFromRam command equal True, my projects do not work as expected. Can you help me?

Best regards,

Aeolis

Edited by Aeolis, 04 December 2011 - 11:02 AM.


#2 paraglider

paraglider

    Gold Member

  • .script developer
  • 1743 posts
  • Location:NC,USA
  •  
    United States

Posted 04 December 2011 - 01:06 PM

In script.project just change:

%SystemDrive%=#$pSystemDrive#$p

to:

%SystemDrive%=x:

#3 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 04 December 2011 - 01:30 PM

Hello folks,

Thank you paraglider! I would like to know if anybody has a clue about why this happened now? I have never had this problem before.

Best regards,

Aoelis

#4 sbaeder

sbaeder

    Gold Member

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

Posted 04 December 2011 - 02:49 PM

well, without a revision control systemin place (like git, cvs, svn, etc.) it is hard to track exactly what changed and when. But my guess is that if you look at the file in the last "zip" released, it would be different.

#5 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 04 December 2011 - 03:24 PM

Hello folks,

Thank you sbaeder! I have checked the base .zip file I have used (Win7PE_SE_2011_10_20.7z) and in the "script.project" file I've found:

%SystemDrive%=#$pSystemDrive#$p

So, I don't understand how can it be possible. Before the update (12/03/2011 - afternoon) I have never experienced the problem described in post #1 and after the update the problem just popped-up.

Best regards,

Aeolis

#6 sbaeder

sbaeder

    Gold Member

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

Posted 04 December 2011 - 06:10 PM

Make sure that no other script was changing this - like the script that sets the CD drive to "Y", etc...hard to find exact cause unless you "diff" all the new files against the files in the archive...

#7 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 04 December 2011 - 06:37 PM

Hello folks,

Thank you again sbaeder! Well, I checked the "CDDrive_X_Y.script" version and the version I am using right now is version 6. The version that came with the .zip file I have used (Win7PE_SE_2011_10_20.7z) was version 4. Hope it helps.

sbaeder do you agree with paraglider solution? Is it the best one? I do fear changing project core variables.

Best regards,

Aeolis

#8 RoyM

RoyM

    Frequent Member

  • .script developer
  • 420 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 04 December 2011 - 09:50 PM

When the RunFromRam command is True --> %PE_Programs%%ProgramFolder%%ProgramEXE% becomes --> %SystemDrive%Program FilesProcess HackerProcessHacker.exe (DO NOT WORK!)

Then just change the one line in your script:
If,RunFromRam,Equal,True,reg_add,0x1,"%reg%MicrosoftWindows NTCurrentVersionImage File Execution Optionstaskmgr.exe","Debugger","X:Program FilesProcess HackerProcessHacker.exe"

#9 sbaeder

sbaeder

    Gold Member

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

Posted 05 December 2011 - 01:06 AM

Yes, it should be OK, but not sure why the use of the %SystemDrive% isn't working. Inside the running PE, open a cmd shell window, and use the "set" command to list out the values of the environment variables and see what it is "set" to...

Should be X: in the PE. (on a running system, probably would be "C:")

But - yes, it is OK to make it be "X:" since that is the default for a PE.

#10 homes32

homes32

    Gold Member

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

Posted 05 December 2011 - 01:36 AM

you can also try using RegWriteBoot RegAddBoot as some programs don't correctly expand the value of environment variables. that's why this command was created.

#11 sbaeder

sbaeder

    Gold Member

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

Posted 05 December 2011 - 04:35 PM

did you mean http://code.google.c...wiki/regaddboot RegAddBoot ??

#12 homes32

homes32

    Gold Member

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

Posted 05 December 2011 - 05:06 PM

did you mean http://code.google.c...wiki/regaddboot RegAddBoot ??

yep. sorry. it was a late night. :)

#13 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 05 December 2011 - 05:48 PM

Independent that homes32 again has been on the moon (This time not for 4 years, but only for one day :cheers: ):

The "Programs" is an invention of Nightman, who disappeared here a long time ago.
This has never been an "official" name for the folder where the apps are stored.

Why do we still try to fullfill his invention "regardless of what it costs"?

A well structured and intelligent project knows at least when it builds the final ISO / UFD, about the PE configuration and therefore about "everything necessary".

The games with y:-drive etc. are workarounds (better said "walkarounds") and should disappear anywhen.

Peter

#14 homes32

homes32

    Gold Member

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

Posted 05 December 2011 - 05:50 PM

The "Programs" is an invention of Nightman, who disappeared here a long time ago.
This has never been an "official" name for the folder where the apps are stored.

I believe nightman carried over Programs dir (on CD) from BartPE

it's nice for consistency. and also gets rid of spaces in path (for bootloaders and others that dislike such things...)

offtopic: anyone want to buy a moon rock? ;)

#15 sbaeder

sbaeder

    Gold Member

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

Posted 05 December 2011 - 10:34 PM

The "Programs" is an invention of Nightman, who disappeared here a long time ago.
This has never been an "official" name for the folder where the apps are stored.

I would say more that it is a "convention", since it is in common use as a place that is outside the RAM image that get packed into Boot.wim. I guess if there is a better way to specify that (which we can standardize on), then we should propose it, document it well, discuss it, and make it "official".





Also tagged with one or more of these keywords: %pe_programs%, update

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users