Jump to content











Photo
- - - - -

IniWrite problem


  • Please log in to reply
22 replies to this topic

#1 h7se

h7se

    Frequent Member

  • Developer
  • 264 posts
  •  
    Palestine

Posted 24 July 2007 - 01:00 AM

hi

IniWrite,"%TargetDir%\I386\txtsetup.sif","ScsiClass.Load","ramdisk","ramdisk.sys"
1- when tring to build a script with this line using 072 it tell's me that there's a syntax error !

2- there's problem with codebox "Cut command" it dosn't work

#2 pscEx

pscEx

    Platinum Member

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

Posted 24 July 2007 - 09:08 AM

IniWrite,"%TargetDir%\I386\txtsetup.sif","ScsiClass.Load","ramdisk","ramdisk.sys"
1- when tring to build a script with this line using 072 it tell's me that there's a syntax error !

This line is contained in BootSDI.Script.
When I build nativeEx_barebone with 072, there is no error.

There must be a different reason.
  • What about the lines before and afTERß
  • Try to rewrite the line and to delete the old one.
Peter

#3 h7se

h7se

    Frequent Member

  • Developer
  • 264 posts
  •  
    Palestine

Posted 24 July 2007 - 02:25 PM

Try to rewrite the line and to delete the old one.


your right now it works after deleting the old line's

---

but this is not the actual entries that i'm tring to write to txtsetup.sif
i'm tring to write these value's

IniWrite,"%TargetDir%\I386\TXTSETUP.SIF","SetupData","osloadoptions",""/fastdetect /minint""
IniWrite,"%TargetDir%\I386\TXTSETUP.SIF","SetupData","loaderprompt",""Starting BartPE...""


that already exists in the orignal file from %sourcedir%

#4 pscEx

pscEx

    Platinum Member

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

Posted 24 July 2007 - 02:34 PM

but this is not the actual entries that i'm tring to write to txtsetup.sif
i'm tring to write these value's
...
that already exists in the orignal file from %sourcedir%

Try to replace

IniWrite,"%TargetDir%\I386\TXTSETUP.SIF","SetupData","osloadoptions",""/fastdetect /minint""
IniWrite,"%TargetDir%\I386\TXTSETUP.SIF","SetupData","loaderprompt",""Starting BartPE...""

by

IniWrite,"%TargetDir%\I386\TXTSETUP.SIF","SetupData","osloadoptions","#$q/fastdetect /minint#$q"
IniWrite,"%TargetDir%\I386\TXTSETUP.SIF","SetupData","loaderprompt","#$qStarting BartPE...#$q"


Peter

#5 h7se

h7se

    Frequent Member

  • Developer
  • 264 posts
  •  
    Palestine

Posted 24 July 2007 - 02:40 PM

Same problem

[Process]
FileDelete,"%TargetDir%\I386\TXTSETUP.SIF"
DirMake,"%TargetDir%\I386\"
CopyOrExpand,"%SourceDir%\I386\TXTSETUP.SIF","%TargetDir%\I386\TXTSETUP.SIF"
IniWrite,"%TargetDir%\I386\TXTSETUP.SIF","SetupData","osloadoptions","#$q/fastdetect /minint#$q"
IniWrite,"%TargetDir%\I386\TXTSETUP.SIF","SetupData","loaderprompt","#$qStarting BartPE...#$q"



#6 pscEx

pscEx

    Platinum Member

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

Posted 24 July 2007 - 02:46 PM

Same problem

On my system (in CodeBox)
[process]

FileCreateBlank,C:\Scratch\TXTSETUP.SIF

IniWrite,"C:\Scratch\TXTSETUP.SIF","SetupData","osloadoptions","#$q/fastdetect /minint#$q"

IniWrite,"C:\Scratch\TXTSETUP.SIF","SetupData","loaderprompt","#$qStarting BartPE...#$q"
brings:

[SetupData]
osloadoptions="/fastdetect /minint"
loaderprompt="Starting BartPE..."


What is the reason for the DirMake, when you before something delete in this folder?

Peter

#7 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 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 24 July 2007 - 03:38 PM

H7 - what is your %SourceDir%? :)

Please post the log.. :yahoo:

#8 h7se

h7se

    Frequent Member

  • Developer
  • 264 posts
  •  
    Palestine

Posted 24 July 2007 - 03:47 PM

i'm using WXPSP2_EN

here's the log file

#9 pscEx

pscEx

    Platinum Member

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

Posted 24 July 2007 - 04:02 PM

i'm using WXPSP2_EN

here's the log file

The log is not from the code you posted above :yahoo:

There are additional #$s.

Peter

#10 h7se

h7se

    Frequent Member

  • Developer
  • 264 posts
  •  
    Palestine

Posted 24 July 2007 - 04:13 PM

The log is not from the code you posted above :)

There are additional #$s.

Peter


the "additional #$s" is placed by wb it's not mine :yahoo:

here's
the script and log file

#11 pscEx

pscEx

    Platinum Member

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

Posted 24 July 2007 - 04:30 PM

the "additional #$s" is placed by wb it's not mine :yahoo:

here's
the script and log file

I inserted your Test.script into my nativeEx_barebone project.
Here the (OK) log:
myLog.gif

Result: Something is different on your system.

I use final WB 072.

You have: "%BaseDir% = C:\WinBuilder071"
Do you still work with a beta?

Peter

#12 h7se

h7se

    Frequent Member

  • Developer
  • 264 posts
  •  
    Palestine

Posted 24 July 2007 - 04:47 PM

Result: Something is different on your system.

Yes :)
i'm using tweaked source by nLite .. it seams that it set the TXTSETUP.sif file to readonly and that's why the problem occured

New wb function needed "SetAttrib" ?


I use final WB 072.

You have: "%BaseDir% = C:\WinBuilder071"
Do you still work with a beta?

no i'm using WB 072, see log Title :yahoo:

Thanks for your help

#13 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 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 24 July 2007 - 04:51 PM

Glad it's solved - I was going to report the same results as Peter.. :yahoo:

#14 pscEx

pscEx

    Platinum Member

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

Posted 24 July 2007 - 04:52 PM

Yes :yahoo:
i'm using tweaked source by nLite .. it seams that it set the TXTSETUP.sif file to readonly and that's why the problem occured


That has been an interesting bug hunting :)

Waiting for the next ! (?)

Peter

#15 h7se

h7se

    Frequent Member

  • Developer
  • 264 posts
  •  
    Palestine

Posted 24 July 2007 - 04:56 PM

Waiting for the next ! (?)


Here's another

Message,"message",Information

this command won't work if you add spaces in front of it

#16 pscEx

pscEx

    Platinum Member

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

Posted 24 July 2007 - 04:57 PM

Glad it's solved - I was going to report the same results as Peter.. :yahoo:

As a result of this 'Bug':
@Nuno, you should put onto your ToDo list:

If an Ini command fails because the file is readonly:
Do log a "Cannot Write" rather than "Syntax Error"


Peter

#17 pscEx

pscEx

    Platinum Member

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

Posted 24 July 2007 - 05:53 PM

Here's another
Message,"message",Information
this command won't work if you add spaces in front of it


Sorry, h7se, I have to disappoint you.
This is not a bug to be fixed.
It is only an issue to be explained.

When processing a single script command line, WB does:
  • Split the command line into an array of arguments. Split delimiter is the comma
    (that is the reason, why inside an argument a comma must be replaced by #$c)
  • take the first argument (completely, including leading and trailing white spaces) to dispatch to the corresponding routine.
    If in the dispatch table no match is found, the complete line is treated as comment: No log, no error message, just: "I do nothing"
Maybe this behaviour can be changed. But currently it is 'WB reality'.

I'm already familar with this: If in my log a line is missing, I look for: 'What did I spell wrong in the command name'

Peter

#18 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 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 24 July 2007 - 06:26 PM

Here's another

this command won't work if you add spaces in front of it



Please post the syntax you're using..

If you meant a space as the first character then it's only natural that it isn't recognized since "message" is different from " message"

We could add support for spaces inside the commands - I guess you meant to use some organization to subdivide the code right? :)


That's something I also use on daily basis while coding, Peter is right about the procedure and I will also look into and see if things go well without significant performance loss. (this would mean removing all spaces inside the command identifier - good for 5~10 lines until you multiply by thousands.. :yahoo: )

:)

#19 pscEx

pscEx

    Platinum Member

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

Posted 24 July 2007 - 06:31 PM

Please post the syntax you're using..

If you meant a space as the first character then it's only natural that it isn't recognized since "message" is different from " message"

We could add support for spaces inside the commands - I guess you meant to use some organization to subdivide the code right? :yahoo:


That's something I also use on daily basis while coding, Peter is right about the procedure and I will also look into and see if things go well without significant performance loss. (this would mean removing all spaces inside the command identifier - good for 5~10 lines until you multiply by thousands.. :) )

:)

@Nuno, I do not think that you should change WB to neglect spaces. As you said: 'thousands' ...
But you should add an 'Unrecognized command' log message for this (but not for the 'designated' comment chars, my :) favorite is the double slash //)

Peter

#20 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 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 24 July 2007 - 06:39 PM

Yes, this is a tough thing since our current method is very permissive about different styles.

Maybe when the wb beta discussions are open we can explore and see how it works.. :yahoo:

#21 h7se

h7se

    Frequent Member

  • Developer
  • 264 posts
  •  
    Palestine

Posted 24 July 2007 - 07:12 PM

i'm using tweaked source by nLite .. it seams that it set the TXTSETUP.sif file to readonly and that's why the problem occured

i'm wrong
because i'm using cd image as Source it's Readonly by nature ..
it seams that FileCopy command whitch i'm using to copy txtsetup.sif from the source is checking to see if the file is readonly in the source if yes then it copy it and as extra step setting it's arrtib. to readonly
i've tried to copy the file from the image using windows copy command to my desktop and the result is a file with ReadOnly attrib. set to false



Please post the syntax you're using..


Here's the script

#22 h7se

h7se

    Frequent Member

  • Developer
  • 264 posts
  •  
    Palestine

Posted 24 July 2007 - 08:12 PM

hi

some thing confusing me

why wb is modifing ini file's in an unwanted way ?

example when writing value to system file like txtsetup.sif it remove empty line's , comment's

i can understand that for script's (still not welcomed :yahoo:) but not for other files

#23 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 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 24 July 2007 - 10:58 PM

Hmm.. I see what you mean, guess we'll have to correct this behavior soon.. :yahoo:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users