Jump to content

unattended 7zip on windows 7 ?


Recommended Posts

Hi , I have to make a script to install 7zip after that windows 7 is installed . I have to use a usb device to do it .

So , i downloaded 7zip 9.20 (.msi) and I made an install.bat which contains :

msiexec.exe /i "7z.msi" ALLUSERS=1 /qb! /norestart

now , I don't know what I have to do (what i have to put in the windows 7 sources folder) to install it with windows 7 .

Thanks for your help !

Link to comment
Share on other sites


Don't know what your skill level is but you could used a canned app like RT Se7en7 Lite or NLite or just do it manually with Distibution folders and Setupcomplete.cmd

$OEM$ >> $$ >> Setup >> Scripts >> SetupComleted.cmd




@echo off
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
:: PostInstalls
start /wait msiexec /i "%systemroot%\setup\scripts\7z.msi" ALLUSERS=1 /qb! /norestart

Edited by DosProbie
Link to comment
Share on other sites

So I must mount my WIM file and create the setupcomplete.cmd ?

I do it on an usb device , should I use something like

cmd /c "FOR %i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) DO IF EXIST %i:\AppsRoot.txt SETX AppsRoot %i: -m"

To check which letter i'm using ?

Thanks !

Link to comment
Share on other sites

First off you need to create a bootable Windows 7 USB if not done already, and decide on which install method you want to use, the FOR /F loop method is if you want to install off of the usb or dvd root and if using a autounattended.xml root file, otherwise just use the setupcomplete.cmd method which will do a silent install of your 7-zip, or other apps , reg twks etc.The setupcomplete per its name runs when your Windows setup is complete but before your logon screen and will also create a setupact.log file when done.

DP :whistle:

SetupComplete.cmd

Edited by DosProbie
Link to comment
Share on other sites

Now , i have an error message (sorry if i'm a bad translator) :

It's impossible to open this setup package. check it exists and that you're authorized to reach it , or check your app dealer ...

What can I do ?

Edit : Should I take the .exe or keep the .msi ? (on the 7zip website , it's said that .msi is for x64 windows versions and .exe for x86 versions , and my windows is x86 but this one isn't .msi :s

Edited by Bobbymat26
Link to comment
Share on other sites

are u ok to check if my autounattend.xml is fine ?

if yes , there it is ! :)

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<servicing>
<package action="configure">
<assemblyIdentity name="Microsoft-Windows-LocalPack-CA-Package" version="6.1.7601.17514" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="" />
<selection name="LocalPack-CA" state="false" />
</package>
</servicing>
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>fr-FR</UILanguage>
</SetupUILanguage>
<InputLocale>fr-FR</InputLocale>
<UILanguage>fr-FR</UILanguage>
<UILanguageFallback>fr-FR</UILanguageFallback>
<UserLocale>fr-FR</UserLocale>
<LayeredDriver>1</LayeredDriver>
<SystemLocale>fr-FR</SystemLocale>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ComplianceCheck>
<DisplayReport>OnError</DisplayReport>
</ComplianceCheck>
<DiskConfiguration>
<WillShowUI>OnError</WillShowUI>
<Disk wcm:action="remove">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Type>Primary</Type>
<Order>1</Order>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Active>true</Active>
<Format>NTFS</Format>
<Label>SYSTEM</Label>
<Order>1</Order>
<PartitionID>1</PartitionID>
<Letter>C</Letter>
</ModifyPartition>
</ModifyPartitions>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
</Disk>
</DiskConfiguration>
<DynamicUpdate>
<Enable>true</Enable>
</DynamicUpdate>
<UserData>
<ProductKey>
<WillShowUI>Never</WillShowUI>
</ProductKey>
<AcceptEula>true</AcceptEula>
<FullName>AFPA</FullName>
<Organization>AFPA</Organization>
</UserData>
<ImageInstall>
<OSImage>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/INDEX</Key>
<Value>1</Value>
</MetaData>
</InstallFrom>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Themes>
<DefaultThemesOff>true</DefaultThemesOff>
</Themes>
<WindowsFeatures>
<ShowMediaCenter>false</ShowMediaCenter>
</WindowsFeatures>
<ComputerName>pc-00000-00</ComputerName>
<RegisteredOrganization>AFPA</RegisteredOrganization>
<RegisteredOwner>AFPA</RegisteredOwner>
<ShowWindowsLive>false</ShowWindowsLive>
<TimeZone>Central Europe Standard Time</TimeZone>
</component>
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CompanyName>AFPA</CompanyName>
<DisableFirstRunWizard>true</DisableFirstRunWizard>
<PlaySound>false</PlaySound>
<Window_Title_CN>l'AFPA</Window_Title_CN>
<FavoritesDelete>true</FavoritesDelete>
</component>
<component name="Microsoft-Windows-Fax-Service" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fax>
<ArchiveFaxes>false</ArchiveFaxes>
<IncomingFaxesArePublic>false</IncomingFaxesArePublic>
</Fax>
<FaxUnattend>
<ReceiveFaxes>false</ReceiveFaxes>
</FaxUnattend>
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>cmd /c "FOR %i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) DO IF EXIST %i:\AppsRoot.txt SETX AppsRoot %i: -m"</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>2</Order>
<Path>%WINDIR%\system32\sysprep\sysprep.exe /quiet /audit</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>fr-FR</InputLocale>
<SystemLocale>fr-FR</SystemLocale>
<UILanguage>fr-FR</UILanguage>
<UILanguageFallback>fr-FR</UILanguageFallback>
<UserLocale>fr-FR</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AutoLogon>
<Password>
<Value>UABhAHMAcwB3AG8AcgBkAA==</Value>
<PlainText>false</PlainText>
</Password>
<Enabled>true</Enabled>
<LogonCount>999999999</LogonCount>
<Username>afpa</Username>
</AutoLogon>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC>
</OOBE>
<UserAccounts>
<AdministratorPassword>
<Value>QABmAHAAYQBQAOkAZABhAGcAbwBBAGQAbQBpAG4AaQBzAHQAcgBhAHQAbwByAFAAYQBzAHMAdwBvAHIAZAA=</Value>
<PlainText>false</PlainText>
</AdministratorPassword>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value>UABhAHMAcwB3AG8AcgBkAA==</Value>
<PlainText>false</PlainText>
</Password>
<Description>Stagiaire AFPA</Description>
<DisplayName>Stagiaire AFPA</DisplayName>
<Group>Administrators</Group>
<Name>afpa</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<VisualEffects>
<FontSmoothing>ClearType</FontSmoothing>
</VisualEffects>
<WindowsFeatures>
<ShowMediaCenter>false</ShowMediaCenter>
</WindowsFeatures>
<TimeZone>Central Europe Standard Time</TimeZone>
<RegisteredOrganization>AFPA</RegisteredOrganization>
<RegisteredOwner>AFPA</RegisteredOwner>
<ShowWindowsLive>false</ShowWindowsLive>
</component>
</settings>
<settings pass="auditUser">
<component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>cmd /c start /wait %AppsRoot%\Install\7z920.msi /qn /s</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:f:/sources/install.wim#Windows 7 PROFESSIONAL" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
Link to comment
Share on other sites

windows install correctly but the problem is when it lauches 7zip install before to enter desktop .

it tells me that it's impossible to open package install.

Then just install the x86 with the /S switch also

2 questions

What Win7 OS Version are you installing?

And are you installing off of a Usb or Dvd?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...