Topic: Error on the ?-Explorer.script  (Read 1346 times)

Error on the ?-Explorer.script
« on: January 26, 2017, 04:47:21 PM »

Rui Paz

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Mar 2011
  • Posts: 47
Hi,

Both scripts 1-explorer.script and 5-explorer.script include the bellow line in more than one place
Code: [Select]
FileCopy,%ProjectTemp%\User.bmp,"%TargetDir%\ProgramData\Microsoft\User Account Pictures"

The problem is that the folder User Account Pictures doesn't exist so actually this creates a file named User Account Pictures instead of the user.bmp inside the folder!

Because of this if we enable the Advanced option Enable 'switch user to Admin' on the Display script the build will fail with the error
Quote
  (xDisplay.script) DirMake - Failed to create directory: [%BaseDir%\Target\Win7PESE\ProgramData\Microsoft\User Account Pictures]: Cannot create a file when that file already exists

I traced the problem to the Explorer script, the error isn't created by the xDisplay script, its the explorer script that creates the file instead of checking if the folder actually exists.

To be on the safe side probably is better to update all the scripts to check the existence of the folder and if is missing create it or...

Re: Error on the ?-Explorer.script
« Reply #1 on: January 26, 2017, 10:20:38 PM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
Hi Rui Paz,

I added the creation of this folder in 1 - Copy Files plugin  , thanks  :thumbsup:

Re: Error on the ?-Explorer.script
« Reply #2 on: January 26, 2017, 11:01:07 PM »

Rui Paz

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Mar 2011
  • Posts: 47
Thanks Chris.  :great:

 

Powered by EzPortal