Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

How do I install software from DVD?


  • Please log in to reply
7 replies to this topic

#1
cantab

cantab
  • Member
  • 2 posts
  • Joined 07-May 13
  • OS:Windows 7 x86
  • Country: Country Flag
How can I automatically install software directly from a customized Windows 7 DVD? I know that I can run installers either from an unattend xml file or using a batch script, but all examples I've seen have involved first copying the installers to the hard drive, which I want to avoid due to disk space constraints on some target PCs.


How to remove advertisement from MSFN

#2
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,841 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

Here you can see an example where the DVD drive is located, then next will run something from the disc.
http://www.msfn.org/...post__p__953464
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#3
Harshad

Harshad
  • Member
  • 4 posts
  • Joined 14-December 11
  • OS:Windows 7 x64
  • Country: Country Flag
Create the following folder structure once you have finalized your Windows setup by integrating driver, updates and whatever else you want to integrate into the WIM file :-
<disc_root>\sources\$OEM$\$$\SETUP\SCRIPTS\SETUPCOMPLETE.CMD
<disc_root>\Apps
Here, disc_root is your working directory/folder.

Now whatever applications you want to install without copying them over to the HDD, you put them in the Apps folder. Write code to call these application installers in the SETUPCOMPLETE.CMD file.

My sample SETUPCOMPLETE.CMD is below. If I want to abort the installation, I simply have to remove/detach the installation media from the PC be it an external HDD, DVD or a USB drive. The application setups are executed from the disc directly.

cmdow @ /HID
@echo off

FOR %%i IN (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:\CD.txt SET CDROM=%%i:


REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Removing Setup Disc Will Cancel Installation." /f

REG ADD %KEY%\001 /VE /D "7-Zip 9.20" /f
REG ADD %KEY%\001 /V 1 /D "%CDROM%\Apps\7z920.exe" /f

REG ADD %KEY%\002 /VE /D "Java Runtime Environent 7 Update 17" /f
REG ADD %KEY%\002 /V 1 /D "%CDROM%\Apps\JRE7u17.exe -ai -gm2" /f

REG ADD %KEY%\003 /VE /D "K-Lite Codec Mega 9.75" /f
REG ADD %KEY%\003 /V 1 /D "%CDROM%\Apps\K-Lite_Codec_Pack_975_Mega.exe" /f

REG ADD %KEY%\004 /VE /D "Google Chrome" /f
REG ADD %KEY%\004 /V 1 /D "%CDROM%\Apps\ChromeStandaloneSetup.exe /silent /install" /f

REG ADD %KEY%\005 /VE /D "Microsoft Redistributable Packages" /f
REG ADD %KEY%\005 /V 1 /D "%CDROM%\Apps\VBCFJRedist_AIO_x86_x64.exe /y" /f

REG ADD %KEY%\006 /VE /D "dotNet Framework 4" /f
REG ADD %KEY%\006 /V 1 /D "%CDROM%\Apps\dotNetFx40_Full_x86_x64_silent.exe" /f

REG ADD %KEY%\007 /VE /D "ImgBurn 2.5.7.0" /f
REG ADD %KEY%\007 /V 1 /D "%CDROM%\Apps\iBurn257.exe" /f

REG ADD %KEY%\008 /VE /D "DirectX" /f
REG ADD %KEY%\008 /V 1 /D "%CDROM%\Apps\dxrtfull.exe" /f

REG ADD %KEY%\009 /VE /D "Adobe Reader 11" /f
REG ADD %KEY%\009 /V 1 /D "%CDROM%\Apps\adober11002.exe -ai" /f

REG ADD %KEY%\010 /VE /D "Adobe Flash Player" /f
REG ADD %KEY%\010 /V 1 /D "%CDROM%\Apps\AdobeFlash.exe" /f

REG ADD %KEY%\011 /VE /D "Search Everything" /f
REG ADD %KEY%\011 /V 1 /D "%CDROM%\Apps\Everything.exe /S" /f

REG ADD %KEY%\012 /VE /D "WinCDEmu 3.6" /f
REG ADD %KEY%\012 /V 1 /D "%CDROM%\Apps\WinCDEmu-3.6-silent" /f

REG ADD %KEY%\013 /VE /D "Office 2010 ProPlus" /f
REG ADD %KEY%\013 /V 1 /D "%CDROM%\Apps\Office_2010x86\setup.exe /adminfile Basic_Modal.MSP" /f 

::REG ADD %KEY%\014 /V 2 /D "%CDROM%\Apps\Office_2010x86\SetupOfficeTabEnterprise.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-" /f 
::REG ADD %KEY%\014 /V 3 /D "%CDROM%\Apps\Office_2010x86\MicrosoftToolkit.exe /EZ-ActivatorOffice" /f 

%~dp0"Program Install.exe" /s
::CLEAN-UP
cd %~dp0
attrib -R -A -S -H *.*
SHUTDOWN /R /T 5
cd..
RMDIR /S /Q "%WINDIR%\Setup\Scripts"

EXIT
See attachment for installation screen during first logon.

EDIT 1 - The CD.txt file mentioned in the 3rd line of the code is a dummy file. I have actually written the changes made to the setup in it. If you don't want to use it then you can change it to point to an installer in your apps folder.
FOR %%i IN (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:\Apps\7z920.exe SET CDROM=%%i:
7z920.exe is one of the installers I am calling in the SETUPCOMPLETE.CMD
Have commented the Office 2010 entries. They work but was unable to get the activator to run silently.

EDIT 2 - %~dp0"Program Install.exe" /s This file is copied to C:\WINDOWS\Setup\Scripts folder and is then executed from the C drive. It executes before the last restart (Windows is finalizing settings window of setup) after which the machine boots up for first logon. On the installation media, this file is located along with the SETUPCOMPLETE.CMD file in the <disc_root>\sources\$OEM$\$$\SETUP\SCRIPTS\ folder. More programs can be executed this way. The user cannot prevent the execution as these are executed from the HDD. The last CLEAN-UP portion deletes these copied files.

EDIT 3 - Some important links.
1 -  http://unattended.msfn.org/unattended.xp/view/web/18/
2 -  http://unattended.msfn.org/unattended.xp/view/web/31/
3 -  http://unattended.msfn.org/unattended.xp/view/web/59/
Successfully seen this method working with Windows XP SP2, Windows 7 x86 & x64, and Windows 7 SP1 x86 & x64.

EDIT 4 - RunOnceEx entries to execute registry files and command prompt commands.
REG ADD %KEY%\001 /V 1 /D "cmd.exe /c del /Q C:\Adobe Reader 6.0.lnk" /f
REG ADD %KEY%\002 /V 1 /D "regedit /s %CDROM%\Apps\begin.reg" /f

PS:- Ignore the title of the window shown in the attachment. Have changed it in the code. The title of the window supports only limited characters. Image is of a test install. If anyone knows how to change the "Windows is now setting up the following items" text shown in the attachment, please let me know.

Attached Files


Edited by Harshad, 16 May 2013 - 08:47 PM.


#4
cantab

cantab
  • Member
  • 2 posts
  • Joined 07-May 13
  • OS:Windows 7 x86
  • Country: Country Flag
Thanks both. Harshad's method has worked great and let me port over my RunOnceEx commands from my unattended Windows XP.

I'm not sure what this bit of the code is for though. I left it out of my setupcommands.cmd.

cd %~dp0
attrib -R -A -S -H *.*
SHUTDOWN /R /T 5
cd..
RMDIR /S /Q "%WINDIR%\Setup\Scripts"

EXIT



#5
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,841 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

Harshad posted an example, not a full solution. There may be portions of his script that is not applicable to what you want to do.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#6
Harshad

Harshad
  • Member
  • 4 posts
  • Joined 14-December 11
  • OS:Windows 7 x64
  • Country: Country Flag
Removed as information contained in this post has been added to original post above.

Edited by Harshad, 18 May 2013 - 01:58 AM.


#7
kingshawn

kingshawn

    Newbie

  • Member
  • 10 posts
  • Joined 09-December 13
  • OS:Vista Ultimate x86
  • Country: Country Flag
Hi there, would you help me understand the file named "program install.exe /s"


%~dp0"Program Install.exe" /s
::CLEAN-UP
cd %~dp0
attrib -R -A -S -H *.*
SHUTDOWN /R /T 5
cd..
RMDIR /S /Q "%WINDIR%\Setup\Scripts"

EXIT


Thanks!

Edited by kingshawn, 12 December 2013 - 01:05 PM.


#8
submix8c

submix8c

    Inconceivable!

  • Patrons
  • 4,287 posts
  • Joined 14-September 05
  • OS:none specified
  • Country: Country Flag

In other words -

 

whatever-your-progam-name-is.EXE

 

Another "example". ;)


Someday the tyrants will be unthroned... Jason "Jay" Chasteen; RIP, bro!

Posted Image





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users