IPB

 
 
> [BUG] section "Expand_File" in API script
 
 Zhang Heng
post Jan 15 2009, 08:40 AM
Post #1


Newbie
*

Group: Members
Posts: 25
Joined: 22-March 07
Member No.: 4,570


China


The section "Expand_File" in API script included in VistaPE 12 RC1 just check the file in %InstallSRC%, but some files in %BootSRC%, so would some one fix the bug and update the file in project port.

Thanks
Go to the top of the page
 
 
 ctmag
post Jan 15 2009, 09:59 AM
Post #2


Silver Member
****

Group: .script developer
Posts: 678
Joined: 19-May 08
Member No.: 15,320


Germany


ca you post fixed code?
Go to the top of the page
 
 
 Zhang Heng
post Jan 15 2009, 10:22 AM
Post #3


Newbie
*

Group: Members
Posts: 25
Joined: 22-March 07
Member No.: 4,570


China


Oh, so

Original:
QUOTE
[expand_file]
IniRead,%VistaInfo%,"VistaInfo","Language","%DistLang%"
IniRead,%VistaInfo%,"VistaInfo","SystemFiles","%SystemFiles%"
If,ExistFile,"%SystemFiles%\Windows\System32\#1",FileCopy,"%SystemFiles%\Windows\System32\#1","%TargetDir%\Windows\System32"
If,ExistFile,"%SystemFiles%\Windows\System32\%DistLang%\#1.mui",DirMake,"%TargetDir%\Windows\System32\%DistLang%"
If,ExistFile,"%SystemFiles%\Windows\System32\%DistLang%\#1.mui",FileCopy,"%SystemFiles%\Windows\System32\%DistLang%\#1.mui","%TargetDir%\Windows\System32\%DistLang%"
If,ExistFile,"%SystemFiles%\Windows\System32\en-US\#1.mui",DirMake,"%TargetDir%\Windows\System32\en-US"
If,ExistFile,"%SystemFiles%\Windows\System32\en-US\#1.mui",FileCopy,"%SystemFiles%\Windows\System32\en-US\#1.mui","%TargetDir%\Windows\System32\en-US"
If,NotExistFile,"%TargetDir%\Windows\System32\#1",Beep,Error
If,NotExistFile,"%TargetDir%\Windows\System32\#1",Echo,"!!! Can not copy #1 file!!!


Fixed:
QUOTE
[Expand_File]
If,ExistFile,"%InstallSRC%\Windows\System32\#1",Run,%API%,Expand_File-Process,I,#1
If,NotExistFile,"%InstallSRC%\Windows\System32\#1",If,ExistFile,"%BootSRC%\Windows\System32\#1",Run,%API%,Expand_File-Process,B,#1
If,NotExistFile,"%TargetDir%\Windows\System32\#1",Beep,Error
If,NotExistFile,"%TargetDir%\Windows\System32\#1",Echo,"!!! Can not copy #1 file!!!

[Expand_File-Process]
IniRead,%VistaInfo%,"VistaInfo","Language","%DistLang%"
If,#1,EQUAL,I,Set,%SystemFiles%,%InstallSRC%
If,#1,EQUAL,B,Set,%SystemFiles%,%BootSRC%
If,ExistFile,"%SystemFiles%\Windows\System32\#2",FileCopy,"%SystemFiles%\Windows\System32\#2","%TargetDir%\Windows\System32"
If,ExistFile,"%SystemFiles%\Windows\System32\%DistLang%\#2.mui",DirMake,"%TargetDir%\Windows\System32\%DistLang%"
If,ExistFile,"%SystemFiles%\Windows\System32\%DistLang%\#2.mui",FileCopy,"%SystemFiles%\Windows\System32\%DistLang%\#2.mui","%TargetDir%\Windows\System32\%DistLang%"
If,ExistFile,"%SystemFiles%\Windows\System32\en-US\#2.mui",DirMake,"%TargetDir%\Windows\System32\en-US"
If,ExistFile,"%SystemFiles%\Windows\System32\en-US\#2.mui",FileCopy,"%SystemFiles%\Windows\System32\en-US\#2.mui","%TargetDir%\Windows\System32\en-US"
Go to the top of the page
 
 
 pedrole15
post Jan 15 2009, 11:19 AM
Post #4


Silver Member
****

Group: .script developer
Posts: 520
Joined: 18-August 06
Member No.: 183


France


QUOTE (Zhang Heng @ Jan 15 2009, 11:22 AM) *
Oh, so

Original:


Fixed:

Try like this, to have more flexibility
CODE
[expand_file]
##In Script.project==> Require_File=run,%API%,Expand_file
##Syntax==> Require_File , [Folder\] filename , [Source (if  source  is different of %Source_Sys%)] , [Target ( If target is different of  %Target_Sys%)]
## Ex:  Require_File, mfc42u.dll    -     Require_File, mfc42u.dll,%WindowsDir%\System32,%Target_Win%\System32
##Note : %Source_Sys% is equal to %InstallSRC%\Windows\System32
##
IniRead,%VistaInfo%,"VistaInfo","Language","%DistLang%"
StrFormat,filename,#1,#5
StrFormat,path,#1,#4
If,#2,Equal,,Begin
If,ExistFile,"#2\#4#5",Set,#2,%Source_Sys%
Else,Set,#2,%BootSRC%\Windows\System32
End
If,#3,Equal,,Set,#3,%Target_Sys%
DirMake,"#3\#4"
DirMake,"#3\#4%DistLang%"
DirMake,"#3\#4en_US"
If,ExistFile,"#2\#4#5",FileCopy,"#2\#4#5","#3\#4"
If,ExistFile,"#2\#4%DistLang%\#5.mui",FileCopy,"#2\#4%DistLang%\#5.mui","#3\#4%DistLang%"
If,ExistFile,"#2\#4en-US\#5.mui",FileCopy,"#2\#4en-US\#5.mui","#3\#4en-US"
If,NotExistFile,"#3\#1",Beep,Error
If,NotExistFile,"#3\#1",Echo,"!!! Can not copy #1 file!!!

(IMG:../forums/style_emoticons/default/cheers.gif)
Pedro
Go to the top of the page
 
 
 Zhang Heng
post Jan 15 2009, 11:29 AM
Post #5


Newbie
*

Group: Members
Posts: 25
Joined: 22-March 07
Member No.: 4,570


China


Hi Pedro,

your work is perfect (I never know the usage of "begin") (IMG:../forums/style_emoticons/default/sad.gif)

but some old script is writed for the old interface

for example, winre.script

changed the Expand_File to this, the old script cannot work currectly yet.

To Detect file location must be patched I think.
Go to the top of the page
 
 
 pedrole15
post Jan 15 2009, 04:02 PM
Post #6


Silver Member
****

Group: .script developer
Posts: 520
Joined: 18-August 06
Member No.: 183


France


Hi Zhang Heng,

What is wrong ? post a log , I can't test
The first DirMake can be suppressed to prevent some error if #4 is empty ( DirMake,"#3\#4")

But syntax is same as before
It 's actualy the most near as LiveXP' Api execept for CAB file (probably not required by Vista)

Pedro
Go to the top of the page
 
 
 ludovici
post Jan 22 2009, 01:12 AM
Post #7


Frequent Member
***

Group: Advanced user
Posts: 124
Joined: 1-November 07
From: France
Member No.: 11,607


France


Hi Zhang Heng, Hi Pedrole15, (IMG:../forums/style_emoticons/default/wink.gif)

I have test the Zhang Heng Modification of Api, and it's very good; Why i have don't think at this (IMG:../forums/style_emoticons/default/idea.gif) before ?
The working to write a script will be more simple (IMG:../forums/style_emoticons/default/yahoo.gif) ; Can we add more variable in api script ?

Go to the top of the page
 
 
 pedrole15
post Jan 22 2009, 02:18 AM
Post #8


Silver Member
****

Group: .script developer
Posts: 520
Joined: 18-August 06
Member No.: 183


France


Salut ludovici
Did you test the code i have posted ?
##Syntax==> Require_File , [Folder\] filename
Sample : Require_File,Drivers\MyFile ==> Copy file MyFile from %Source_Sys% To %Target_Sys%\Drivers

Is it working if source is waik ?

What other variables do you want ?

Pedro
Go to the top of the page
 
 
 ludovici
post Jan 23 2009, 12:31 AM
Post #9


Frequent Member
***

Group: Advanced user
Posts: 124
Joined: 1-November 07
From: France
Member No.: 11,607


France


Salut Pedrole15

I have not test your modification; but i will test this modification tomorrow or this Week-End.
Thanks for your answer, and i work to find new variable to applied to VistaPE project
Go to the top of the page
 
 
 
 

 
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

Collapse

>

  Topic Replies Topic Starter Views Last Action
No new Posts Topic has attachments Script: Vista Driver Packs
17 DaveXP 1,348 Yesterday, 12:45 PM
Last post by: DaveXP
No new Posts Topic has attachments script layout
visual for VPE
28 twindude 1,490 Yesterday, 02:18 AM
Last post by: twindude
No New Posts bug: geometry command hangs
when having some TC encrypted partition
5 mr_ 92 29th January 2009 - 06:32 PM
Last post by: tinybit
No new Posts Topic has attachments Install XP from USB AFTER Booting with PE from HDD or USB
139 wimb 30,929 29th January 2009 - 03:10 PM
Last post by: Lancelot
No new Posts Pinned: Topic has attachments Install XP from USB
Prepare Bootable USB-drive with USB_MultiBoot.cmd
140 wimb 159,003 24th January 2009 - 03:59 PM
Last post by: wimb


 
menu_build_menu( "topicreferrals", new Array( img_item + "   10 clicks" ) );

RSS "Boot-Land.net", "WinBuilder" Lo-Fi Version Time is now: 31st January 2009 - 08:37 PM