Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Automated installation

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,933
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Automated installation
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Automated installation - 12/19/2003 8:51:59 AM   
  steel811

 

Posts: 1
Score: 0
Joined: 12/19/2003
From: USA
Status: offline
Hello everyone,

I am new to the concept of automating an installation using VBscript, and I need some help. I have a batch file that basically executes the setup.exe to install and configure the software, but after the software gets installed, there are some modifications that I have to do manually in order for the install to completely work. This manual process is having to open up a configuration file in notepad, searching for two specific lines, and replacing them with new values. Can someone please explain how to do this if at all possible?

Much appreciated,
Sheel
 
 
Post #: 1
 
 Re: Automated installation - 6/19/2004 3:48:55 AM   
  Domino

 

Posts: 2
Score: 0
Joined: 6/18/2004
From:
Status: offline
I'm trying to do something similiar and was able to easily do it with a batch file. Basically, what I want to do is create a script that allows you to install some software in a particular order off a thumb drive or CD drive. The trick is getting the script to autodetect the drive letter of the user's CD-Rom drive/Thumb Drive and installing software from that location. In my batch file, I had it set up so that the user inputted the drive letter and the installation started off that. Any help would be appreciated.

(in reply to steel811)
 
 
Post #: 2
 
 Re: Automated installation - 6/21/2004 1:40:28 AM   
  JediK9

 

Posts: 13
Score: 0
Joined: 5/19/2004
From: Australia
Status: offline
Hi,

To detect a drive letters - drive type, use the following code:

set filesys = CreateObject("Scripting.FileSystemObject")
Set drv = filesys.GetDrive("c")
select case drv.DriveType
case 0: drtype = "Unknown"
case 1: drtype = "Removable"
case 2: drtype = "Fixed"
case 3: drtype = "Network"
case 4: drtype = "CD-ROM"
case 5: drtype = "RAM Disk"
end select


Copied from: http://mikecaldwell.com/VBINDEX/drive_drivetype.html

(in reply to steel811)
 
 
Post #: 3
 
 Re: Automated installation - 6/21/2004 2:02:57 AM   
  mbouchard


Posts: 1924
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
Sheel,

If the lines in the config file are unique then you can use replace to get the new values in to the config.

try something like this:

Const ForReading = 1
Const ForWriting = 2

Dim ReadAllTextFile, NewTextFile, F

Set F = Fso.OpenTextFile("c:\config.ini", ForReading)
ReadAllTextFile = F.ReadAll
F.close

Wscript.Sleep 500

Newtextfile = replace(readalltextfile, "LINE1", "NEWLINE1")
Newtextfile = replace(NewTextFile, "LINE2", "NEWLINE2")

Set F = Fso.OpenTextFile("c:\Config.ini", ForWriting, True)
F.Write newtextfile
F.close

(in reply to steel811)
 
 
Post #: 4
 
 Re: Automated installation - 6/24/2004 5:34:19 AM   
  kristoff

 

Posts: 2
Score: 0
Joined: 6/24/2004
From:
Status: offline
For sure through VBS you can do this, may I recommand you to give a look here : http://www.autoitscript.com/autoit3/
Simple, easy,powerfull could help you via provided examples.
Script can be compiled and so, portable. Example with notepad ;-)
Hope this help

(in reply to steel811)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Automated installation Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts