S
Steve Hohman
I have an InfoPath form that we use as a checklist for server installation
projects and I want to generate a text file or populate a rich-text box based
on form information already entered.
What I am trying to do is create a login script that we apply to all
clients. This login script maps shared drives and printers and must
reference shared drive letters, server names, and printer names. I have
fields already configured that collect and store this information, but I am
at a loss on how to create my script. I was hoping I could use concat and
make one large expression, but I need line returns in it and have not seen
where I can make a line return in the concat command.
Below is an example of the first few lines. The fields I want to populate
are in <>.
@echo off
REM Login.bat Version 1.0
REM Exit if user has logged onto the server
If %COMPUTERNAME%.==<ServerName>. GOTO END
REM Delete existing drive mappings
etc, etc, etc
After the last line (REM Delete), I want to make a loop that checks for the
drive mapping I am going to use (saved in form as DriveMappingLetter) and
then makes a line for each one. Then a loop will then map each drive letter
used to the proper folder based on the \\<ServerName>\<DriveName> fields.
Ideally, when all is said and done, either this text will be sitting in a
text box that can be copied and then pasted into a text file on the computer
(to make a batch file) or the batch file itself will be created and attached
to the form.
Any help that can be offered would be appreciated. I am not a programmer at
all, so the easier the better.
Steve
projects and I want to generate a text file or populate a rich-text box based
on form information already entered.
What I am trying to do is create a login script that we apply to all
clients. This login script maps shared drives and printers and must
reference shared drive letters, server names, and printer names. I have
fields already configured that collect and store this information, but I am
at a loss on how to create my script. I was hoping I could use concat and
make one large expression, but I need line returns in it and have not seen
where I can make a line return in the concat command.
Below is an example of the first few lines. The fields I want to populate
are in <>.
@echo off
REM Login.bat Version 1.0
REM Exit if user has logged onto the server
If %COMPUTERNAME%.==<ServerName>. GOTO END
REM Delete existing drive mappings
etc, etc, etc
After the last line (REM Delete), I want to make a loop that checks for the
drive mapping I am going to use (saved in form as DriveMappingLetter) and
then makes a line for each one. Then a loop will then map each drive letter
used to the proper folder based on the \\<ServerName>\<DriveName> fields.
Ideally, when all is said and done, either this text will be sitting in a
text box that can be copied and then pasted into a text file on the computer
(to make a batch file) or the batch file itself will be created and attached
to the form.
Any help that can be offered would be appreciated. I am not a programmer at
all, so the easier the better.
Steve