Re: SC.exe Config
- From: Lars Petersson <LarsPetersson@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 31 Jan 2007 08:45:02 -0800
Thanks :)
I have been spending much of today reading this rather excellent little gem:
http://www.microsoft.com/MSPress/books/reviews/default.aspx?id=6787&isbn=0-7356-2038-5
And I now see what you say about the variables.
My scripting in *nix is limited, but this is my first attempt at scripting
from scratch in Windows, so I'm learning as I go along.
PERL is a bit out of my league, but I wil definitely peruse the newsgroup
you suggested...
Thanks again,
Lars Petersson
MCSA: Messaging
"Herb Martin" wrote:
.
"Lars Petersson" <LarsPetersson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:52E93438-0E1A-4214-BD2A-4E05C1D0CEC5@xxxxxxxxxxxxxxxx
I'm having to change the account used by some services spread over a vast
number of servers and naturally I don't want to do this manually.
Unfortunately the organisation I work for is overly secure, so the
password
for the accounts to be used are not known by any one person.
Instead each password is broken down into two halves and two different
people would have each half.
The command I think I will need to use is essentially:
sc config $Service_Name obj= [DOM\User] password=$pass1$pass2
But what I need to know and haven't been able to find out is this:
Is the SC command clever enough to be able to pull each half of the
password
from a text file.
Not as you state it.
As in, I have a text file with the first half ($pass1) and another with
the
second half ($pass2).
Or would it set the password to $pass1$pass2?
It looks like you have (some) Unx/Linux scripting experience, since Windows
uses either %variable% for environment variables, %%a for batch file
iteration variables.
You are likely to be disappointed at the clunky support for command line
replacement in Windows (it inherits much from DOS), although it is quite
full, it isn't as seemless or straightforward as Linux type machines.
Usually when it gets this complicated, I write a Perl script to CREATE the
Windows commands, or I just use the Perl to do the job straight away.
If you tell us more, or ask in the microsoft.public.win2000.cmdprompt.admin
group you will likely get more specific help.
We do want to help.
--
Herb Martin, MCSE, MVP
http://www.LearnQuick.Com
(phone on web site)
- Follow-Ups:
- Re: SC.exe Config
- From: Herb Martin
- Re: SC.exe Config
- References:
- Re: SC.exe Config
- From: Herb Martin
- Re: SC.exe Config
- Prev by Date: Volume Shadow Copy "previous versions" tab disappears
- Next by Date: Re: TCP/IP Properties Windows Server 2003
- Previous by thread: Re: SC.exe Config
- Next by thread: Re: SC.exe Config
- Index(es):
Relevant Pages
|