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
RGuillermoProject ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Are you talking about domain based computers? We could easily use GPOs to change the startup type of services, then.
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
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
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

You can create GPO with registry key
Computer Configuration - Preferences - Windows Settings - Registry
and create registry key to change startup type.
Registry keys not needed because GPOs have native support for startup manipulation. Computer Configuration--Policies--Windows Settings--System Services.
You skipped one level, but that's much better solution.
 Computer Configuration--Policies--Windows Settings- Security Settings -System Services.
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.


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

Open in new window

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!!!
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.