Solved

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

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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
How to record audio from input sources to your PC ā€“ connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 ā€“ both 32 bit & 64.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). ā€¦
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial sā€¦

803 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