TheCrowX Posted October 13, 2005 Posted October 13, 2005 Hi to allWell my Unattended Cd is full and i really don t want to use nlite to remove some things so i was wondering if i could install softwares from my second parition d: without having to put those heaving application on my cdThanx in advance
Doc Symbiosis Posted October 13, 2005 Posted October 13, 2005 (edited) Sure you could. Only problem is, that your second partition mustn't be always drive d: after installation. But in this case, you could write a batch, which detects a certain file on your second partition and then sets a variable to the drive letter of your second partition. ie put a file named mydrive.dat in the root of your second partition and use the following line in a batch:for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\mydrive.dat set data=%%i:Then in your runonceex.cmd you can use the variable %data% and just have to insert as last entry in your runonceex.cmd REG ADD %KEY%\999 /VE /D "Delete the environment variable data" /fREG ADD %KEY%\999 /V 1 /D "set data=" /f Edited October 13, 2005 by Doc Symbiosis
jquintino Posted October 13, 2005 Posted October 13, 2005 you could compress the folder that comtain the programs.i had the same problem i compress with uhar, during install of s.o .the file is copy to the disk and decompressed after install everything, you create a previous batch that delet de folder and the file compressed .using this metod inside 700mb i pu office 2003 full+drivers+wxp+some programs i hope this help
gunsmokingman Posted October 13, 2005 Posted October 13, 2005 (edited) I guess you could not read he said CD, plus not everyone has a dvd burner.use a dvdYou can use either a cmd like the above posted or a VBS file that use WMI and a Querryto search for the file.Example this makes it so you do not need to know the location as the path to your appis built from the Querry. This is a example with a text output file.Const ForReading = 1, ForWriting = 2,ForAppending = 8Dim ColFiles, objWMI, StrComputerStrComputer = "."Dim Act : Set Act = CreateObject("Wscript.shell")Dim Fso :Set Fso = CreateObject("Scripting.FileSystemObject")Dim Test : Test = Array(_"TweakUi.exe /passive /qr ",_"NfoReader.msi /QR",_"BitTorrent-4.0.1.exe /s /v/qn",_"Test.exe Some Switch Here",_"345.msi Some Switch Here",_"345.exe Some Switch Here",_"Hello.msi Some Switch Here",_"hello.exe Some Switch Here",_"Winamp5.msi Xname=Spad Xkey=XXXXX-XXXXX-XXXXX-XXXXX Xagent=1 Xlibrary=0 Xintex=1 " &_"Xmodernskin=1 Xaudio=1 Xvideo=0 Xvisual=1 Xextra=1 Xregopt=0 /qr")Dim Ts Set Ts = Fso.OpenTextFile("TestSplit.txt", ForWriting, True)Ts.WriteLine Space(3) & time() & "<----- BEGIN SPLIT TEST ----->" & Space(3) & Date() & vbCrLf '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' START THE SEARCH FOR THE UA APPSFor Each strtest In Test CTest = strtestApp = Split(CTest, ".")App(1) = Left(App(1), 3) Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set ColFiles = objWMI.ExecQuery("Select * from CIM_DataFile Where FileName = '" & App(0) & "' AND Extension = '" & App(1) & "'") If ColFiles.count = 0 Then Ts.WriteLine "Cannot Find This App" & Space(3) & App(0) & "." & App(1) Else End if'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' TEMPLATE TO INSTALL UA APPS For Each objFile in colFiles '''' Extra Varibles If Needed FName = Ucase(objFile.FileName) Kbname = Ucase(objFile.FileName & "." & objFile.Extension) KbPath = UCase(objFile.Drive & objFile.Path) TheFile = KbPath & Kbname If Fso.FileExists(TheFile) Then Ts.WriteLine "<------------------------------>" & vbCrLf &_ "Act.Run(""" & KbPath & strtest & """)" & vbCrLf & "<------------------------------>" Exit For End If Next Next Ts.Close Act.Run("TestSplit.txt"),1,True Fso.DeleteFile("TestSplit.txt")RunOnce EntryREG ADD %KEY%\555 /VE /D "Install Vbs" /fREG ADD %KEY%\555 /V 1 /D "%CDROM%Apps\Install.vbs" /f Edited October 13, 2005 by gunsmokingman
TheCrowX Posted October 14, 2005 Author Posted October 14, 2005 can it be done with batch file only i have no clue with RunOnce how to do itgunsmokingman your methos is really hard But thanx for the reply and to the others
gunsmokingman Posted October 14, 2005 Posted October 14, 2005 Post a list of apps with the install switches and i will do the vbs for you.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now