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

Related Questions

I want to programmatically create a directory on the server using ASP.NET. I have
I have a Sql Server that uses Windows Authentication. I want to connect to
I want to programmatically determine if the current user (or process) has access to
When I create a node I want it to programmatically create some nodes that
I want to programmatically create a new column in an MS Access table. I've
I want to programmatically create a new log4j ConsoleAppender and add it as an
I want to create UI elements programmatically without using xib files. All of the
I want to create a webpart programmatically like below to contain fixed links to
I created a UIButton programmatically and I want to create an action to handle
I have a desktop app that I'm making and I want users to have

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.