#36706 - 2003-02-20 08:39 AM
Adding a switch to the middle of a string
|
Anonymous
Anonymous
Unregistered
|
I am trying to write a script that will auto uninstall Dr Sol's VirusScan 4.0.3.
I can read the uninstall string from the registry but I wish to amend it as follows
typical uninstall string
C:\WINNT\ISUNINST.EXE '*' C:\PROGRA~1\Citrix\ICACLI~1\Uninst.isu
I need to add some switches where I have but a '*'
I've looked at the trim/len/substr commands, but can't use them as the uninstall string varies, so the length can't be specified.
is there a way to break the string at the first space add a switch or two and add the rest of the original string ?
Many thanks in advance
Damon
|
|
Top
|
|
|
|
#36709 - 2003-02-20 08:47 AM
Re: Adding a switch to the middle of a string
|
Anonymous
Anonymous
Unregistered
|
Morning Jpols,
Can you use a space as a delimiter, when you use split ?
|
|
Top
|
|
|
|
#36711 - 2003-02-20 08:49 AM
Re: Adding a switch to the middle of a string
|
Anonymous
Anonymous
Unregistered
|
ahh... just finished reading the help file... I'm sure this will work...
Thank You Jpols
|
|
Top
|
|
|
|
#36712 - 2003-02-20 08:52 AM
Re: Adding a switch to the middle of a string
|
Anonymous
Anonymous
Unregistered
|
the '*' doesn't actually appear in the uninstall string, I put it there to show where I need to add the switch. apologies if I misled you
fingers crossed that there is only one space
|
|
Top
|
|
|
|
#36716 - 2003-02-20 09:02 AM
Re: Adding a switch to the middle of a string
|
Anonymous
Anonymous
Unregistered
|
Many thanks.. I'll let you know if all is well
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 731 anonymous users online.
|
|
|