Hi Gerhard,
Gerhard Hofmann wrote:
Hi all,
I have created a batch file + perl script that will do application-only-installs interactively, you can select one or more bat files in a multi choice menu.
I have placed the script here for download: http://home.arcor.de/gerhardhofmann050472/unattended/
Please be warned: I have done only very basic testing on a single PC. The script *SHOULD* install perl if not present, but I have not tested this.
Feedback and suggestions are welcome!
Thank you soo much for putting the histroic discussions that have happened around this topic in the past into a script.
I have tried running it and now have a couple questions/suggestions.
What was the reasoning for you to put the appsonly.bat and appsonly.pl script into the root of \\install\install and not into \\install\install\bin ?
I would have thought that it would make more sense and have less potential for broken scripts etc if the appsonly script tried to work off the exact same environment as a machine that was installed using unattended?
And as part of the same, I don't quite understand what you are doing in the following section
set scriptdir=%~dp0
set scriptdir=%scriptdir%*
SET scriptdir=%scriptdir:\*=%
net use z: %scriptdir%
Would you mind giving me a line by line comment of what it is you intend to do? It doesn't seem to work in my environment and I would like to understand why.
Hi Urs,
first of all, thanks for your feedback!
set scriptdir=%dp0
This will determine current working directory, that means the directory where appsonly.bat is located, in my case \\server\install\
set scriptdir=%scriptdir%*
set scriptdir=%scriptdir:\*=%
Looks complicated, but will just strip off the trailing "\" and \\server\install\ will be converted to \\server\install
I just copied this from some old usenet postings in comp.msdos.batch...
I may have misunderstood what you did code or may have made mistakes in trying to test it, but based on my current tests and (limited) understanding, I have the following two suggestions:
1. add appsonly.bat and appsonly.pl into \\install\install\bin and then add %z%\bin to the path of the workstation for the duration of the running of the appsonly.bat & appsonly.pl. Which would put appsonly.pl into the same dir that todo.pl is and emulate the way a "normal" unattended install is normally run. (I guess it could be argued that appsonly.bat would really belong to %z%scripts ? - Don't really care about that one)
You're right, it would be better to put it into \\server\install\bin. In this case, %scriptdir% would be \\server\install\bin. I need to find a way to strip off the trailing "\bin" from this string because I have to map \\server\install to drive z: and not \\server\install\bin. Because I had no idea how to cut off the trailing "\bin", I simply put everything in the root of my unattended share.
Any ideas how to strip off the trailing "\bin"?
2. please make sure you have "%Z%" in all scripts instead of hardcoding "Z:\" as there are systems out there that actually depend on the "unattended Z drive" being something different from "Z:\" . What might be confusing in this is that as and when the unattended installer is being run there is a phase when it does not matter what drive letter the "unattended Z drive" has (speak it can be Z for example). But later on, once the unattended system is logging into the domain and uses the domain envrionment and it's login scripts etc. There can be situations where the Z:\ drive is already used and assigned. And in those circumstances it is nice if one can depened on the rest of the unattended scripts to use the value of the "%Z%" environment variable to dictate what drive letter should be used for the "unattended Z drive".
I'll think about making this more flexible.
3. does anything inside of appsonly.pl need to change if it is now located in the "bin" dir and no longer in the root of the dirs?
I don't think anything has to be changed but will have to review this.
I will try to add your suggested improvements to my script. Having done this, I will post it here and move the script to the unattended WIKI as Kaari suggested in his posting.
Regards Gerhard
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ unattended-info mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/unattended-info
