Solved

can we change the service log on user by DOS commands?

Posted on 2009-05-08
3
326 Views
Last Modified: 2013-11-29
For the user log on the windows services, can I change the user and setup the password with DOS commands? For example, from
Log on as:
Local System account
to
This account: sysadm1
and set up the password.
 
0
Comment
Question by:jl66
  • 2
3 Comments
 
LVL 69

Accepted Solution

by:
Qlemo earned 500 total points
ID: 24338012
sc config YourService obj= YourUser password= YourPwd
0
 

Author Comment

by:jl66
ID: 24338989
Thanks for info. Can you show me one more command?
how to get obj (YourUser)? The logic is
if obj != sysadm, then do
  sc config YourService obj= YourUser password= YourPwd
end
0
 
LVL 69

Assisted Solution

by:Qlemo
Qlemo earned 500 total points
ID: 24342974

for /F "tokens=2 delims=: " %%L in ('sc qc YourService ^| findstr SERVICE_START_NAME') do set obj=%%L
if not "%obj%" == "sysadm" sc config YourService obj= YourUser password= YourPwd

Open in new window

0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Computer hardware speed units 9 59
Exclude all *.dat files from a 7z.exe command line 13 17
flash professional 3 21
FTP server windows 2008 5 39
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question