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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:55:12+00:00 2026-05-25T21:55:12+00:00

I really need your help. I tried everything but the result is always the

  • 0

I really need your help. I tried everything but the result is always the same, nothing. Please advise.

And this is my code

#include <windows.h>
#include <iostream>
#include <windef.h>

using namespace std;

int main (void)
{
    HKEY hKey;
    LONG regOpenResult;

    const char PATH[] = "C:\\Users\\les\\Documents\\visual studio 2010\\Projects\\registryTester\\Debug\\registryTester.exe";

    RegCreateKeyExW(HKEY_LOCAL_MACHINE,
            L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",
            0,
            NULL,REG_OPTION_VOLATILE,
            KEY_SET_VALUE,
            NULL,
            &hKey,
            NULL
    );

    RegSetValueExW(hKey, L"regTest", 0, REG_SZ, (BYTE*)PATH, strlen(PATH));

    RegCloseKey(hKey);
}
  • 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-25T21:55:12+00:00Added an answer on May 25, 2026 at 9:55 pm

    Check the return status of each API call!!!! Use GetLastError () for each failure.

    Knowing the error should lead you to resolve the problem.

    Otherwise, you’re flying completely blind…

    Yes, PATH shouldn’t be an 8-bit character string if you’re calling a 16-bit Unicode API. But it’s not necessarily the only problem.

    And yes, “permissions” could very definitely be an issue if you’re using Vista, Windows 7 or higher.

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

Sidebar

Related Questions

I really need your help for this. I am relatively new to programming and
i really need your help with a CSS-Layout. I tried a few time, however
I apologize for a lengthy question, but I really need your help. As a
I really need help on this one. I am having a simple login form
I really need some help with this as I have been trying to fix
I really need help here. I'm desperate at this point. I have NSOperation that
I need your help, i'm stacked on this project. When i run my applicaion
I really need your help since I have a frustrating problem. I'm downloading data
I really need your help in my issue very quickly and it's too close
We have a security problem here and we really need your help and inputs.

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.