Welcome to ServerForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Simple Scripting Question

 
   Windows Server (Home) -> Windows Server Scripting RSS
Next:  Retrieving an object's GUID as a string from Acti..  
Author Message
Ryan D.

External


Since: Aug 04, 2005
Posts: 2



(Msg. 1) Posted: Thu Aug 04, 2005 9:30 am
Post subject: Simple Scripting Question
Archived from groups: microsoft>public>windows>server>scripting (more info?)

New to scripting but I have a script that adds a line to the end of .ini
files in users home directories.

I need to know how to add a carriage return after the added line?

If I modify the script I have now to add more text in the future it just
appends the text at the end of the last line in the file and not below it.

Any help would be appreciated.



--
Ryan D. , MCP, A+, Net+

 >> Stay informed about: Simple Scripting Question 
Back to top
Login to vote
Marty List

External


Since: Mar 25, 2005
Posts: 148



(Msg. 2) Posted: Thu Aug 04, 2005 10:59 am
Post subject: Re: Simple Scripting Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Which scripting language are you using???

If you're using VBScript, try adding the vbNewLine constant, which VBScript will
convert to a "carriage return" character and a "new line" character.

Option Explicit
Dim MyString
MyString = "My Text" & vbNewLine & vbNewLine


You could also use the vbCrLf constant, they should always be the same.



"Ryan D." <RyanD RemoveThis @discussions.microsoft.com> wrote in message
news:DEB70C3D-7238-4814-BDF6-664F115AC686@microsoft.com...
> New to scripting but I have a script that adds a line to the end of .ini
> files in users home directories.
>
> I need to know how to add a carriage return after the added line?
>
> If I modify the script I have now to add more text in the future it just
> appends the text at the end of the last line in the file and not below it.
>
> Any help would be appreciated.
>
>
>
> --
> Ryan D. , MCP, A+, Net+

 >> Stay informed about: Simple Scripting Question 
Back to top
Login to vote
Ryan D.

External


Since: Aug 04, 2005
Posts: 2



(Msg. 3) Posted: Thu Aug 04, 2005 10:59 am
Post subject: Re: Simple Scripting Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks for the tip Marty.

I added the vbNewLine to the script after the string variable. Ran some
tests on some dummy directories and it looks like that will make things a lot
easier.

Once again, thank you for the help.
--
Ryan D. , MCP, A+, Net+


"Marty List" wrote:

>
> Which scripting language are you using???
>
> If you're using VBScript, try adding the vbNewLine constant, which VBScript will
> convert to a "carriage return" character and a "new line" character.
>
> Option Explicit
> Dim MyString
> MyString = "My Text" & vbNewLine & vbNewLine
>
>
> You could also use the vbCrLf constant, they should always be the same.
>
>
>
> "Ryan D." <RyanD RemoveThis @discussions.microsoft.com> wrote in message
> news:DEB70C3D-7238-4814-BDF6-664F115AC686@microsoft.com...
> > New to scripting but I have a script that adds a line to the end of .ini
> > files in users home directories.
> >
> > I need to know how to add a carriage return after the added line?
> >
> > If I modify the script I have now to add more text in the future it just
> > appends the text at the end of the last line in the file and not below it.
> >
> > Any help would be appreciated.
> >
> >
> >
> > --
> > Ryan D. , MCP, A+, Net+
>
>
>
 >> Stay informed about: Simple Scripting Question 
Back to top
Login to vote
VBScript to create new u

External


Since: Jul 06, 2007
Posts: 1



(Msg. 4) Posted: Fri Jul 06, 2007 11:02 pm
Post subject: Re: Simple Scripting Question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Simple Scripting Question

"Marty List" wrote:

>
> Which scripting language are you using???
>
> If you're using VBScript, try adding the vbNewLine constant, which VBScript will
> convert to a "carriage return" character and a "new line" character.
>
> Option Explicit
> Dim MyString
> MyString = "My Text" & vbNewLine & vbNewLine
>
>
> You could also use the vbCrLf constant, they should always be the same.
>
>
>
> "Ryan D." <RyanD.DeleteThis@discussions.microsoft.com> wrote in message
> news:DEB70C3D-7238-4814-BDF6-664F115AC686@microsoft.com...
> > New to scripting but I have a script that adds a line to the end of .ini
> > files in users home directories.
> >
> > I need to know how to add a carriage return after the added line?
> >
> > If I modify the script I have now to add more text in the future it just
> > appends the text at the end of the last line in the file and not below it.
> >
> > Any help would be appreciated.
> >
> >
> >
> > --
> > Ryan D. , MCP, A+, Net+
>
>
>
 >> Stay informed about: Simple Scripting Question 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
newbie - simple question - Hi- New to scripting - can someone give me a quick sample of what I need to add to a login script to have a registry change set? I have an application fix - ToolBox.reg - that needs to run on all computers. ALSO - when it runs, there are 2 answer..

simple batch .bat file question - Hi All Concerning a .bat file: I have a line like: call "program" What I want to do is check the return code of "program" and exit if its not zero. Do you know how to do this? (sorry if this is an elementary question, I'm Windows ...

Simple script question - copy file - I was hoping for a little help making sure I do things correctly. I need to copy a file everyday at a specific time from a Win98 box to a Win2k box under a scheduled task. I've just tested this and it seems to be working OK but I thought I'd ask for..

VBS scripting question - I want to create a script vbs script that first calls a "ping -n <servername>" command and then calls another VBS script if it fails. Does anyone have soem ideas or useful examples? Thanks.

VB scripting question? - I need a script that pings a single server and if that ping fails, I need it echo that failure and then run a VBS script that resides on another server. Can someone assit me ion doing this or have something that is similiar that I could possibly use?...
   Windows Server (Home) -> Windows Server Scripting All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]