#42769 - 2003-07-11 03:38 PM
Need help to streamline my script
|
LVF
Fresh Scripter
Registered: 2002-10-25
Posts: 10
|
I need to determine the CDROM drive and this is what i've got sofar. The problem is that if the hosts file is copy/backuped the script wants to copy it from every drive. Any suggestions are welcome.
variables: $host2k = "%systemroot%\system32\drivers\etc"
Script
$Array=d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z For Each $element In $Array Shell 'cmd /c copy "$host2k\hosts" "$host2k\hosts.org"' ; backup original hosts file Shell 'cmd /c copy "$element:\hosts" "$host2k\hosts"' ; implement new hosts file Next GoTo end
|
Top
|
|
|
|
#42771 - 2003-07-11 03:51 PM
Re: Need help to streamline my script
|
LVF
Fresh Scripter
Registered: 2002-10-25
Posts: 10
|
You're absolutly wright! I try to make a script which installs IE6 for the home computer of my users and it's must copy a new hosts file for access to the company network. The problem is that not everyone had the D-drive as his CD-ROM drive. j.meijer@lvf.nl
|
Top
|
|
|
|
#42773 - 2003-07-11 03:58 PM
Re: Need help to streamline my script
|
Sealeopard
KiX Master
Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
|
Okay, so let me rephrase wht you try to do.
You provide users with a CD-ROM containing an IE6 install (hopefully prepared with IEAK for completely silent install!). After the IE6 install, you also want to copy over the HOSTS file from the same CD-ROM.
Q: Where is the script being run from?
My solution: KiXtart and the script are included in that CD-ROM. User clicks on an INSTALLME.BAT file which in turn starts the KiXtart script. Thus, the @SCRIPTDIR macro includes the dirveletter of the CD-rOM dirve as it is being started from there. Then LEFT(@SCRIPTDIR,1) will give you the drive letter.
Alternatively, see the following UDFs: WshEnumDrives() - Enumerate drives on your local machine and DriveEnum() - return a list of specific, connected drive types
Finally, there might be a way to include the HOSTS file update into the IE install though the IEAK. I highly recommend to use IEAK for the deployment, giving users choices is a risk!
_________________________
There are two types of vessels, submarines and targets.
|
Top
|
|
|
|
#42774 - 2003-07-11 04:14 PM
Re: Need help to streamline my script
|
LVF
Fresh Scripter
Registered: 2002-10-25
Posts: 10
|
Indeed @SCRIPTDIR is what i need. It's an autorun cd which calls a kix script. The user see a menu to choose his OS and the script will backup/copies the hosts file, next it wil determine which version of IE is used. If it's below version 6 or 128-bits encryption, it's installing IE6 or a patch to 128-bits encryption (W95).
Thanks a lot also for mention IEAK.
Greetz
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 557 anonymous users online.
|
|
|