MSFN Forum: multiple cd drives and autoit - MSFN Forum

Jump to content



Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

multiple cd drives and autoit Rate Topic: -----

#1 User is offline   ripken204 

  • The Hardware Guy
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 6,311
  • Joined: 23-December 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 25 August 2005 - 05:38 PM

im pretty sure that this has been asked before but i cant find it

well im going to be using virtual cd drives to test out my xpcd on vmware and how should i go about doing it with autoit. i have a drive f: h: i: j: . and i could possibly use any of them for my install, how can i make it generic to select what drive to install stuff from b/c i will be installing programs from the cd. or to make it easier would you just suggest copying all of the programs to the c: drive, then install them, then delete them?


#2 User is offline   Nologic 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 461
  • Joined: 07-October 03

Posted 25 August 2005 - 09:20 PM

I'd suggest leaving stuff on the CD\DVD unless there is a really good reason.

Older script...MHz has a newer more buff version of this:
Global $Drive

Func _FindDrive($type, $name)
   Local $drvs
   While Not $Drive
      $drvs = DriveGetDrive($type)
      If Not @error Then
         For $i = 1 To $drvs[0]
            If DriveStatus($drvs[$i] & "\") = "READY" Then
               If FileExists($drvs[$i] & "\" & $name) Or DriveGetLabel($drvs[$i]) = $name Then
                  $Drive = $drvs[$i] & "\"
                  Return $Drive
               EndIf
            EndIf
         Next
         If Not $Drive Then
            If StringInStr("CDROM|REMOVABLE|NETWORK", $type) Then
               If StringInStr("CDROM|REMOVABLE", $type) Then
                  If MsgBox(21, "Warning", "Please insert media into a drive now") = 2
                     Sleep(1000)
                     If MsgBox(36, 'Important', 'Are you sure that you want to exit?') = 6 Then Exit
               ElseIf $type = "NETWORK" Then
                  If MsgBox(21, "Warning", "Please connect to a network now") = 2 Then
                     Sleep(1000)
                     If MsgBox(36, 'Important', 'Are you sure that you want to exit?') = 6 Then Exit
                  EndIf
               EndIf
            Else
               If MsgBox(36, 'Drive Not Found', 'Drive could not be found would you like to exit?') = 6 Then Exit
            EndIf
            Sleep(2000)
         EndIf
      EndIf
   WEnd
EndFunc


Basically use some thing like this then to find the XP isntall disk:
_FindDrive( "CDROM" , "WIN51" )


Which would then set the global var of $Drive to what ever drive that is....so if it was on say drive Z....then $Drive would equal Z:\

So you would then have some thing like this else where in the script

RunWait ( $Drive & "SOFTWARE\Tools - CD & DVD\ASPI\ASPI_4.71.2_au3.exe" )


To launch an app on the XP CD in a sub folder of "SOFTWARE"

#3 User is offline   ripken204 

  • The Hardware Guy
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 6,311
  • Joined: 23-December 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 26 August 2005 - 11:18 AM

so what code am i suppose to use? do u have an example script of it that i can see? and what im doing is telling it to find the disk with the label "xpcd" or whatever it is called?

#4 User is offline   Nologic 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 461
  • Joined: 07-October 03

Posted 26 August 2005 - 11:54 AM

Your suppose to use all the code listed above.

To find you CD disk labeled "xpcd" you would invoke:

_FindDrive( "CDROM" , "xpcd" )

Since the $name paramiter of the fuction is good for both looking for the title of the storage unit...or a file on the storage unit.

The $type param....is for dictating what type of storage unit to search for. Values availabe are: "ALL", "CDROM", "REMOVABLE", "FIXED", "NETWORK", "RAMDISK", or "UNKNOWN"

#5 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,020
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 26 August 2005 - 12:26 PM

Here is a VBS script that will list all the drive type
This Color Is Inactive It checks to see if the check file is
there, remove ' those from before the begining. To Make
Active Remove The ' from in front of the text.
Add the Sfile to run the check.

This Color is the check file it check for, Place in between the " "
This can be a full path EG Sfile="\Afolder\Bfolder\WhateverCheck.Exe"

This Color Is A Popup that will list each drive this can be removed from the script

Quote

Dim Act, Fso, Drv, Sfile, strDrive
Set Act = CreateObject("Wscript.shell")
Set fso = CreateObject("Scripting.FileSystemObject")
'''' Place A Check File Here EG win51
Sfile = ""
   Set Drv = Fso.Drives
   For Each strDrive in Drv
   Act.Popup "This Is Drive, " & strDrive & "\", 3, "List Drives", 0 + 32
  ' If Fso.FileExists(strDrive & Sfile) Then
  ''''PLACE IF IT HERE ACTION HERE
  ' Exit For
  ' Else
  ''''PLACE IF IT NOT HERE ACTION HERE
  ' Exit For
  ' End If

  Next

This post has been edited by gunsmokingman: 26 August 2005 - 12:30 PM


#6 User is offline   ripken204 

  • The Hardware Guy
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 6,311
  • Joined: 23-December 04
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 26 August 2005 - 12:42 PM

k, thx, ill be giving it a try in a few days when i get all of my programs able to be silent installs

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy