Remove first line out of INI

Got a problem you cannot solve? Try here.
mikKummerfeld
Posts: 252
Joined: Sat Dec 03, 2011 3:07 am
Location: Konstanz, Germany
Contact:

Remove first line out of INI

Postby mikKummerfeld » Thu Feb 21, 2013 4:46 am

Hello Guys,

I need to remove the first line in my ini file, but this line is not into a section. So how can I remove the first line.
I tried the "Edit INI function" without entering the section but it does not work (update or delete line)...

config.png
config.png (28.16 KiB) Viewed 5242 times


thanks
heiko
Kind regards

Heiko Kummerfeld
MIK GmbH

Setup developer for .NET BI Software (12 products)
Head of quality assurance
technical consultant

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Remove first line out of INI

Postby FrancescoT » Thu Feb 21, 2013 6:33 am

Dear Heiko,

I suggest you to use the following command;

- Read text file, to aquire the entire text file into a Variable.
- Parse String, to remove the unwanted lines
- Write to Text, to store back the updated content.

Please also refer to InstallAware documentation for more detailed information about commands usage.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

mikKummerfeld
Posts: 252
Joined: Sat Dec 03, 2011 3:07 am
Location: Konstanz, Germany
Contact:

Re: Remove first line out of INI

Postby mikKummerfeld » Thu Feb 21, 2013 6:35 am

This was also in my mind, but I thought there is maybe a better way like that

But how can I remove a line with parse string...

my line is

activedb=XXXX

(xxxx can be everything and the length is variabel)
Kind regards

Heiko Kummerfeld
MIK GmbH

Setup developer for .NET BI Software (12 products)
Head of quality assurance
technical consultant

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Remove first line out of INI

Postby FrancescoT » Thu Feb 21, 2013 7:35 am

Dear Heiko,

each text line shoul be terminated with a carriage return control character.

Use NEWLINE pre-defind variable to split the text at the second occurence of it.

Regards.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

mikKummerfeld
Posts: 252
Joined: Sat Dec 03, 2011 3:07 am
Location: Konstanz, Germany
Contact:

Re: Remove first line out of INI

Postby mikKummerfeld » Mon Feb 25, 2013 10:49 am

Done...Works...Thanks
Kind regards

Heiko Kummerfeld
MIK GmbH

Setup developer for .NET BI Software (12 products)
Head of quality assurance
technical consultant

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Remove first line out of INI

Postby FrancescoT » Mon Feb 25, 2013 12:31 pm

:D
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 93 guests