title: "Directory name is invalid." etc. with rabbitmq-plugins on Windows
body: <p>I'm trying to get RabbitMQ going on Windows 10 by following <a href="http://arcware.net/installing-rabbitmq-on-windows/" rel="noreferrer">these instructions</a>.</p>
  
  <p>However, when trying to enable the management plugin via powershell command:</p>
  
  <pre><code>./rabbitmq-plugins enable rabbitmq_management
  </code></pre>
  
  <p>I get the following:</p>
  
  <pre><code>The directory name is invalid.
  The filename, directory name, or volume label syntax is incorrect.
  Unsupported node name: hostname is invalid (possibly contains unsupported characters).
  If using FQDN node names, use the -l / --longnames argument.
  </code></pre>
  
  <p>I've tried setting <code>HOMEDRIVE=C:</code> as the blog suggested.</p>
  
  <p>What am I doing wrong?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Per the comment below I did the following:</p>
  
  <pre><code>PS C:\program files\rabbitmq server\rabbitmq_server-3.7.15\sbin&gt; ./rabbitmq-service.bat stop
  The directory name is invalid.
  The filename, directory name, or volume label syntax is incorrect.
  The RabbitMQ service is stopping.
  The RabbitMQ service was stopped successfully.
  
  PS C:\program files\rabbitmq server\rabbitmq_server-3.7.15\sbin&gt; ./rabbitmq-service.bat uninstall
  The directory name is invalid.
  The filename, directory name, or volume label syntax is incorrect.
  
  *********************
  Service control usage
  *********************
  
  rabbitmq-service help    - Display this help
  rabbitmq-service install - Install the RabbitMQ service
  rabbitmq-service remove  - Remove the RabbitMQ service
  
  The following actions can also be accomplished by using
  Windows Services Management Console (services.msc):
  
  rabbitmq-service start   - Start the RabbitMQ service
  rabbitmq-service stop    - Stop the RabbitMQ service
  rabbitmq-service disable - Disable the RabbitMQ service
  rabbitmq-service enable  - Enable the RabbitMQ service
  
  PS C:\program files\rabbitmq server\rabbitmq_server-3.7.15\sbin&gt; set HOMEDRIVE=C:
  PS C:\program files\rabbitmq server\rabbitmq_server-3.7.15\sbin&gt; ./rabbitmq-service.bat install
  The directory name is invalid.
  The filename, directory name, or volume label syntax is incorrect.
  RabbitMQ service is already present - only updating service parameters
  "WARNING: Using RABBITMQ_ADVANCED_CONFIG_FILE: C:\Users\Mj\AppData\Roaming\RabbitMQ\advanced.config"
  2019-06-14 10:55:09.630000
      args: []
      format: "Failed to create cookie file 'l:/.erlang.cookie': enoent"
      label: {error_logger,error_msg}
  2019-06-14 10:55:09.630000 crash_report        #{label=&gt;{proc_lib,crash},report=&gt;[[{initial_call,{auth,init,['Argument__1']}},{pid,&lt;0.57.0&gt;},{registered_name,[]},{error_info,{error,"Failed to create cookie file 'l:/.erlang.cookie': enoent",[{auth,init_cookie,0,[{file,"auth.erl"},{line,286}]},{auth,init,1,[{file,"auth.erl"},{line,140}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}},{ancestors,[net_sup,kernel_sup,&lt;0.46.0&gt;]},{message_queue_len,0},{messages,[]},{links,[&lt;0.55.0&gt;]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,27},{reductions,1456}],[]]}
  2019-06-14 10:55:09.635000 supervisor_report   #{label=&gt;{supervisor,start_error},report=&gt;[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{"Failed to create cookie file 'l:/.erlang.cookie': enoent",[{auth,init_cookie,0,[{file,"auth.erl"},{line,286}]},{auth,init,1,[{file,"auth.erl"},{line,140}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}},{offender,[{pid,undefined},{id,auth},{mfargs,{auth,start_link,[]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
  2019-06-14 10:55:09.704000 supervisor_report   #{label=&gt;{supervisor,start_error},report=&gt;[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,{shutdown,{failed_to_start_child,auth,{"Failed to create cookie file 'l:/.erlang.cookie': enoent",[{auth,init_cookie,0,[{file,"auth.erl"},{line,286}]},{auth,init,1,[{file,"auth.erl"},{line,140}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}}}},{offender,[{pid,undefined},{id,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
  2019-06-14 10:55:09.742000 crash_report        #{label=&gt;{proc_lib,crash},report=&gt;[[{initial_call,{application_master,init,['Argument__1','Argument__2','Argument__3','Argument__4']}},{pid,&lt;0.45.0&gt;},{registered_name,[]},{error_info,{exit,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{"Failed to create cookie file 'l:/.erlang.cookie': enoent",[{auth,init_cookie,0,[{file,"auth.erl"},{line,286}]},{auth,init,1,[{file,"auth.erl"},{line,140}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}}}}},{kernel,start,[normal,[]]}},[{application_master,init,4,[{file,"application_master.erl"},{line,138}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}},{ancestors,[&lt;0.44.0&gt;]},{message_queue_len,1},{messages,[{'EXIT',&lt;0.46.0&gt;,normal}]},{links,[&lt;0.44.0&gt;,&lt;0.43.0&gt;]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,987},{stack_size,27},{reductions,184}],[]]}
  2019-06-14 10:55:09.789000 std_info            #{label=&gt;{application_controller,exit},report=&gt;[{application,kernel},{exited,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{"Failed to create cookie file 'l:/.erlang.cookie': enoent",[{auth,init_cookie,0,[{file,"auth.erl"},{line,286}]},{auth,init,1,[{file,"auth.erl"},{line,140}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}}}}},{kernel,start,[normal,[]]}}},{type,permanent}]}
  {"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{\"Failed to create cookie file 'l:/.erlang.cookie': enoent\",[{auth,init_cookie,0,[{file,\"auth.erl\"},{line,286}]},{auth,init,1,[{file,\"auth.erl\"},{line,140}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,374}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,249}]}]}}}}},{kernel,start,[normal,[]]}}}"}
  Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{"Failed to create cookie file 'l:/.er
  
  Crash dump is being written to: C:\Users\Mj\AppData\Roaming\RabbitMQ\log\erl_crash.dump...done
  </code></pre>