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

  • Home
  • SEARCH
  • 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 176941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:58:00+00:00 2026-05-11T13:58:00+00:00

I want to programmatically create a logon account in Windows Vista with UAC enabled.

  • 0

I want to programmatically create a logon account in Windows Vista with UAC enabled.

I have an OCX that creates a user account and it has worked for years on NT and XP, but now our application fails with Access Denied when creating the account on Vista. If our customers turn off UAC then setup that app it works fine. However, it is not acceptable to have our users turn off UAC AND REBOOT before finishing configuring our app.

  • 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. 2026-05-11T13:58:00+00:00Added an answer on May 11, 2026 at 1:58 pm

    If you run your application with administrator privileges in Vista, then does it work?

    You can also create a COM object with elevated privileges using this code:

    HRESULT __stdcall CreateElevatedComObject(HWND hwnd, REFCLSID rclsid, REFIID riid, __out IUnknown ** ppv) {     OSVERSIONINFO ver={sizeof(ver)};     if (GetVersionEx(&ver) && ver.dwMajorVersion > 5)     {         BIND_OPTS3 bo;         WCHAR wszCLSID[50];         WCHAR wszMonikerName[300];          if (StringFromGUID2(rclsid, wszCLSID, ELEMENTS(wszCLSID)))         {             HRESULT hr = StringCchPrintf(wszMonikerName,                 ELEMENTS(wszMonikerName),                 L'Elevation:Administrator!new:%s',                 wszCLSID);             if (FAILED(hr))                 return hr;             memset(&bo, 0, sizeof(bo));             bo.cbStruct = sizeof(bo);             bo.hwnd = hwnd;             bo.dwClassContext  = CLSCTX_LOCAL_SERVER;             return CoGetObject(wszMonikerName, &bo, riid, (void **)ppv);         }         return E_FAIL;     }     else         return ::CoCreateInstance(rclsid,NULL,CLSCTX_ALL,riid,(void**)ppv); } 

    Running under UAC, it will present an elevation dialog. The object will run out of process in dllhost (I think) but with full admin privileges.

    Also look at the step by step guide for UAC in Vista.

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

Sidebar

Ask A Question

Stats

  • Questions 108k
  • Answers 108k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Yes, it's possible with CROSS APPLY (SQL 2005+): with testdata… May 11, 2026 at 9:13 pm
  • Editorial Team
    Editorial Team added an answer Users who run Windows Live Messenger will get a precense… May 11, 2026 at 9:13 pm
  • Editorial Team
    Editorial Team added an answer Try this regular expression: <(?:o|p)(?:[^"'>/]+|"[^"]*"|'[^']*')*> Valid XHTML syntax is presumed. May 11, 2026 at 9:13 pm

Related Questions

I want to programmatically create a new column in an MS Access table. I've
Using C# and ASP.NET I want to programmatically fill in some values (4 text
In my project I programmatically create a web part page and add a web
I want to programmatically invoke an event handler for a control. For example: DateTimePicker

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.