NewsArchive
01-12-2009, 02:25 AM
Friedrich
I am trying to build a small .BAT file using the Handle Text File script with little
success. Perhaps I am expecting too much.
I initially tried to replace the 1 line in the file, but got a MSC++ BufferOverun
message when the setup was run.
Next I tried to use the CREATE File to clear it out and then the Insert Line to add my
line.
For the batch file name I use a variable and for the text I want in the batch file I
have another variable %MONDAYLINE% that I build from various functions.
However, when the process setup runs it inserts the variable name, and not its
contents.
The %MONDAYLINE% is written into the file.
How can I get the variable content into the file?
The help does say it wants Text, but I was hoping a variable would also work here.
I am doing this to try and overcome what may be another problem in SB6. In trying to
"Add a Scheduled Task" I build a variable with the path to the MS osql.exe to run a
SQL backup process.
But the scheduled task fails to run, because my command and parameters get surrounded
by double quotes, due I guess to spaces detected in the path.
In the Scheduled Task Run field I get
"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\osql.exe -Usa -Ppasswordhere -S
SERVER\SQLEXPRESS"
but I need
"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\osql.exe" -Usa -Ppasswordhere -S
SERVER\SQLEXPRESS
Hence I am trying to get SB to build me a batch file with the necessary
"Path\osql.exe" params here
line.
Thanks
John Griffiths
I am trying to build a small .BAT file using the Handle Text File script with little
success. Perhaps I am expecting too much.
I initially tried to replace the 1 line in the file, but got a MSC++ BufferOverun
message when the setup was run.
Next I tried to use the CREATE File to clear it out and then the Insert Line to add my
line.
For the batch file name I use a variable and for the text I want in the batch file I
have another variable %MONDAYLINE% that I build from various functions.
However, when the process setup runs it inserts the variable name, and not its
contents.
The %MONDAYLINE% is written into the file.
How can I get the variable content into the file?
The help does say it wants Text, but I was hoping a variable would also work here.
I am doing this to try and overcome what may be another problem in SB6. In trying to
"Add a Scheduled Task" I build a variable with the path to the MS osql.exe to run a
SQL backup process.
But the scheduled task fails to run, because my command and parameters get surrounded
by double quotes, due I guess to spaces detected in the path.
In the Scheduled Task Run field I get
"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\osql.exe -Usa -Ppasswordhere -S
SERVER\SQLEXPRESS"
but I need
"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\osql.exe" -Usa -Ppasswordhere -S
SERVER\SQLEXPRESS
Hence I am trying to get SB to build me a batch file with the necessary
"Path\osql.exe" params here
line.
Thanks
John Griffiths