Solved

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

Posted on 2009-05-08
3
336 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 70

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 70

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
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…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

734 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