Jump to content

Casper4242

Member
  • Posts

    1
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by Casper4242

  1. Anyone have a nice easy examlpe to add a group to another group? I prefer this to be done in VBS as I already have around 100 lines of VBS doing other things and this is one of the last things I need. The other big reason is I am passing an argument to the VBS that is sometimes in quotes and sometimes not. Its only in quotes when there is a space in it. VBS treats this great, but if I was to try and do this on the command line it wouldnt work because the quotes come in as part of %1 and then get stuck in the middle of some text where they shouldnt be. Example NewCTXApp.cmd MyApp the line I was trying in batch in the .cmd was: net localgroup CTX-CMC-Admins CTX-%1-Admin /ADD /DOMAIN This works great when there are no quotes But if I run the same command with quotes and spaces... NewCTXApp.cmd "My App" then the line in question comes out as: net localgroup CTX-CMC-Admins CTX-"My App"-Admin /ADD /DOMAIN which obviously fails miserably. Sooooo, if someone can hook me up with a short chunk of example code on adding a group to a group, that would be spectacular.
×
×
  • Create New...