> Im trying to automate the Win2K command Net User to add users to
> the computer.
>
> The problem im running into is i need to use a " inside of the
> argument. Well when CF sees the " it thinks it is the end of the
> CFEXECUTE
> tag.
>
> Anyway to escape this quote symbol? I tried using " but
> that did not work.
>
> <cfexecute name="c:\winnt\system32\net.exe"
> arguments="user #GetUsers.Login# #GetUsers.Password# /add
> /fullname:"BILLYBOB" /expires:never /passwordchg:no /passwordreq:yes"
> outputfile="c:\output.txt">
>
> </cfexecute>
Several ways to treat this;
Start the string with a single apostrphie
arguments='user #GetUsers.Login# #GetUsers.Password# /add
/fullname:"BILLYBOB" /expires:never /passwordchg:no /passwordreq:yes'
Double the quotes inside to "escape" them
arguments="user #GetUsers.Login# #GetUsers.Password# /add
/fullname:""BILLYBOB"" /expires:never /passwordchg:no /passwordreq:yes"
Send the Chr() version of the character rather than the character itself
arguments="user #GetUsers.Login# #GetUsers.Password# /add
/fullname:#Chr(34)#BILLYBOB#Chr(34)# /expires:never /passwordchg:no
/passwordreq:yes"
All of these should work
Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists