Automatization of windows service change

Hello Experts,
How do I make a program in visual basic 2013 that is able to accomplish one or both of the following steps:

a. Go into Services, and stop and disable the "Distributed Link Tracking" service. It tries to find a new location for shortcuts having no valid target info anymore, and the result is wrong/random most of the time.

b. You can also disable this behavior through group policies by enabling the following setting:
 User Configuration/Policies/Administrative Templates/Windows Components/File Explorer/Do not track shell shortcuts during roaming

We have to many computers to do it manually that is why I am planning to distribute a small exe.
some stations still have win XP, others win 7 and others win8

Please your advice
Regards,
RGuillermoProject ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

McKnifeCommented:
Are you talking about domain based computers? We could easily use GPOs to change the startup type of services, then.
0
JustInCaseCommented:
To stop "Distributed Link Tracking" service you can use batch file with:

net stop TrkWks

To start "Distributed Link Tracking" service you can use

net start TrkWks

More details you can find here... change autostart, registry entries etc
0
RGuillermoProject ManagerAuthor Commented:
Is there any command direct from visual basic .NET that I can use instead of that batch file?
And yes we also have a domain with around 200 pcs. What would be the command in case of a  GPO ?
Thank you un advance
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

JustInCaseCommented:
You can create GPO with registry key
Computer Configuration - Preferences - Windows Settings - Registry
and create registry key to change startup type.
0
McKnifeCommented:
Registry keys not needed because GPOs have native support for startup manipulation. Computer Configuration--Policies--Windows Settings--System Services.
Alternately: https://technet.microsoft.com/en-us/library/cc732482.aspx
0
JustInCaseCommented:
You skipped one level, but that's much better solution.
 Computer Configuration--Policies--Windows Settings- Security Settings -System Services.
:)
0
käµfm³d 👽Commented:
Is there any command direct from visual basic .NET that I can use instead of that batch file?
Just use the command suggested, and execute it using the Process class.

e.g.

System.Diagnostics.Process.Start("cmd.exe", "net stop TrkWks")

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RGuillermoProject ManagerAuthor Commented:
Excellent answers. All very useful !
Thnaks to all experts!!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.