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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:38:22+00:00 2026-06-01T05:38:22+00:00

I made a program which i want to launch with some protocal for eg

  • 0

I made a program which i want to launch with some protocal for eg : proto
Called like proto://122122 from the browser.

When the user clicks on the link it opens my program and sends the number ahead it as some variable or something.

I have basic knowledge of c++ but no knowledge on this topic
Thanks

  • 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-01T05:38:23+00:00Added an answer on June 1, 2026 at 5:38 am

    You will need to add the protocol to the registry, in HKEY_CLASSES_ROOT.

    In particular you need to create the following keys:

    [HKCR\proto]
    @="URL:My Protocol"
    "Url Protocol"=""
    
    [HKCR\proto\shell\open\command]
    @="Path\To\My\Program.exe '%1'"
    

    Then opening proto://122122 will execute Program.exe, and the numbers will be available in $CmdLine[1] (assuming you are using AutoIt, as you tagged it like that but don’t mention it at all).

    Edit:

    To programatically do the above in AutoIt, you will need to look at the registry functions, in particular RegWrite. Above I was lazy and gave a .reg file like answer, but in AutoIt it looks something like:

    Local $sProtoName = "proto"
    
    RegWrite("HKCR\" & $sProtoName)
    RegWrite("HKCR\" & $sProtoName, "", "REG_SZ", "URL:My Protocol")
    RegWrite("HKCR\" & $sProtoName, "Url Protocol", "REG_SZ", "")
    RegWrite("HKCR\" & $sProtoName & "\shell\open\command")
    RegWrite("HKCR\" & $sProtoName & "\shell\open\command", "", "REG_SZ", "Path\To\My\Program.exe '%1'")
    

    As with all things registry, don’t do it, if you don’t know what you are doing. Modifying HKCR is relatively safe. The worst that will happen is you’ll overwrite some other protocol and it’s a bit of a pain to undo, but I still recommend doing some reading first. Google is your best friend as usual, but a small into like this one is probably a good idea.

    To remove the above code just delete the entire “HKCR\proto” key.

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

Sidebar

Related Questions

I made a program which can generate primes. I want the program to write
I want to make a program in C which will ask the user to
I made a FCGI program in C using fastcgi.com's API. I've called FCGI_Accept like
I've made a small program which has 2 buttons and each does certain thing.
Problem: Have made a small mail program which works perfectly on my developer pc
I'm a beginner in programming. I've just made a program called Guessing Game. And
I have a python program which opens a new windows to display some 'about'
I made a program which uses a filesystemwatcher component, but it seems to record
I have written a multithreaded program which does some thinking and prints out some
i am working on a program which draws polygons according to user inputs. 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.