SecEdit INF format

  • Thread starter Thread starter EdT
  • Start date Start date
E

EdT

In the Security INF files used by Secedit, what does the section
[Unicode]
Unicode = Yes
actually mean ?

Does it specify the format of the INF file; whether it is written in
Unicode or ASCII ??
I need to be able to edit the INF file using vbscript when moving from
domain to domain, to pick up the correct SIDS for the groups in that
domain, and I therefore would prefer the file to be in ASCII format...
EdT
 
That is a good question. At W2k release there was much
talk about how the adm and inf files were now Unicode.
I however have discovered that for the secedit.inf it really
does not seem to matter.
However, it comes in Unicode, and since it is just as simple
to open and write the file from vbs in Unicode, why not just
keep it that way?
 
Thanks Roger.
I am a relative newbie in the area of vbscripting. How can I test if
the file is an ASCII or a Unicode file in vbscript? Our INF files can
come in both flavours although I am trying to get things standardised
to ASCII.
We are trying to automate a lot of our packaging workflows, and as well
have a number of different domains serving our 30,000 users, we have
had to automate the creation of the security INF file and also automate
the update of the SIDS in the INF file as packages are deployed to
different domains.
It would be helpful if you could confirm whether the [Unicode] section
can be dropped from an ASCII file, or whether it should be set to
Unicode = No
Is this documented anywhere? I have searched through the Platform SDK
and DDK documentation without finding anything conclusive
 
EdT said:
Thanks Roger.
I am a relative newbie in the area of vbscripting. How can I test if
the file is an ASCII or a Unicode file in vbscript? Our INF files can
come in both flavours although I am trying to get things standardised
to ASCII.
No real clue, but if you open as ASCII and it is not then you do
not have ability to readlines correctly - no doubt you can evolve
a simple test.


Const ForRead = 1
Const ForWrite = 2
Const OverwriteIfExist = -1
Const OpenAsASCII = 0
Const OpenAsDefault = -2
Const FilePreserve = False
sInFile = " . . . spec . . . "

Set oInFile = oFso.OpenTextFile(sInFile,ForRead,FilePreserve,OpenAsDefault)

Handles the file for you whether ASCII or Unicode
We are trying to automate a lot of our packaging workflows, and as well
have a number of different domains serving our 30,000 users, we have
had to automate the creation of the security INF file and also automate
the update of the SIDS in the INF file as packages are deployed to
different domains.
I find I can write SCE template files without regard to whether they
result in ASCII or Unicode and they can still be used. The sceregvl.inf
however I always leave as Unicode.
It would be helpful if you could confirm whether the [Unicode] section
can be dropped from an ASCII file, or whether it should be set to
Unicode = No
Is this documented anywhere? I have searched through the Platform SDK
and DDK documentation without finding anything conclusive
I have never seen this doc'd, never looked for it, and never seen
this set to anything else.
 
I've found that if I remove the [UNICODE] section altogether, then edit
the INF via the MMC, it remains in ASCII format. We are doing a lot of
things with the INF files so they have to be in ASCII format. Thanks
for your thoughts though
 
Back
Top