Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

configure windows service password containing non-alphanumerics

Status
Not open for further replies.

jmeckley

Programmer
Jul 15, 2002
5,269
US
I'm a .net developer spending most of my time inside VS. I want to automate my deployment process and working on a script to deploy a windows service. I need to be able to configure the account/password which runs the service. so far I have
Code:
sc config MyService obj= domain\account password= hello&world
my problem is the ampersand. the script fails with
Code:
sc config MyService obj= domain\account password= [COLOR=red]hello  & world[/color]
[SC] ChangeServiceConfig FAILED 1072:
'world' is not recognized as an internal or external command, operable program or batch file.
I tried "hello&world", hello&&world and hello\&world. all failed. to top is off google isn't providing much help, or I forgot how to search.

how can I escape the & character? is it even possible?

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top