Hello
i have to edit a text file.
the task is:
i have a text file which is located at c:\windows.., i will have to replace
the ip 172.18.52.10 to 175.45.52.63 .It is always a replace the IP and save
it and the IP is always found at the end of text file.
Can you please give me some tips of how i can do that in VBscipt

Thx in advance
Nazeedah

RE: edit text file by Nazeedah

Nazeedah
Fri Oct 13 05:31:02 CDT 2006

hello
i have been able to solve it. but now would like to know how can i call or
execute this vbs from visual basic 6.0

Thx
Nazeedah

"Nazeedah" wrote:

> Hello
> i have to edit a text file.
> the task is:
> i have a text file which is located at c:\windows.., i will have to replace
> the ip 172.18.52.10 to 175.45.52.63 .It is always a replace the IP and save
> it and the IP is always found at the end of text file.
> Can you please give me some tips of how i can do that in VBscipt
>
> Thx in advance
> Nazeedah

RE: edit text file by Nazeedah

Nazeedah
Mon Oct 16 01:21:01 CDT 2006

hello
Thank you a lot for your quick help
i will have to implement this code when clicking on a button in vb.
i have include the code below in the command_click
result = ShellExecute(0, "open", "c:\strgprs.vbs", Null, Null, SHOWNORMAL)
If result > 32 Then
'success
MsgBox "success"
Else
MsgBox "failed"

End If

And the rest i include it as it is.
I am having an error "Invalid use of Null" in the line below.
result = ShellExecute(0, "open", "c:\strgprs.vbs", Null, Null, SHOWNORMAL)

Please do help me

Do you think the 0 in the hwnd is good. i thought this might be the error!!

Thanks
Nazeedah