|
|||||||
![]() |
|
|
LinkBack (2) | Thread Tools |
|
|
#1
|
|
|
DH's Dormant Dragon
|
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:
|
|
|
|
|
|
|
#2 | |
|
Member
Join Date: Mar 2003
Posts: 5,989
Rep Power: 55 ![]() ![]() ![]() ![]() |
Quote:
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 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. |
|
|
|
|
|
|
#3 | ||
|
DH's Dormant Dragon
|
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:
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:
|
||
|
|
|
|
|
#4 |
|
Member
Join Date: Mar 2003
Posts: 5,989
Rep Power: 55 ![]() ![]() ![]() ![]() |
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?
|
|
|
|
|
|
#5 | |
|
DH's Dormant Dragon
|
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:
|
|
|
|
|
|
|
#6 |
|
Member
Join Date: Mar 2003
Posts: 5,989
Rep Power: 55 ![]() ![]() ![]() ![]() |
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.
|
|
|
|
|
|
#7 | |
|
DH's Dormant Dragon
|
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:
|
|
|
|
|
|
|
#8 |
|
Member
Join Date: Mar 2003
Posts: 5,989
Rep Power: 55 ![]() ![]() ![]() ![]() |
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? |
|
|
|
|
|
#9 | |
|
DH's Dormant Dragon
|
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:
|
|
|
|
|
|
|
#10 |
|
Member
Join Date: Mar 2003
Posts: 5,989
Rep Power: 55 ![]() ![]() ![]() ![]() |
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.
|
|
|
|
![]() |
| 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 | |