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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:03:19+00:00 2026-05-13T19:03:19+00:00

…for current user? for all users? I’m working an a small program which needs

  • 0

…for current user? for all users?

I’m working an a small program which needs to create links in the start menu. Currently I’m hardcoding like below, but it only works in english locales, for example it should be “Startmenü” in german. What are cleaner, more portable approaches?

OUR_STARTMENU = os.environ['ALLUSERSPROFILE'] + '\Start Menu\Programs\Our Stuff'

thank you

  • 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-13T19:03:20+00:00Added an answer on May 13, 2026 at 7:03 pm

    A friend, Luke Pinner of Environment.gov.au, gave a solution by email which uses a core module (python 2.5+). Believed to be multi-lingual as the return from the API call is unicode. Tested on Win7 with Japanese locale, and on another us-english machine by manually changing Start Menu to point to %USERPROFILE%\Startmenü

    ''' Get windows special folders without pythonwin
        Example:
                import specialfolders
                start_programs = specialfolders.get(specialfolders.PROGRAMS)
    
    Code is public domain, do with it what you will. 
    
    Luke Pinner - Environment.gov.au, 2010 February 10
    '''
    
    #Imports use _syntax to mask them from autocomplete IDE's
    import ctypes as _ctypes
    from ctypes.wintypes import HWND as _HWND, HANDLE as _HANDLE,DWORD as _DWORD,LPCWSTR as _LPCWSTR,MAX_PATH as _MAX_PATH, create_unicode_buffer as _cub
    _SHGetFolderPath = _ctypes.windll.shell32.SHGetFolderPathW
    
    #public special folder constants
    DESKTOP=                             0
    PROGRAMS=                            2
    MYDOCUMENTS=                         5
    FAVORITES=                           6
    STARTUP=                             7
    RECENT=                              8
    SENDTO=                              9
    STARTMENU=                          11
    MYMUSIC=                            13
    MYVIDEOS=                           14
    NETHOOD=                            19
    FONTS=                              20
    TEMPLATES=                          21
    ALLUSERSSTARTMENU=                  22
    ALLUSERSPROGRAMS=                   23
    ALLUSERSSTARTUP=                    24
    ALLUSERSDESKTOP=                    25
    APPLICATIONDATA=                    26
    PRINTHOOD=                          27
    LOCALSETTINGSAPPLICATIONDATA=       28
    ALLUSERSFAVORITES=                  31
    LOCALSETTINGSTEMPORARYINTERNETFILES=32
    COOKIES=                            33
    LOCALSETTINGSHISTORY=               34
    ALLUSERSAPPLICATIONDATA=            35
    
    def get(intFolder):
        _SHGetFolderPath.argtypes = [_HWND, _ctypes.c_int, _HANDLE, _DWORD, _LPCWSTR]
        auPathBuffer = _cub(_MAX_PATH)
        exit_code=_SHGetFolderPath(0, intFolder, 0, 0, auPathBuffer)
        return auPathBuffer.value
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It is unlikely that the number of times you override… May 14, 2026 at 5:58 am
  • Editorial Team
    Editorial Team added an answer I just created some directories, shared them and mapped using:… May 14, 2026 at 5:58 am
  • Editorial Team
    Editorial Team added an answer I found the problem. window.location is an object so the… May 14, 2026 at 5:58 am

Related Questions

Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
CGI.escapeHTML is pretty bad, but CGI.unescapeHTML is completely borked. For example: require 'cgi' CGI.unescapeHTML('…')
I am currently running into a problem where an element is coming back from

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.