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 7707911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:28:42+00:00 2026-06-01T00:28:42+00:00

I am trying to set support information on machines with C#. I have one

  • 0

I am trying to set support information on machines with C#. I have one registry file to import (I have tried with Microsoft.Win32 as well, code below has process call commented) and two files to copy into system32. The files are on a share and other portions of the code interact properly with share. First code so I might be way off here

try
                {
                    //String pathtooemreg = Environment.ExpandEnvironmentVariables(@"%HOMEDRIVE%\Windows\System32\oeminfo.reg");
                    //System.IO.File.Copy(@"\\files\tools\oeminfo.reg", (pathtooemreg), true);
                    //Process p = new Process();
                    //p.StartInfo.FileName = @"regedit";
                    //p.StartInfo.Arguments = " /s" + (pathtooemreg);
                    //p.StartInfo.UseShellExecute = true;
                    //p.StartInfo.CreateNoWindow = true;
                    //p.EnableRaisingEvents = true;
                    //p.Start();
                    //p.WaitForExit();
                    Registry.SetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\OEMInformation", "Model", "");
                    Registry.SetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\OEMInformation", "Manufacturer", "somecompanyname");
                    Registry.SetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\OEMInformation", "Logo", "oemlogo.bmp");
                    Registry.SetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\OEMInformation", "SupportPhone", "somephonenumber");
                    Registry.SetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\OEMInformation", "SupportURL", "someurl");
                    Registry.SetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\OEMInformation", "SupportHours", "");
                    String pathtooeminfo = Environment.ExpandEnvironmentVariables(@"%HOMEDRIVE%\Windows\System32\oeminfo.ini");             
                    System.IO.File.Copy(@"\\files\tools\oeminfo.ini", (pathtooeminfo), true);
                    String pathtooemlogo = Environment.ExpandEnvironmentVariables(@"%HOMEDRIVE%\Windows\System32\oemlogo.bmp");
                    System.IO.File.Copy(@"\\files\tools\oemlogo.bmp", (pathtooemlogo), true);
                    listBox1.Items.Add(@"3b.Done Installing OEM/Support info.");
                }
                catch (Exception err)
                {
                    MessageBox.Show(this, "Error: " + err.Message);
                }
  • 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-06-01T00:28:43+00:00Added an answer on June 1, 2026 at 12:28 am

    Invariably questions such as these arise due to you running a 32 bit process and registry redirection meaning that the settings are made in the 32 bit registry view. Silent failure is probably actually success, but the settings are not being made where you expect.

    I expect you’ll find your settings under HKLM\Software.Wow6432Node. Write to the 64 bit view either by targetting AnyCPU or by using the RegistryView enumeration.

    The code that copies files will fall foul of the file system redirector in much the same way.

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

Sidebar

Related Questions

Trying to set it so if a certain condition is met then one of
I have been trying to set up OpenCV for the past few days with
I'm trying to set up a web server that will support streaming video to
Hey, all. I'm currently trying to set up FTP support for my ANT (version
I have been trying to set up Spring 3 annotation-based validation, guided by http://static.springsource.org/spring/docs/3.0.0.RC3/spring-framework-reference/html/ch05s07.html
Hello I am trying to set up a MyBB Forum. I tried to get
In Mac OSX lion, I'm trying to set default application for specific file types.
Im trying set the single table inheritance model type in a form. So i
Trying to set up a dependency in C++ with a parent-child relationship. The parent
Trying to set up a new project, and running into a weird issue. I

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.