DirMake (The simplest thing) dont work... why?
#1
Posted 06 August 2008 - 03:44 PM
Can anyone check this snippet and tells me whats wrong.. i get an error in every 2 DirMake commands...
The echo prints out "%CDDrive%\Programs\Acronis" without the ".
[codebox][Variables] %VistaPECompatible%=Yes %Category%=Disk Tools %DirPrograms%=%PE_Programs% %DirProgramsCommonFiles%=#$pCommonProgramFiles#$p %DirAllUsers%=%UserProfile%\..\All#$sUsers %DirWindows%=%WindowsDir% %DirWindowsSystem%=%WindowsSystemDir% %DirUserProfile%=%UserProfile% %AcronisProgDir%=%DirPrograms%\Acronis %ProgDir%=%AcronisProgDir%\Acronis#$sDisk#$sDirector %ProgCommonFilesDir%=%DirProgramsCommonFiles%\Acronis %ProgAllUsersDir%=%DirAllUsers%\Application#$sData\Acronis
[Process]
Echo,"%AcronisProgDir%"
DirMake,"%AcronisProgDir%"
DirMake,"%ProgDir%"[/codebox]
Thanks!
TL
#2
Posted 06 August 2008 - 04:13 PM
What are you trying to code?
If it is an app script for an Acronis product then my guess is that you wouldn't even be needing to call dirmake in the first place.
If Acronis requires creating user profile and such then you should be careful because using static name like "Programs" migth render you script useless in other configurations where (for example) the programs are kept under "Programas" (portuguese)
Please post the log otherwise it will be much harder to correctly understand the reason why this happens.
If you post the exact configuration that is necessary to replicate under WinPE 2 then other developers might be able to guide you through this goal.
#3
Posted 06 August 2008 - 04:15 PM
As far as I see, one of the first variables %PE_Programs% is undefined.Hello!
Can anyone check this snippet and tells me whats wrong.. i get an error in every 2 DirMake commands...
The echo prints out "%CDDrive%\Programs\Acronis" without the ".[Variables]%VistaPECompatible%=Yes%Category%=Disk Tools%DirPrograms%=%PE_Programs%%DirProgramsCommonFiles%=#$pCommonProgramFiles#$p%DirAllUsers%=%UserProfile%\..\All#$sUsers%DirWindows%=%WindowsDir%%DirWindowsSystem%=%WindowsSystemDir%%DirUserProfile%=%UserProfile%%AcronisProgDir%=%DirPrograms%\Acronis%ProgDir%=%AcronisProgDir%\Acronis#$sDisk#$sDirector%ProgCommonFilesDir%=%DirProgramsCommonFiles%\Acronis%ProgAllUsersDir%=%DirAllUsers%\Application#$sData\Acronis[Process]Echo,"%AcronisProgDir%"DirMake,"%AcronisProgDir%"DirMake,"%ProgDir%"
Thanks!
TL
It is defined anywhere else like in script.project?
Peter
#4
Posted 06 August 2008 - 04:22 PM
If the echo is
<span class="postcolor">%CDDrive%\Programs\Acronis</span>rather than
that is ok."%CDDrive%\Programs\Acronis"
WinBuilder in most cases removes unnecessary quotes, If you want to preserve a quote, you have to 'escape' it with #$q.
Peter
#5
Posted 06 August 2008 - 04:51 PM
Is'n %PE_Programs% a winbuilder/vistape variable???Maybe because you're using static paths instead of API variables.
Yes, its a acronis product, but i have to create (or at least i want) a folder like \Programs\Acronis\Product... Do i not need to create the directory by myself???What are you trying to code?
If it is an app script for an Acronis product then my guess is that you wouldn't even be needing to call dirmake in the first place.
Yes, i know this fact, but i dont know the correct answer...If Acronis requires creating user profile and such then you should be careful because using static name like "Programs" migth render you script useless in other configurations where (for example) the programs are kept under "Programas" (portuguese)
I've attached the log, it is only a run of the single script, but a full run results in the same errors and warnings.
Attached Files
#6
Posted 06 August 2008 - 04:58 PM
The root of the issue is that %CDDrive% is undefined.Is'n %PE_Programs% a winbuilder/vistape variable???
Yes, its a acronis product, but i have to create (or at least i want) a folder like \Programs\Acronis\Product... Do i not need to create the directory by myself???
Yes, i know this fact, but i dont know the correct answer...
I've attached the log, it is only a run of the single script, but a full run results in the same errors and warnings.
Everything else seems to be secondary errors.
Try to give %CDDrive% a real (and logical correct value) in [Variables] like
%CDDrive=F:
That cannot help you to build a successful script, but it helps me and others to catch your issue.
Peter
BTW: Back to your post #1: Is the snippet part of a project you are building?
If yes, please post a log of the complete build.
If not: I worry that you have to read some tutorials, wikis etc. before.
#7
Posted 06 August 2008 - 05:04 PM
[codebox]#default setting - all to disk %Target_Prog%=%TargetDir%\Programs %PE_Programs%=#$pCDDrive#$p\Programs[/codebox] As fas as i understand, PE_Programs and #$pCDDriver#$p are default variables, why do they not work in my script????
#8
Posted 06 August 2008 - 05:17 PM
[codebox]#default setting - all to disk%Target_Prog%=%TargetDir%\Programs%PE_Programs%=#$pCDDrive#$p\Programs[/codebox]As fas as i understand, PE_Programs and #$pCDDriver#$p are default variables, why do they not work in my script????[/quote]Before loosing too much time and effort:Please post (as I suggested one or two posts before) The COMPLETE build log where the issue occurred.BTW: Just as a small info:[code]%PE_Programs%=#$pCDDrive#$p\Programs[/code]means:
Give %Pe_Programs% an 'symbolic' value. Whenever %Pe_Programs% is passed to a different script, an external app or whatelse, #$pCDDrive#$p is replaced by the actual value of the internal variable %CDDrive%.
But if you want to handle such questions successful here: As I already posted: You MUST have some knowledge of issues written in WIKIs, TUTORIALs etc.
And if you want to successful build your own scripts, the question here should be:
I'm trying the script '.....' (post complete script) inside the project (.....).
But there are errors I cannot understand (post complete log)
Ande if necessary or applicable, include in the post screen shoots of error dialogs etc.
BTW1: All what I wrote now, you can get as is logical result of reading the 'Board Rules' carefully
#9
Posted 06 August 2008 - 05:52 PM
ok, i try from beginning. I attached the complete script source and log. I read the full winbuilder and vistape api docs. But there are some informations missing there as far as i see (but im a developer, so i know, writing docs is a no go... )
The script is far from perfect and has many problems. But the first is DirMake...
BTW: Most of the scripts included with vistape using a simpler structure than i need. For example, i have to add 4 startmenu-links with 4 different commands. Using the %ProgramEXE%,%ProgramFolder%... variables are perfect for one program per script... but not for my purpose (but this seems to be no problem, i just do add a few more options to commands.
Bye!
Attached Files
#10
Posted 06 August 2008 - 06:03 PM
Tha bad boy here seems to be the Acronic script. There %CDDrive% is really undefined.Hi,
ok, i try from beginning. I attached the complete script source and log. I read the full winbuilder and vistape api docs. But there are some informations missing there as far as i see (but im a developer, so i know, writing docs is a no go... )
The script is far from perfect and has many problems. But the first is DirMake...
BTW: Most of the scripts included with vistape using a simpler structure than i need. For example, i have to add 4 startmenu-links with 4 different commands. Using the %ProgramEXE%,%ProgramFolder%... variables are perfect for one program per script... but not for my purpose (but this seems to be no problem, i just do add a few more options to commands.
Bye!
Is it:
- 'Standard' copied from anywhere? If yes, from which URL?
- 'Standard' copied from anywhere and modified by you? If yes, from which URL? (I#ll compare)
- Your new script?
#11
Posted 06 August 2008 - 06:12 PM
Yes, my script is the bad one...Tha bad boy here seems to be the Acronic script. There %CDDrive% is really undefined.
Peter
- 'Standard' copied from anywhere? If yes, from which URL?
- 'Standard' copied from anywhere and modified by you? If yes, from which URL? (I#ll compare)
- Your new script?
I justed tried to find the correct variable for the "Programs" directory that is created by vistape...
- "PE_Programs" found in a script for a older version of vistape... maybe this is no more supported now, but it is defined in script.project of vistape
- %Target_Prog% also defined in script.project, maybe this is the right one?
- %Target_Dir%\Program Files as used in vistape's common.script for example... i think this is the way to go. But with this one i have hard-coded paths... does this also work on a german vista for example???
#12
Posted 06 August 2008 - 06:20 PM
Yes, my script is the bad one...
I justed tried to find the correct variable for the "Programs" directory that is created by vistape...
- "PE_Programs" found in a script for a older version of vistape... maybe this is no more supported now, but it is defined in script.project of vistape
- %Target_Prog% also defined in script.project, maybe this is the right one?
- %Target_Dir%\Program Files as used in vistape's common.script for example... i think this is the way to go. But with this one i have hard-coded paths... does this also work on a german vista for example???
As a result: You used the 'wrong' variable for your VistaPE directory.
I think that there are a lot of users which can help you.
I personally am a 'committed' Vista enemy and therefore have no knowledge about the background of VistaPE (Which, btw. for me never worked when I tried)..
Maybe you go to the 'good old fashion' and try LiveXP?
Peter
#13
Posted 06 August 2008 - 06:36 PM
As a result: You used the 'wrong' variable for your VistaPE directory.
I think that there are a lot of users which can help you.
I personally am a 'committed' Vista enemy and therefore have no knowledge about the background of VistaPE (Which, btw. for me never worked when I tried)..
Maybe you go to the 'good old fashion' and try LiveXP?
Peter
Yes, is know... vista. I have written many pebuilder scripts, but now i want to switch over because winxp needs much customization to support all hardware in a current pc... and vistape worked for me from scratch... but i will took a look at livexp.
#14
Posted 06 August 2008 - 08:36 PM
Just a kidding question:Yes, is know... vista. I have written many pebuilder scripts, but now i want to switch over because winxp needs much customization to support all hardware in a current pc... and vistape worked for me from scratch... but i will took a look at livexp.
With VistaPE every HW driver works and nobody knows why.
With VistaPE you have a lot of troubles with your newly written plugins, and nobody knows why.
With LiveXP you add your working HW drivers (after some of time to learn) and you know why it works.
With LiveXP you add your plugins and (after some of time to learn) you know why it works.
What do you prefer?
Peter
#15
Posted 06 August 2008 - 08:44 PM
e.g.
[codebox][Variables] %ProgramTitle1%=Acronis Disk Director 10 %ProgramTitle2%=Acronis Recovery Expert %ProgramTitle3%=Acronis Disk Editor %ProgramFolder1%=Acronis\Acronis Disk Director %ProgramEXE1%=DiskDirector.exe %Category%=Acronis [Process] Add_Shortcut,StartMenu,%Category%,%PE_Programs%\%ProgramFolder1%\%ProgramEXE1%,%ProgramTitle1%,%PE_Programs%\%ProgramFolder1%,,%PE_Programs%\%ProgramFolder1%\a.ico Add_Shortcut,Desktop,,%PE_Programs%\%ProgramFolder1%\%ProgramEXE1%,%ProgramTitle1%,%PE_Programs%\%ProgramFolder1%,,%PE_Programs%\%ProgramFolder1%\a.ico Add_Shortcut,StartMenu,%Category%,%PE_Programs%\%ProgramFolder1%\%ProgramEXE1%,%ProgramTitle2%,%PE_Programs%\%ProgramFolder1%,-RECOVER,%PE_Programs%\%ProgramFolder1%\b.ico Add_Shortcut,StartMenu,%Category%,%PE_Programs%\%ProgramFolder1%\%ProgramEXE1%,%ProgramTitle3%,%PE_Programs%\%ProgramFolder1%,-EDITOR,%PE_Programs%\%ProgramFolder1%\c.ico [/codebox] To create a folder use: %Target_Prog% e.g. [code][Variables] %ProgramFolder1%=TEST1 %ProgramFolder2%=TEST2 [Process] RunFromRam,%pCheckBox1% DirMake,%Target_Prog%\%ProgramFolder1% DirMake,%Target_Prog%\%ProgramFolder2% Unpack,Files,a1.7z,True,%Target_Prog%,test3 Unpack,Files,a2.7z,True,%Target_Prog%,test4 [Interface] pCheckBox1="Run from ram (boot.wim)",1,3,9,110,198,21,True[/code]
What I don't understand: in the shortcuts how can I define the icon no.0 or no.1 or no.2 etc. in an .exe file?
#16
Posted 06 August 2008 - 10:50 PM
What I don't understand: in the shortcuts how can I define the icon no.0 or no.1 or no.2 etc. in an .exe file?
Hmm..
Don't know if this feature has been added by PedroLe15 because when looking on the current code for api.script on LiveXP doesn't seem to support it, maybe you could send Pedro an email about this detail or post a request on the bug tracker: http://www.boot-land...;showproject=10
There was a similar request some time ago but he never mentioned anything on the bug tracker and eventually got forgotten: http://www.boot-land...?showtopic=3937
#17
Posted 06 August 2008 - 11:08 PM
Maybe you go to the 'good old fashion' and try LiveXP?
Good suggestion as DD10 script is included in LiveXP (dependent, of course, upon supplying license details).
Regards,
Galapo
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users