Manipulate an ini file 
Author Message
 Manipulate an ini file

Is there any utility that can manipulate  file with the structure of *.ini
in windows? I mean it has some sections and each section may have some
variable initialization. Could I bypass hardcoding ini file manipulation?
What is the fastest and easiest way ?


Thu, 26 Aug 2004 12:57:57 GMT  
 Manipulate an ini file
A generic class to access ini files
http://www.serialscripter.com/scripts/class_ini.html

Note: This is a VBScript class...

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--

Quote:

> Is there any utility that can manipulate  file with the structure of *.ini
> in windows? I mean it has some sections and each section may have some
> variable initialization. Could I bypass hardcoding ini file manipulation?
> What is the fastest and easiest way ?



Thu, 26 Aug 2004 14:10:47 GMT  
 Manipulate an ini file
You're really great


Thu, 26 Aug 2004 13:25:43 GMT  
 Manipulate an ini file
See INI class of ScriptUtilities
http://www.pstruh.cz/help/scptutl/cl71.htm

--
Antonin Foller
PSTRUH Software
http://www.pstruh.cz

Quote:
> Is there any utility that can manipulate  file with the structure of *.ini
> in windows? I mean it has some sections and each section may have some
> variable initialization. Could I bypass hardcoding ini file manipulation?
> What is the fastest and easiest way ?



Fri, 27 Aug 2004 01:47:34 GMT  
 Manipulate an ini file
In line 12 of the code in
http://www.serialscripter.com/scripts/class_ini.html you see:

Set fso=WScript.CreateObject("Scripting.FileSystemObject")

Could you describe what's the meaning of "WScript."? (I use IIS)



A generic class to access ini files
http://www.serialscripter.com/scripts/class_ini.html

Note: This is a VBScript class...

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--

Quote:
> Is there any utility that can manipulate  file with the structure of *.ini
> in windows? I mean it has some sections and each section may have some
> variable initialization. Could I bypass hardcoding ini file manipulation?
> What is the fastest and easiest way ?



Fri, 27 Aug 2004 12:34:30 GMT  
 Manipulate an ini file
Windows Script
http://msdn.microsoft.com/nhp/Default.asp?contentid=28001169

WScript Object
http://msdn.microsoft.com/library/en-us/script56/html/wsobjwscript.asp

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--

Quote:

> In line 12 of the code in
> http://www.serialscripter.com/scripts/class_ini.html you see:

> Set fso=WScript.CreateObject("Scripting.FileSystemObject")

> Could you describe what's the meaning of "WScript."? (I use IIS)



> A generic class to access ini files
> http://www.serialscripter.com/scripts/class_ini.html

> Note: This is a VBScript class...

> --
> Michael Harris
> Microsoft.MVP.Scripting
> Seattle WA US
> --


> > Is there any utility that can manipulate  file with the structure of *.ini
> > in windows? I mean it has some sections and each section may have some
> > variable initialization. Could I bypass hardcoding ini file manipulation?
> > What is the fastest and easiest way ?



Fri, 27 Aug 2004 13:51:24 GMT  
 Manipulate an ini file
Another Question:
If you have only one section in your ini file there will be some problems in
finding the startline and endline in FindSection function. it seems it
should be as the following:
'If (StartLine>0) And (EndLine<0) Then EndLine=UBound(A)
If (StartLine=>0) And (EndLine<0) Then EndLine=UBound(A)

Your opinion ?



Fri, 27 Aug 2004 13:05:57 GMT  
 Manipulate an ini file
I get the error "Variable is undefined: 'WScript'"

--
Mohammad Hamed A.

Electronics and Computer Engineer
Programmer/Analyst/Developer



Windows Script
http://msdn.microsoft.com/nhp/Default.asp?contentid=28001169

WScript Object
http://msdn.microsoft.com/library/en-us/script56/html/wsobjwscript.asp

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--

Quote:
> In line 12 of the code in
> http://www.serialscripter.com/scripts/class_ini.html you see:

> Set fso=WScript.CreateObject("Scripting.FileSystemObject")

> Could you describe what's the meaning of "WScript."? (I use IIS)



> A generic class to access ini files
> http://www.serialscripter.com/scripts/class_ini.html

> Note: This is a VBScript class...

> --
> Michael Harris
> Microsoft.MVP.Scripting
> Seattle WA US
> --


> > Is there any utility that can manipulate  file with the structure of
*.ini
> > in windows? I mean it has some sections and each section may have some
> > variable initialization. Could I bypass hardcoding ini file
manipulation?
> > What is the fastest and easiest way ?



Fri, 27 Aug 2004 13:58:37 GMT  
 Manipulate an ini file
You mean in the line
Set fso=WScript.CreateObject("Scripting.FileSystemObject")
you get that?

What is your version of WSH? Also - are you running this from a .VBS file or from HTML?

There are some issues with FSO based on OS and possible antivirus software which can be fixed; also, if WSH is not your host (you are running from IE or something other than a plain VBS or WSF file) you should just use "CreateObject" instead.

: I get the error "Variable is undefined: 'WScript'"
:
: --
: Mohammad Hamed A.
:
: Electronics and Computer Engineer
: Programmer/Analyst/Developer

:
:


: Windows Script
: http://msdn.microsoft.com/nhp/Default.asp?contentid=28001169
:
: WScript Object
: http://msdn.microsoft.com/library/en-us/script56/html/wsobjwscript.asp
:
:
:
: --
: Michael Harris
: Microsoft.MVP.Scripting
: Seattle WA US
: --

: > In line 12 of the code in
: > http://www.serialscripter.com/scripts/class_ini.html you see:
: >
: > Set fso=WScript.CreateObject("Scripting.FileSystemObject")
: >
: > Could you describe what's the meaning of "WScript."? (I use IIS)
: >


: > A generic class to access ini files
: > http://www.serialscripter.com/scripts/class_ini.html
: >
: > Note: This is a VBScript class...
: >
: > --
: > Michael Harris
: > Microsoft.MVP.Scripting
: > Seattle WA US
: > --


: > > Is there any utility that can manipulate  file with the structure of
: *.ini
: > > in windows? I mean it has some sections and each section may have some
: > > variable initialization. Could I bypass hardcoding ini file
: manipulation?
: > > What is the fastest and easiest way ?
: > >
: > >
: >
: >
: >
:
:
:



Fri, 27 Aug 2004 15:34:30 GMT  
 Manipulate an ini file
thanks

"Alex K. Angelopoulos" <alex_angelopoulos_at_hotmail_dot_com_remove__> wrote

You mean in the line
Set fso=WScript.CreateObject("Scripting.FileSystemObject")
you get that?

What is your version of WSH? Also - are you running this from a .VBS file or
from HTML?

There are some issues with FSO based on OS and possible antivirus software
which can be fixed; also, if WSH is not your host (you are running from IE
or something other than a plain VBS or WSF file) you should just use
"CreateObject" instead.


: I get the error "Variable is undefined: 'WScript'"
:
: --
: Mohammad Hamed A.
:
: Electronics and Computer Engineer
: Programmer/Analyst/Developer

:
:


: Windows Script
: http://msdn.microsoft.com/nhp/Default.asp?contentid=28001169
:
: WScript Object
: http://msdn.microsoft.com/library/en-us/script56/html/wsobjwscript.asp
:
:
:
: --
: Michael Harris
: Microsoft.MVP.Scripting
: Seattle WA US
: --

: > In line 12 of the code in
: > http://www.serialscripter.com/scripts/class_ini.html you see:
: >
: > Set fso=WScript.CreateObject("Scripting.FileSystemObject")
: >
: > Could you describe what's the meaning of "WScript."? (I use IIS)
: >


: > A generic class to access ini files
: > http://www.serialscripter.com/scripts/class_ini.html
: >
: > Note: This is a VBScript class...
: >
: > --
: > Michael Harris
: > Microsoft.MVP.Scripting
: > Seattle WA US
: > --


: > > Is there any utility that can manipulate  file with the structure of
: *.ini
: > > in windows? I mean it has some sections and each section may have some
: > > variable initialization. Could I bypass hardcoding ini file
: manipulation?
: > > What is the fastest and easiest way ?
: > >
: > >
: >
: >
: >
:
:
:



Sat, 28 Aug 2004 12:10:16 GMT  
 Manipulate an ini file
I'm not familiar with VBS or WSF. Could you introduce them or send a link to
a briefe resource? Till now I only used asp and html files containing
scripts :)

Yours

"Alex K. Angelopoulos" <alex_angelopoulos_at_hotmail_dot_com_remove__> wrote

You mean in the line
Set fso=WScript.CreateObject("Scripting.FileSystemObject")
you get that?

What is your version of WSH? Also - are you running this from a .VBS file or
from HTML?

There are some issues with FSO based on OS and possible antivirus software
which can be fixed; also, if WSH is not your host (you are running from IE
or something other than a plain VBS or WSF file) you should just use
"CreateObject" instead.


: I get the error "Variable is undefined: 'WScript'"
:
: --
: Mohammad Hamed A.
:
: Electronics and Computer Engineer
: Programmer/Analyst/Developer

:
:


: Windows Script
: http://msdn.microsoft.com/nhp/Default.asp?contentid=28001169
:
: WScript Object
: http://msdn.microsoft.com/library/en-us/script56/html/wsobjwscript.asp
:
:
:
: --
: Michael Harris
: Microsoft.MVP.Scripting
: Seattle WA US
: --

: > In line 12 of the code in
: > http://www.serialscripter.com/scripts/class_ini.html you see:
: >
: > Set fso=WScript.CreateObject("Scripting.FileSystemObject")
: >
: > Could you describe what's the meaning of "WScript."? (I use IIS)
: >


: > A generic class to access ini files
: > http://www.serialscripter.com/scripts/class_ini.html
: >
: > Note: This is a VBScript class...
: >
: > --
: > Michael Harris
: > Microsoft.MVP.Scripting
: > Seattle WA US
: > --


: > > Is there any utility that can manipulate  file with the structure of
: *.ini
: > > in windows? I mean it has some sections and each section may have some
: > > variable initialization. Could I bypass hardcoding ini file
: manipulation?
: > > What is the fastest and easiest way ?
: > >
: > >
: >
: >
: >
:
:
:



Sat, 28 Aug 2004 12:12:21 GMT  
 Manipulate an ini file
That's the problem then...

(1) Here's the documentation on WSH (and using Windows script files (.WSF) or pure VBScript files (.VBS).

http://download.microsoft.com/download/winscript56/Install/5.6/W982KM...

(2) Make that "WScript.CreateObject" into "CreateObject".

: I'm not familiar with VBS or WSF. Could you introduce them or send a link to
: a briefe resource? Till now I only used asp and html files containing
: scripts :)
:
: Yours
:
: "Alex K. Angelopoulos" <alex_angelopoulos_at_hotmail_dot_com_remove__> wrote

: You mean in the line
: Set fso=WScript.CreateObject("Scripting.FileSystemObject")
: you get that?
:
: What is your version of WSH? Also - are you running this from a .VBS file or
: from HTML?
:
: There are some issues with FSO based on OS and possible antivirus software
: which can be fixed; also, if WSH is not your host (you are running from IE
: or something other than a plain VBS or WSF file) you should just use
: "CreateObject" instead.
:

: : I get the error "Variable is undefined: 'WScript'"
: :
: : --
: : Mohammad Hamed A.
: :
: : Electronics and Computer Engineer
: : Programmer/Analyst/Developer

: :
: :


: : Windows Script
: : http://msdn.microsoft.com/nhp/Default.asp?contentid=28001169
: :
: : WScript Object
: : http://msdn.microsoft.com/library/en-us/script56/html/wsobjwscript.asp
: :
: :
: :
: : --
: : Michael Harris
: : Microsoft.MVP.Scripting
: : Seattle WA US
: : --


: : > In line 12 of the code in
: : > http://www.serialscripter.com/scripts/class_ini.html you see:
: : >
: : > Set fso=WScript.CreateObject("Scripting.FileSystemObject")
: : >
: : > Could you describe what's the meaning of "WScript."? (I use IIS)
: : >


: : > A generic class to access ini files
: : > http://www.serialscripter.com/scripts/class_ini.html
: : >
: : > Note: This is a VBScript class...
: : >
: : > --
: : > Michael Harris
: : > Microsoft.MVP.Scripting
: : > Seattle WA US
: : > --


: : > > Is there any utility that can manipulate  file with the structure of
: : *.ini
: : > > in windows? I mean it has some sections and each section may have some
: : > > variable initialization. Could I bypass hardcoding ini file
: : manipulation?
: : > > What is the fastest and easiest way ?
: : > >
: : > >
: : >
: : >
: : >
: :
: :
: :
:
:
:



Sat, 28 Aug 2004 13:25:26 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. Manipulate an ini file

2. Dbctrlgrid not in Version 4 standard version

3. ANNOUNCEMENT: QuickReport version 0.97 released, New QuickReport home site and e-mail

4. how to manipulate a *.ini file

5. ignore me

6. How to : Manipulate .INI file

7. How to : Manipulate .INI file

8. Methods to manipulate ini files ...

9. How to manipulate INI files from VB4

10. INI-MANAGEMENT: how to locate private Ini-File ?

11. Use a Resource file or an INI file.

12. Ini file as shared network file.

 

 
Powered by phpBB® Forum Software