Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7679969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:00:02+00:00 2026-05-31T18:00:02+00:00

I want to make a file that toggles a registry value. I’m trying to

  • 0

I want to make a file that toggles a registry value.

I’m trying to make it get the value and then act based upon the results. I’m not too keen on console applications. The program just seems to hang. What am I doing wrong?

        Process p = new Process();

        ProcessStartInfo psi = new ProcessStartInfo();
        psi.CreateNoWindow = true;
        psi.UseShellExecute = false;
        psi.RedirectStandardOutput = true;
        psi.FileName = "c:\\windows\\syswow64\\cmd.exe";
        psi.Arguments = "reg query HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\AD7Metrics\\Engine\\{F200A7E7-DEA5-11D0-B854-00A0244A1DE2} /v ProgramProvider /s";
        p.StartInfo = psi;
        p.Start();

        if (p.StandardOutput.ReadToEnd().Contains("3FFA64D1D639"))
            psi.Arguments = "reg add HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\AD7Metrics\\Engine\\{F200A7E7-DEA5-11D0-B854-00A0244A1DE2} /v ProgramProvider /d {170EC3FC-4E80-40AB-A85A-55900C7C70DE} /f";
        else
            psi.Arguments = "reg add HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\AD7Metrics\\Engine\\{F200A7E7-DEA5-11D0-B854-00A0244A1DE2} /v ProgramProvider /d {4FF9DEF4-8922-4D02-9379-3FFA64D1D639} /f";

        p.StartInfo = psi;
        p.Start();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T18:00:04+00:00Added an answer on May 31, 2026 at 6:00 pm

    Get familiar with CMD.exe /c and /k switches.

    And as commenter said there’s no reason to make it so complicated. If you really need external program (I see no reason), you can invoke reg.exe directly, without cmd.exe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a batch file that waits for a few minutes, then
I want to make a method that takes any file and reads it as
I want to make a script that takes a URL to a file and
To allow caching a PHP generated file, I want to make sure, that the
I want to write some configuration in web.config file, that will make my ASP.Net
I want to make a dummy Win32 EXE file that is much larger than
I want to make my android application as executable file that can install in
I have a CSV file that I want to make available for my Android
Hy! I want to make a autosuggest from my php file that returns a
I want to make a batch file that takes a user input in minutes,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.