--- mstools/samples/sdktools/remote/remote.c 2018/08/09 18:24:28 1.1 +++ mstools/samples/sdktools/remote/remote.c 2018/08/09 18:27:22 1.1.1.2 @@ -276,6 +276,18 @@ main( break; } + case 'u': + case 'U': + i++; + if (i>=argc) + { + WRITEF((VBuff,"Incomplete Param %s..Aborting\n",argv[i-1])); + return 1; + } + UserName=argv[i]; + break; + + case 'q': case 'Q': IsAdvertise=FALSE; @@ -387,16 +399,26 @@ DisplayClientHlp() { WRITEF((VBuff,"\n To Start the CLIENT end of REMOTE\n")); WRITEF((VBuff," ---------------------------------\n")); - WRITEF((VBuff," Syntax : REMOTE /C [Param]\n")); - WRITEF((VBuff," Example: REMOTE /C rajnathX86 imbroglio\n")); - WRITEF((VBuff," This would connect to a server session on \n")); - WRITEF((VBuff," rajnathX86 with id \"imbroglio\" if there was a\n")); + WRITEF((VBuff," Syntax : REMOTE /C [/L] [/F] [/B]\n")); + WRITEF((VBuff,"\n")); + + WRITEF((VBuff," The name of computer on which server-end of remote\n")); + WRITEF((VBuff," was run on.\n")); + + WRITEF((VBuff," The Unique Id of the remote server running on \n")); + WRITEF((VBuff," the computer .\n")); + + WRITEF((VBuff," [/L] Number of Lines to Get.\n")); + WRITEF((VBuff," [/F] Foreground color eg blue, red, etc.\n")); + WRITEF((VBuff," [/B] Background color eg blue, lwhite,etc.\n")); + WRITEF((VBuff,"\n")); + WRITEF((VBuff," Example: REMOTE /C rajnathX86 imbroglio\n")); + WRITEF((VBuff,"\n")); + WRITEF((VBuff," This would connect to a server session on \\\\rajnathX86\n")); + WRITEF((VBuff," with id \"imbroglio\" if there was a\n")); WRITEF((VBuff," REMOTE /S <\"Cmd\"> imbroglio\n")); - WRITEF((VBuff," started on the machine rajnathX86.\n\n")); + WRITEF((VBuff," started on the machine \\\\rajnathX86.\n\n")); WRITEF((VBuff," To Exit: %cQ (Leaves the Remote Server Running)\n",COMMANDCHAR)); - WRITEF((VBuff," [Param]: /L <# of Lines to Get>\n")); - WRITEF((VBuff," [Param]: /F \n")); - WRITEF((VBuff," [Param]: /B \n")); WRITEF((VBuff,"\n")); } /*************************************************************/ @@ -406,15 +428,34 @@ DisplayServerHlp() { WRITEF((VBuff,"\n To Start the SERVER end of REMOTE\n")); WRITEF((VBuff," ---------------------------------\n")); - WRITEF((VBuff," Syntax : REMOTE /S <\"Cmd\"> [Param]\n")); - WRITEF((VBuff," Example: REMOTE /S \"i386kd -v\" imbroglio\n")); - WRITEF((VBuff," To interact with this \"Cmd\" \n")); - WRITEF((VBuff," from some other machine\n")); - WRITEF((VBuff," - start the client end by:\n")); - WRITEF((VBuff," REMOTE /C %s imbroglio\n\n",HostName)); - WRITEF((VBuff," To Exit: %cK \n",COMMANDCHAR)); - WRITEF((VBuff," [Param]: /F \n")); - WRITEF((VBuff," [Param]: /B \n")); + WRITEF((VBuff," Syntax : REMOTE /S <\"Cmd\"> [/U [domainname\\]username] [/F] [/B]\n")); + WRITEF((VBuff,"\n")); + + WRITEF((VBuff," <\"Cmd\"> A Text-Mode program that you want to control\n")); + WRITEF((VBuff," from another computer.\n")); + + WRITEF((VBuff," The Id that will uniquely identify this session\n")); + WRITEF((VBuff," of remote server from other possible sessions\n")); + WRITEF((VBuff," on this computer.\n")); + + WRITEF((VBuff," [/U] User or Group who can connect to this session.\n")); + WRITEF((VBuff," If this is not specified then anyone can connect.\n")); + WRITEF((VBuff," [/F] Foreground color eg blue, red, etc.\n")); + WRITEF((VBuff," [/B] Background color eg blue, lwhite, etc.\n")); + + WRITEF((VBuff,"\n")); + WRITEF((VBuff," Examples: REMOTE /S \"cmd\" emerald /U administrators\n")); + WRITEF((VBuff," REMOTE /S \"i386kd -v\" imbroglio\n")); + WRITEF((VBuff,"\n")); + WRITEF((VBuff," If you have started the server-end of remote on computer \\\\%s\n",HostName)); + WRITEF((VBuff," and you want to interact with \"i386kd -v\" from another computer,\n")); + WRITEF((VBuff," start the client-end of remote on the other computer by typing:\n")); + WRITEF((VBuff," REMOTE /C %s imbroglio\n",HostName)); + WRITEF((VBuff," To connect to the session \"Cmd\", start:\n")); + WRITEF((VBuff," REMOTE /C %s emerald\n",HostName)); + WRITEF((VBuff," Only people with admin access on \\\\%s can connect to this session.\n",HostName)); + + WRITEF((VBuff,"\n\n To Exit: %cK \n",COMMANDCHAR)); WRITEF((VBuff,"\n")); }