can I automate a program in services?
can I automate a program in services?
I sync my iPad and an iPod with iTunes every morning. ITunes does not recognize either of my devices until I stop and start "Apple mobile device" in services. I have uninstalled and installed iTunes a couple of times with no joy. Is there a way when I start my computer in the morning then can stop and start "Apple mobile device" automatically?
Re: can I automate a program in services?
yeah, create a batch script that runs everytime you turn on your computer (just open notepad, save it as a *.bat file in %AppData%\Microsoft\Windows\Start Menu\Programs\Startup
Type one of the following:
To start a service, type:
net startservice
To stop a service, type:
net stopservice
To pause a service, type:
net pauseservice
To resume a service, type:
net continueservice
Re: can I automate a program in services?
Cool thanks, I'll give it a try.
Re: can I automate a program in services?
You could also run that file using the scheduler, then you could have more options…like running at a certain time each day, instead of at startup.
Re: can I automate a program in services?
I sync my devices as soon as I start the computer so in case I have to leave the house I have ipad/ipod ready to go with.
But I need to look into the Scheduler so i have a better idea of what it does. Like I'd like to crerate a restore point every couple of weeks.......
But I need to look into the Scheduler so i have a better idea of what it does. Like I'd like to crerate a restore point every couple of weeks.......
- Krom
- DBB Database Master
- Posts: 16137
- Joined: Sun Nov 29, 1998 3:01 am
- Location: Camping the energy center. BTW, did you know you can have up to 100 characters in this location box?
- Contact:
Re: can I automate a program in services?
Windows creates restore points automatically far more often than every couple of weeks.
Re: can I automate a program in services?
Well that's what I thought but if I'm not installing or updating not much is happening.
Re: can I automate a program in services?
DBB Captain, going to try a bat file but have a couple of questions. This is out of my purview.
1. If I add a "stop" and a "start" bat file in startup will windows know which one to do first?
2. To start the service I type "To start a service, type:net startservice" and then what? How do I specify what service.
Looked at the "Scheduler" but also got lost when trying to set it up.
1. If I add a "stop" and a "start" bat file in startup will windows know which one to do first?
2. To start the service I type "To start a service, type:net startservice" and then what? How do I specify what service.
Looked at the "Scheduler" but also got lost when trying to set it up.
Re: can I automate a program in services?
1. It won't (or maybe it goes through in alphabetical order but I wouldn't rely on it). Put both commands in the same .bat file consecutively - that is at least guaranteed to do the job properly.
2. That comes from the "name" column in the Services list. In your case, assuming the service name is what you said in the first post, the commands should be as follows:
net stop "Apple mobile device"
net start "Apple mobile device"
I'm not certain whether you'll need to run the .bat elevated - you can try it manually first though, and it'll tell you if the commands failed. If they do fail you'll probably need to use task scheduler to get around that.
2. That comes from the "name" column in the Services list. In your case, assuming the service name is what you said in the first post, the commands should be as follows:
net stop "Apple mobile device"
net start "Apple mobile device"
I'm not certain whether you'll need to run the .bat elevated - you can try it manually first though, and it'll tell you if the commands failed. If they do fail you'll probably need to use task scheduler to get around that.
Re: can I automate a program in services?
Here's a pick of the Services. Bat file ran, no errors but didn't work.
Also tried "net stop the service "Apple mobile device" and net start the service "Apple mobile device"
No joy yet. May have to learn the "Scheduler" but that's down on my list of priorities.
Starting to build a new website with WordPress, still just going through the tutorials.
Re: can I automate a program in services?
You don't literally use the phrase "net startservice", you'd use "net startactualnameofservice"
To find the name of your services, check the registry editor under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services , or if you double click the service Services.msc, you'll see the actual name.
To find the name of your services, check the registry editor under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services , or if you double click the service Services.msc, you'll see the actual name.
Re: can I automate a program in services?
Here's a pic of the registery.
Not sure of actual name "Apple Mobile Device"?
Re: can I automate a program in services?
Yeah, you'll need the one in the DisplayName value - that registry key is how net start figures out what binary corresponds to the service you want.
Re: can I automate a program in services?
Well we got the correct name and no errors but no joy. Also, even after manually stopping and starting Apple Mobile Device in Services, I have to restart iTunes. but again thanks for the posts.
- Krom
- DBB Database Master
- Posts: 16137
- Joined: Sun Nov 29, 1998 3:01 am
- Location: Camping the energy center. BTW, did you know you can have up to 100 characters in this location box?
- Contact:
Re: can I automate a program in services?
You could try delaying the automatic startup of itunes, it is possible itunes is loading before the service is ready and so it can't sync (could happen especially if the computer automatically logs in).
Re: can I automate a program in services?
Also tried a separate bat file for "stop" and "start" ....no joy.
Re: can I automate a program in services?
Delay startup....hummmmm!
I'll try WinPatrol to delay iTunes a bit, thanks.
I'll try WinPatrol to delay iTunes a bit, thanks.
Re: can I automate a program in services?
Nope! It does look like iTuneshelperexe is supposed to recognize devices but I turned that on off and that didn't seem to help either. Starting and stopping "Apple Mobile Devices" is mightily fixed at this point.