Solved

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

Posted on 2009-05-08
3
297 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 68

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 68

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now