Using the Connectify Command Line (MAX Users)

Connectify Hotspot MAX includes a command line program, connectify_cli, which allows you to control many of the settings that are normally changed in Connectify Hotspot's window, from scripts or other programs.

It is installed with Connectify Hotspot, in C:\Program Files (x86)\Connectify. Open a Command Prompt, go to that folder, and run it:

cd "C:\Program Files (x86)\Connectify"
connectify_cli status

The command line program needs a Hotspot MAX license. On any other edition, every command returns this error:

{"err":{"errorCode":3477078017,"errorText":"License Level Invalid"},"res":false}

Usage:

connectify_cli
        client ip|mac|hostname [--gaming never|auto|psn|xbl|nwc] [--internet on|off] [--local on|off] [--ip <last octet|managed>]
        clients [--connected|--disconnected]
        dhcp [managed | <IP as 10.###.###.### or 172.<16-31>.###.###> or 192.168.###.###>]
        dns [status|auto|cloudflare|cloudflare-family|google|quad9|opendns|<ip>[,<ip>...]]
        errorcodes
        firewall [--internet [on|off]] [--local [on|off]] [--adblock [on|off]]
        --help
        info
        --interactive
        list-adapters
        lowdata [on|off]
        pause [never|onnointernet]
        settings
        start [--mode <hotspot|router|repeater>] [--ssid <hotspot name>]  [--pass <hotspot password>] [--inet-mode routed|bridged] [--inet <auto|none|<adapter guid>>] [--shareover <adapter guid>]
        startup [never|always|resume]
        status
        stop
        version

The output of the command is formatted as JSON to make processing from other programs easier. Every result has a boolean field named "res". If res is true, then the command ran successfully. Commands that read something also return the result in a field named after the command (see below); commands that change something return just "err" (null) and "res", as in {"err":null,"res":true}. Values such as on and off are not case sensitive. An option a command doesn't know, or a value it doesn't accept, is an error that says what was wrong. If "res" is false, then there was an error. In this case, there is an "err" field which contains an object with both an integer errorCode and a text errorText. For example:

{"err":{"errorCode":3477078016,"errorText":"Unknown Error Occurred"},"res":false}

"--interactive" puts the command line program in interactive mode, where it takes one command per line, then outputs results. Each command's output comes as a single line of text (which, for commands like "clients" and "list-adapters", can be extremely long, so do not read it into a fixed size buffer). "quit" or "exit" ends interactive mode. Blank lines are skipped. A command it doesn't know returns an error, like any other result; only --help prints the usage message, which is several lines.

When connectify_cli runs a single command, its exit code is 0 if res is true and 1 if res is false, so a batch file can check %ERRORLEVEL%. It is also 1 for a command it doesn't know, and 0 for --help or no command.

Some settings can only be changed in Connectify Hotspot's window, not from the command line: Prefer Wi-Fi Direct, UPnP (Let apps open ports automatically), Reach this PC at any of its addresses, and the Power settings.

Commands

--help

Shows the usage message. So does running connectify_cli with no command, or with one it doesn't know (except in interactive mode, where a command it doesn't know returns an error).

info

Shows information about the current state of the hotspot. Connectify Hotspot 27 also reports the hotspot's Wi-Fi channel in hotspotChannel and its frequency in MHz in hotspotChannelMhz (0 when unknown), and in hotspotChannelSource whether the channel came from the hotspot adapter ("hn") or from this PC's own Wi-Fi connection ("phy"). These three are 0, 0 and null when the hotspot isn't running or is paused.

Sample output (from an earlier version):

{"res":true,"info":{"adblockTrackerBlocks":0,"adblockTrackerBlocksAllTime":3,"hostName":"MYPC","ip":"192.168.137.1","repeatedNetwork":"","upTime":636695024518064056,"upstreamInterface":null}}

start

Sends the command to start the hotspot and waits for the result. With no options, it starts the hotspot with its current settings. If the hotspot is already running, start restarts it (stops it, then starts it with the new settings), which disconnects every device.

Optional arguments:

  • --mode
    • hotspot - a Wi-Fi hotspot. This is the mode used whenever start is given any options without --mode.
    • router - a Wired router. Use --shareover to choose the Ethernet port.
    • repeater - a Wi-Fi repeater.
  • --ssid - the name that devices see to join the hotspot. With --mode repeater, it is the Wi-Fi network to repeat instead, given as its Windows Wi-Fi profile name (usually the same as the network name).
  • --pass - the password devices use to join this hotspot.
  • --inet-mode
    • routed - Connectify uses a NAT to translate all device traffic to come from the Connectify computer's IP address.
    • bridged - Connectify passes device traffic through, allowing devices to appear to be on the shared network. Only works on networks like Wi-Fi and Ethernet where one connection can support multiple IP addresses.
  • --inet - the internet to share. See also What should I choose for Internet to share?
    • auto - selects the best internet connection. If the connection stops working, it will select another connection if one is available.
    • none - no internet sharing ("Don't share internet").
    • <adapter guid> - the adapter GUIDs can be found using the list-adapters command, below.
  • --shareover <adapter guid> - for a Wired router, the Ethernet port to share over.

An option that is given without a value after it returns an error, "Missing value after" followed by the option. So does an option start doesn't know, or a value it doesn't accept: --mode, --inet-mode, auto and none are not case sensitive, and an adapter GUID must be one that list-adapters shows, with or without its braces. The whole line is checked before anything is changed, so a mistake anywhere in it changes nothing and doesn't start the hotspot.

start waits until the hotspot is running (Enabled, or Paused if it pauses before the wait ends) or has failed to start. If it is still starting after 5 minutes, start returns an error and stops waiting; use status to follow it. stop waits the same way.

Sample output:

{"err":null,"res":true}

stop

Sends the command to stop the hotspot. Waits until the command completes to return results.

Sample output:

{"err":null,"res":true}

status

Returns the state of the hotspot in a string field named "status", which will have one of the following values:

  • Disabled - the hotspot is not running. Use "start" to start it.
  • Enabled - the hotspot is running, and waiting for devices.
  • Starting - the hotspot is in the midst of starting up. If successful, it will change to Enabled.
  • Stopping - the hotspot is stopping, and will soon be Disabled.
  • Restarting - the hotspot is restarting (stopping, then starting).
  • Paused - the hotspot has paused itself because it has no internet connection and no devices are connected, so that it doesn't become a "honeypot" trap. Note that if the hotspot was started with --inet none, it will never enter this state, as it knows it is expected to run without internet. See the pause command below. With bridged network access the hotspot pauses when the connection it shares is disconnected or turned off, and a Wi-Fi repeater pauses when this PC is not connected to the network being repeated, whatever the pause setting and however many devices are connected.
  • Unknown - the Connectify service is not running.

Sample output:

{"res":true,"status":"Enabled"}

settings

Returns the current configuration of the hotspot, including:

  • ConfiguredToRun2 - boolean of whether the hotspot is attempting to run (if true, it could be Starting, Enabled or Paused; use status for the actual state).
  • bridged - boolean of whether network access is bridged. If false, it is routed.
  • internet - boolean of whether internet is to be provided to devices.
  • internetGuid - string of the GUID of the adapter that is providing internet service.
  • password - string of the Wi-Fi password devices must provide to join the hotspot.
  • repeatedProfile - string of the Wi-Fi network being repeated, in Wi-Fi repeater mode.
  • ssid - string of the SSID (Hotspot name) for this hotspot.

list-adapters

Lists all of the network adapters on the system, with information on each:

  • Ip - IP address of this adapter. 0.0.0.0 if not assigned.
  • IpMask - the IP mask for this network (typically 255.255.255.0 or similar).
  • Guid - the Windows GUID of this adapter.
  • Mac - MAC address.
  • GwMac - MAC address of the internet gateway / router on this network.
  • Name - the user displayable name of this adapter.
  • hasInternet - boolean of whether this adapter is currently connected to the internet.
  • Speed - the speed of the adapter as reported by Windows. Note that this is usually the maximum bitrate that the adapter can handle, and has nothing to do with the kind of throughput that users will see in real life.

Sample output:

{"res":true,"list-adapters":[{"SupportedModes":[{"enc":2,"mode":1}],"WarnNoInternet":true,"Bound":true,"downstreamSettings":[],"upstreamSettings":[],"Name":"Realtek USB GbE Family Controller","Guid":"{A9633E36-9316-4C49-A3B9-9A86BC4C5527}","Index":11,"Mac":"00:E0:7C:C8:9C:A5","GwMac":"94:0C:6D:FE:2E:1A","Ip":"192.168.202.115","IpMask":"255.255.255.0","Type":1,"Speed":1000000000,"hasInternet":true,"State":4,"ExtraData":{"rii":{"Restricted":false},"wii":null,"eii":null},"HardwareId":"USB\\VID_0BDA&PID_8153&REV_3000"}]}

clients

Lists the devices, with everything that Connectify knows about them (Name: Example Value - Description). It defaults to showing all devices, connected or disconnected (the ones shown under Seen before on the Clients screen). However, if either "--connected" or "--disconnected" is added, then the results will be filtered to only display that group: state 0 or state 1, below. Devices in state 2 or 3 appear only in the unfiltered list. Giving both, or any other option, returns an error.

  • GamingModeType - the device's Gaming mode.
  • IP:"192.168.50.102" - IPv4 address for this device.
  • MacString:"b8:44:d9:0c:79:ff" - MAC address of the device's network adapter.
  • SpeedKbpsDownload:0 - current transfer rate.
  • SpeedKbpsUpload:0 - current transfer rate.
  • StaticIP:null - the last number of the device's fixed IP address, or empty when it gets one automatically.
  • UsageBytesDownload:43349153 - total bytes downloaded (ever).
  • UsageBytesUpload:7726327 - total bytes uploaded (ever).
  • accessRights:{"Internet":true,"Local":true} - firewall settings for this device.
  • dateconnected:"2016-05-19T19:05:10.263464Z" - the last time it connected.
  • datefirstseen:"2016-05-14T21:14:57.3011848Z" - the first time it ever connected.
  • displayName:"" - optional display name, that can be set by the user (Rename device on the Clients screen).
  • hostname:"agiziss-iPhone" - hostname, pulled from the DHCP request.
  • icon:"os_apple.png" - the icon being used in the interface.
  • receivedSignalStrength:0 - not populated, just 0.
  • secondsConnected:19178 - total cumulative seconds that this device has ever been connected.
  • state:1
    • 0=Connected
    • 1=Disconnected
    • 2=Networked (seen on the network, but not connected to the hotspot)
    • 3=Removed (removed from the Clients screen with Remove, and about to be dropped from this list too; it may appear briefly)
  • totalConnections:150 - total times this device has connected.
  • userSetIcon:false - unused.
  • vci:null - the VCI field from the device's DHCP request. Occasionally reveals the operating system.
  • vendor:"Apple, Inc." - determined by examining the OUI (beginning of MacString).

Sample output (from an earlier version, without GamingModeType):

{"res":true,"clients":[{"IP":"192.168.50.101","MacString":"b8:44:d9:0c:79:ff","SpeedKbpsDownload":0,"SpeedKbpsUpload":0,"StaticIP":null,"UsageBytesDownload":71979648,"UsageBytesUpload":9878791,"accessRights":{"Internet":true,"Local":true},"dateconnected":"2016-05-20T20:59:32.8181702Z","datefirstseen":"2016-05-14T21:14:57.3011848Z","displayName":"","hostname":"agiziss-iPhone","icon":"os_apple.png","receivedSignalStrength":0,"secondsConnected":27469,"state":0,"totalConnections":154,"userSetIcon":false,"vci":null,"vendor":"Apple, Inc."}]}

client

client ip|mac|hostname [--gaming never|auto|psn|xbl|nwc] [--internet on|off] [--local on|off] [--ip <last octet|managed>]

Changes the settings of a single device, the same ones as its Device details on the Clients screen. Name the device by its MAC address, IP address, hostname or display name. If more than one device matches, a connected one is chosen.

  • --gaming - Gaming mode: never (Off), auto (Detect automatically), psn (PlayStation Network), xbl (Xbox Live) or nwc (Nintendo).
  • --internet - Can use the internet.
  • --local - Can reach this PC and others.
  • --ip - Fixed IP address: the last number of the address to give the device, or managed to go back to an automatic address.

It returns the device's details, as in the clients command, read back from Connectify Hotspot after the change. If Connectify Hotspot refuses a change, for example a fixed IP address outside 1 to 254 or one already used by another device, res is false and err says why. Changes earlier on the same line stay made. The whole line is checked before anything is changed, so an unknown option or a value the option doesn't accept changes nothing.

Sample output:

{"res":true,"client":{"GamingModeType":0,"IP":"192.168.219.101","MacString":"b0:dc:24:09:83:12","SpeedKbpsDownload":0,"SpeedKbpsUpload":0,"StaticIP":null,"UsageBytesDownload":6183,"UsageBytesUpload":4990,"accessRights":{"Internet":true,"Local":true},"dateconnected":"2018-07-09T17:57:40.8324656Z","datefirstseen":"2018-04-24T15:56:59.2380286Z","displayName":"","hostname":"SAMSUNG-SM-G950U","icon":"os_murata.png","receivedSignalStrength":0,"secondsConnected":186,"state":1,"totalConnections":2,"userSetIcon":false,"vci":null,"vendor":"Murata Manufacturing Co., Ltd."}}

firewall

With no additional arguments this outputs the current firewall settings for all devices, each of which is true or false:

  • Internet: whether devices are allowed internet access (Devices can use the internet).
  • Local: whether devices are allowed to access the computer running Connectify and other devices on the network (Devices can reach this PC and each other). Note that even without Local access, devices can reach the hotspot's DHCP and DNS server.
  • AdBlock: whether Connectify Hotspot's ad blocking is on (Block ads).

To change a setting, give on or off after its option: [--internet on|off] [--local on|off] [--adblock on|off]. To read a setting, give its option with no value. You can mix the two: firewall --internet --local off turns Local off and reports Internet, and settings are reported after every change on the line has been made. A changed setting on its own returns just {"err":null,"res":true}; add the option again with no value to see it. Any value other than on or off, or an unknown option, is an error, and nothing is changed.

See also Device access (firewall) options in Connectify Hotspot.

Sample output:

{"res":true,"firewall":{"Internet":true,"Local":true,"AdBlock":true}}

dhcp

dhcp [managed | <IP as 10.###.###.###, 172.16-31.###.###, or 192.168.###.###>]

When run without any arguments, returns the current setting for the addresses your hotspot hands out. When a value is added, sets it. This is the same setting as Settings > Network > Addresses for devices. Values:

  • "managed" - allows Connectify to select the address range (Automatic). Generally recommended unless you have devices that need fixed IP addresses. Connectify remembers IP ranges that it has encountered on other networks that this computer has been connected to, and never allows those ranges to be used in managed mode. This makes the possibility of an IP conflict remote.
  • IP - allows you to set the IP range used by DHCP yourself. It can be 10.###.###.###, 192.168.###.###, or between 172.16.###.### and 172.31.###.###, where you choose each ###: the last number must be from 1 to 254, and the others from 0 to 255. The final number is the IP address of the Connectify Hotspot computer; unless you have a specific reason to give the router a different IP address, we suggest making it 1.

See also Custom DHCP Ranges and Static IP Addresses.

dns

dns [status|auto|cloudflare|cloudflare-family|google|quad9|opendns|<ip>[,<ip>...]]

Chooses the DNS servers that the devices on your hotspot use, the same setting as Settings > Security and privacy > DNS server.

  • With no argument, returns the current choice: "auto", a preset name followed by its servers, or your own list of servers.
  • "auto" - follows the DNS servers of the connection you're sharing (Automatic). This is the default.
  • A preset name - cloudflare (1.1.1.1, 1.0.0.1), cloudflare-family (1.1.1.2, 1.0.0.2), google (8.8.8.8, 8.8.4.4), quad9 (9.9.9.9, 149.112.112.112) or opendns (208.67.222.222, 208.67.220.220). Not case sensitive.
  • One or more IPv4 addresses, separated by commas (Custom). Anything that isn't a complete IPv4 address returns an error, rather than being saved.
  • "status" - reports what is actually being used: running (whether the hotspot's DNS server is running), checking (whether the chosen servers are still being tested), chosen, inEffect (the servers devices are using now), notResponding (chosen servers that didn't answer) and origin (where inEffect came from: "chosen", "connection" or "discovered"; "none" before anything has been set up, and "stopped" when the hotspot's DNS server isn't running, which is the case when the hotspot is stopped or paused, or in bridged or repeater mode).

Your own servers can also be separated by spaces, or by a comma and a space: dns 1.1.1.1, 8.8.8.8 sets both. A preset name can't be combined with other servers.

The servers you choose are tested before devices use them. Any that don't answer are left out, and if none answer, the hotspot uses the shared connection's own DNS servers instead. The DNS setting doesn't apply in bridged or repeater mode. See also How to choose a DNS server in Connectify Hotspot

Sample output:

{"res":true,"dns":"auto"}

lowdata

lowdata [on|off]

When run without any arguments, returns whether the hotspot tells devices to save data. With on or off, changes it. This is the same setting as Settings > Network > Wireless > Tell devices to save data: phones and tablets treat the hotspot as a limited connection and hold off on large updates and photo backups. Android devices get the signal from the hotspot's DHCP server, with Routed network access. iPhones and iPads only see it when the hotspot uses Wi-Fi Direct, so while the setting is on, Connectify Hotspot prefers Wi-Fi Direct. It still creates a regular Wi-Fi hotspot, and devices don't need to support Wi-Fi Direct to join.

Sample output:

{"res":true,"lowdata":"off"}

startup

startup [never|always|resume]

Chooses whether the hotspot starts by itself when the Connectify service starts, which is usually when your PC turns on.

  • "never" - never start the hotspot.
  • "always" - always start the hotspot.
  • "resume" - start the hotspot if it was running before the PC was shut down.

Sample output:

{"res":true,"startup":"never"}

pause

pause [never|onnointernet]

Controls whether the hotspot pauses when there is no internet to share and no devices are connected. This is the same setting as Settings > Network > Pause when there's no internet. The hotspot never pauses if Don't share internet is chosen under Internet to share (--inet none). The setting applies only to routed network access: with bridged network access, or as a Wi-Fi repeater, the hotspot pauses whenever it loses the network it shares or repeats (see Paused under the status command above).

  • "never" - do not pause.
  • "onnointernet" - pause when there is no internet and no devices are connected.

Sample output:

{"res":true,"pause":"onnointernet"}

errorcodes

Lists every error code that Connectify can return in errorCode, with its name, its value and the value in hexadecimal.

version

Outputs the version of the installed Connectify Hotspot.

Sample output:

C:\Program Files (x86)\Connectify>connectify_cli version
{"res":true,"version":"27.0.0.xxxxx"}
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us