DriverHeaven.net

 
Looking for the skin chooser?
 
 
  • Home

  • Reviews

  • Articles

  • News

  • Tools

  • GamingHeaven

  • Forums

  • Network

 

Go Back   DriverHeaven.net > Forums > Software / Tools > Windows Vista Forum


Reply
 
LinkBack (2) Thread Tools
Old Apr 3, 2007, 12:39 PM   2 links from elsewhere to this Post. Click to view. #1
DH's Dormant Dragon
 
Judas's Avatar
 
Join Date: May 2002
Location: IN Rem-Dormancy
Posts: 28,421
Rep Power: 127
Judas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seen
System Specs

using CMD for start/setting services

PangingJr (i think you'd be the most likely one to know )

Is there a way you can set a service's settings via the CMD?

Being windows vista, and trying to look up stuff on it is slightly difficult, specially when the information available today seems much much more oriented towards people that already have a fairly large wealth of knowledge in that area.

Anyways:

I know how to start a service or stop one, but if i wanted to say set a service's startup value from "automatic" to "manual" without actually having to go through all the admin tools and services.. or even through windows (is there a way to get command prompt in vista? )

Also, if a BAT file is created and put into the ALL USERS startup, even if your logging in as admin, is there a chance the bat file won't run due to privilages, and if so, is there a way to say start the bat file off with a admin value allow settings to be set permanently such as change the service startup?

anyone else know anything about this?
__________________
Quote:
I accidently my Reputation
Judas is offline   Reply With Quote


Old Apr 3, 2007, 01:43 PM   #2
Member
 
Join Date: Mar 2003
Posts: 5,989
Rep Power: 55
PangingJr is just really nicePangingJr is just really nicePangingJr is just really nicePangingJr is just really nice

Quote:
SC

DESCRIPTION:
SC is a command line program used for communicating with the Service Control Manager and services.

USAGE:
sc <server> [command] [service name] <option1> <option2>...


The option <server> has the form "\\ServerName"
Further help on commands can be obtained by typing: "sc [command]"
Commands:
query-----------Queries the status for a service, or enumerates the status for types of services.
queryex---------Queries the extended status for a service, or enumerates the status for types of services.
start-----------Starts a service.
pause-----------Sends a PAUSE control request to a service.
interrogate-----Sends an INTERROGATE control request to a service.
continue--------Sends a CONTINUE control request to a service.
stop------------Sends a STOP request to a service.
config----------Changes the configuration of a service (persistent).
description-----Changes the description of a service.
failure---------Changes the actions taken by a service upon failure.
failureflag-----Changes the failure actions flag of a service.
sidtype---------Changes the service SID type of a service.
privs-----------Changes the required privileges of a service.
qc--------------Queries the configuration information for a service.
qdescription----Queries the description for a service.
qfailure--------Queries the actions taken by a service upon failure.
qfailureflag----Queries the failure actions flag of a service.
qsidtype--------Queries the service SID type of a service.
qprivs----------Queries the required privileges of a service.
delete----------Deletes a service (from the registry).
create----------Creates a service. (adds it to the registry).
control---------Sends a control to a service.
sdshow----------Displays a service's security descriptor.
sdset-----------Sets a service's security descriptor.
showsid---------Displays the service SID string corresponding to an arbitrary name.
GetDisplayName--Gets the DisplayName for a service.
GetKeyName------Gets the ServiceKeyName for a service.
EnumDepend------Enumerates Service Dependencies.

The following commands don't require a service name:
sc <server> <command> <option>
boot------------(ok | bad) Indicates whether the last boot should
be saved as the last-known-good boot configuration
Lock------------Locks the Service Database
QueryLock-------Queries the LockStatus for the SCManager Database

EXAMPLE:
sc start MyService



more example of command lines or as in a two lines batch file to config a service's startup type and stop or start that service...

Code:
sc config W32Time start= disabled
sc stop W32Time
Code:
sc config W32Time start= demand
sc start W32Time
Code:
sc config W32Time start= auto
sc start W32Time
Do leave a space between the equals sign and the auto/demand/disabled,
and make sure that you enter the "Service name" (not the service's display name) correctly,
e.g. Service name of Windows Time service is "W32Time", Service name of Remote Registry service is "RemoteRegistry".


Vista Services's start types: boot | system | auto | demand | disabled | delayed-auto

Delayed-Autostart Service is new start type in Vista ( http://www.microsoft.com/technet/tec...3/VistaKernel/ )

If you've ever logged onto a Windows system immediately after it starts, you've probably experienced delays before your desktop is fully configured and you can interact with the shell and any applications you launch. While you're logging on, the Service Control Manager is starting the many Windows services that are configured as automatic start services and therefore activate at boot time. Many services perform CPU and disk-intensive initializations that compete with your logon activities. To accommodate this, Windows Vista introduces a new service start type called delayed automatic start, which services can use if they don't have to be active immediately after Windows boots.

The Service Control Manager starts services configured for delayed automatic start after the automatic-start services have finished starting and it sets the priority of their initial thread to THREAD_PRIORITY_LOWEST. This priority level causes all the disk I/O the thread performs to be Very Low I/O priority. After a service finishes initializing, the Service Control Manager sets its priority to normal. The combination of the delayed start, low CPU and memory priority, and background disk priority greatly reduce interference with a user's logon. Many Windows services, including Background Intelligent Transfer, Windows Update Client, and Windows Media Center, use the new start type to help improve the performance of logons after a boot.

Last edited by PangingJr; Apr 3, 2007 at 03:13 PM.
PangingJr is offline   Reply With Quote
Old Apr 3, 2007, 03:20 PM   #3
DH's Dormant Dragon
 
Judas's Avatar
 
Join Date: May 2002
Location: IN Rem-Dormancy
Posts: 28,421
Rep Power: 127
Judas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seen
System Specs

PangingJR, using the windows gui to set the services, i've tried using the Delayed AutoStart, but when i select it, and then click APPLY, it gives me an ERROR 87 Code.

Reguardless.

PangingJR, if you could.

I need to do the following,

I need to create a Bat file that first grants full access to the services (similare to that of "run as admin" ), then sets a specific service to a set start type, followed by starting a specific service.

So far i think the way i've read through on this is i have the following BAT file so far:

Quote:

sc config "Ati External Event Utility" start= demand
sc start "Ati External Event Utility"

So far a bat file with the above WORKS, as long as your within windows vista and you run the bat file by right clicking on it and selecting RUN AS ADMIN. The service changes to manual mode, and then service then starts.

But i NEED to find a way to get it to do all that without requireing the RUN AS ADMIN right clicking, as this bat file should be in the STARTUP folder so that it auto starts
__________________
Quote:
I accidently my Reputation
Judas is offline   Reply With Quote
Old Apr 3, 2007, 04:01 PM   #4
Member
 
Join Date: Mar 2003
Posts: 5,989
Rep Power: 55
PangingJr is just really nicePangingJr is just really nicePangingJr is just really nicePangingJr is just really nice

hmm you can first try setting the service's startup type to manual by hand in the Services, and then have the sc start "Ati External Event Utility" batch file command... on your desktop, then reboot your computer and once your are back in Vista's desktop run the batch file. can you do this?
PangingJr is offline   Reply With Quote
Old Apr 3, 2007, 04:11 PM   #5
DH's Dormant Dragon
 
Judas's Avatar
 
Join Date: May 2002
Location: IN Rem-Dormancy
Posts: 28,421
Rep Power: 127
Judas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seen
System Specs

i cannot run the bat file without right clicking on it and selecting RUN AS ADMIN... if i run it without that, i get the error code 5, access denied message for both commands.
__________________
Quote:
I accidently my Reputation
Judas is offline   Reply With Quote
Old Apr 3, 2007, 05:46 PM   #6
Member
 
Join Date: Mar 2003
Posts: 5,989
Rep Power: 55
PangingJr is just really nicePangingJr is just really nicePangingJr is just really nicePangingJr is just really nice

i don't konw another way to do it as of now, but to disable UAC, then you should be able to set the service to manual and let Windows runs the batch file to start the service from the Startup... if this is what you want.
PangingJr is offline   Reply With Quote
Old Apr 3, 2007, 06:49 PM   #7
DH's Dormant Dragon
 
Judas's Avatar
 
Join Date: May 2002
Location: IN Rem-Dormancy
Posts: 28,421
Rep Power: 127
Judas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seen
System Specs

Yeah that does work, but i was hopeing there would be a method in which the UAC could remain active and still be able to set these parameters....

I guess there isn't one, but maybe someone else knows something.
__________________
Quote:
I accidently my Reputation
Judas is offline   Reply With Quote
Old Apr 4, 2007, 10:17 AM   #8
Member
 
Join Date: Mar 2003
Posts: 5,989
Rep Power: 55
PangingJr is just really nicePangingJr is just really nicePangingJr is just really nicePangingJr is just really nice

ok since you insist to do this... try with real Administrator account and the UAC enabled.
create Administrator name account if you do not have one yet, then log off existing user and log into Windows with Administrator, then go to the User Accounts in the Control Panel and create password for this account (and rename the account's name from Administrator to any name if you like). and just do not remove the old user account at this time.
then change the service's startup type to manual, and leave a shortcut to the batch file which contained command to start the service in the Startup. then try restarting your comeputer and logging on with the new Administrator... and see?
PangingJr is offline   Reply With Quote
Old Apr 4, 2007, 12:49 PM   #9
DH's Dormant Dragon
 
Judas's Avatar
 
Join Date: May 2002
Location: IN Rem-Dormancy
Posts: 28,421
Rep Power: 127
Judas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seenJudas has a divinity and aura the likes we have never seen
System Specs

That would probably do it..

But that's a fairly round about way of doing it unfortuneatly...

Thanks though pangingjr,

I was just hopeing that anyone that needed this bat file could download it and pop it into thier startup folder and then not have to worry about it at all.

Trying to create a totally automatic and easy to use Hotfix for the ati catalyst and for those with the BSOD, this bat prevents that from happening (in alot of cases) while retaining full ATI catalyst features and controls. (7.3s)
__________________
Quote:
I accidently my Reputation
Judas is offline   Reply With Quote
Old Apr 4, 2007, 07:02 PM   #10
Member
 
Join Date: Mar 2003
Posts: 5,989
Rep Power: 55
PangingJr is just really nicePangingJr is just really nicePangingJr is just really nicePangingJr is just really nice

another way would be to find a RunAs program that accepts password so you can use it in a batch file, the Run As Utility in Vista does not include password in its parameters, and a password is required to be typed in When prompted.
PangingJr is offline   Reply With Quote
Reply

Bookmarks

Thread Tools


LinkBacks (?)
LinkBack to this Thread: http://www.driverheaven.net/windows-vista-forum/133549-using-cmd-start-setting-services.html
Posted By For Type Date
MMC Services startup control - Microsoft Windows Vista Community Forums - Vistaheads This thread Refback Jul 24, 2009 10:51 AM
MMC Services startup control This thread Refback Jul 23, 2009 08:33 AM