Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2009-05-08
3
Medium Priority
?
350 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 71

Accepted Solution

by:
Qlemo earned 2000 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 71

Assisted Solution

by:Qlemo
Qlemo earned 2000 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

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
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 …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

636 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