Jump to content











Photo
- - - - -

DirMake (The simplest thing) dont work... why?


  • Please log in to reply
16 replies to this topic

#1 TheLexus

TheLexus

    Newbie

  • Members
  • 10 posts
  •  
    Germany

Posted 06 August 2008 - 03:44 PM

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 ".

[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 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10554 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 06 August 2008 - 04:13 PM

Maybe because you're using static paths instead of API variables.

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.

:cheers:

#3 pscEx

pscEx

    Platinum Member

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

Posted 06 August 2008 - 04:15 PM

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

As far as I see, one of the first variables %PE_Programs% is undefined.

It is defined anywhere else like in script.project?

Peter

#4 pscEx

pscEx

    Platinum Member

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

Posted 06 August 2008 - 04:22 PM

Maybe I understood your question now from a different point of view.

If the echo is
<span class=&#34;postcolor&#34;>%CDDrive%\Programs\Acronis</span>
rather than

"%CDDrive%\Programs\Acronis"

that is ok.

WinBuilder in most cases removes unnecessary quotes, If you want to preserve a quote, you have to 'escape' it with #$q.

Peter

#5 TheLexus

TheLexus

    Newbie

  • Members
  • 10 posts
  •  
    Germany

Posted 06 August 2008 - 04:51 PM

Maybe because you're using static paths instead of API variables.

Is'n %PE_Programs% a winbuilder/vistape variable???

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, 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???

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)

Yes, i know this fact, but i dont know the correct answer... :cheers:

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

  • Attached File  log.html   44.77KB   528 downloads


#6 pscEx

pscEx

    Platinum Member

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

Posted 06 August 2008 - 04:58 PM

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... :cheers:

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.

The root of the issue is that %CDDrive% is undefined.
Everything else seems to be secondary errors.

Try to give %CDDrive% a real (and logical correct value) in [Variables] like
%CDDrive=F&#58;

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 TheLexus

TheLexus

    Newbie

  • Members
  • 10 posts
  •  
    Germany

Posted 06 August 2008 - 05:04 PM

I took a look at vistape's script.project:

[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 pscEx

pscEx

    Platinum Member

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

Posted 06 August 2008 - 05:17 PM

[quote name='TheLexus' post='41406' date='Aug 6 2008, 06:04 PM']I took a look at vistape's script.project:

[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 TheLexus

TheLexus

    Newbie

  • Members
  • 10 posts
  •  
    Germany

Posted 06 August 2008 - 05:52 PM

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... :cheers: )

The script is far from perfect and has many problems. But the first is DirMake... :cheers:


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 pscEx

pscEx

    Platinum Member

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

Posted 06 August 2008 - 06:03 PM

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... :cheers: )

The script is far from perfect and has many problems. But the first is DirMake... :cheers:


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!

Tha bad boy here seems to be the Acronic script. There %CDDrive% is really undefined.

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?
Peter

#11 TheLexus

TheLexus

    Newbie

  • Members
  • 10 posts
  •  
    Germany

Posted 06 August 2008 - 06:12 PM

Tha bad boy here seems to be the Acronic script. There %CDDrive% is really undefined.

Yes, my script is the bad one... :cheers:

  • '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?
Peter


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 pscEx

pscEx

    Platinum Member

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

Posted 06 August 2008 - 06:20 PM

Yes, my script is the bad one... :cheers:



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 TheLexus

TheLexus

    Newbie

  • Members
  • 10 posts
  •  
    Germany

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. :cheers:

#14 pscEx

pscEx

    Platinum Member

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

Posted 06 August 2008 - 08:36 PM

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. :cheers:

Just a kidding question:
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 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 06 August 2008 - 08:44 PM

I think only in the shortcuts should use the variable: %PE_Programs%
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]&#91;Variables&#93; %ProgramFolder1%=TEST1 %ProgramFolder2%=TEST2 &#91;Process&#93; 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 &#91;Interface&#93; pCheckBox1=&#34;Run from ram &#40;boot.wim&#41;&#34;,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 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10554 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

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

:cheers:

#17 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

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