The WinReducer Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

The WinReducer ForumLog in

FORUM

description[ANSWERED] Post-installation script and .bat Empty[ANSWERED] Post-installation script and .bat

more_horiz
Hi Again,

Can we lunch a .bat file with the OOBE Post-Installation feature ?

At the end of the setup, when i'm on the Windows desktop, I want to lunch an xxx.bat with :

Code:

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex
 ((new-object
net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"
&& SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin


In addition to the .exe post-installation feature, Chocolatey can be a good idea for silents installs.
I have in mind especially certains "on-line" softwares which have a little setup but ask then to download packages and for whom it's complex to use silents switches.

description[ANSWERED] Post-installation script and .bat EmptyRe: [ANSWERED] Post-installation script and .bat

more_horiz
Hello,

Yes this is possible to launch a bat file (you have to add it manually for the moment), but if you want I could add the support to bat files using WinReducer (like .exe, .msi, ...), today in the new build.

By the way, do need other extensions to add ?

Thought that you need to take care about administrative rights because "WinReducerPI.cmd" do not have admin rights ! There is a discussion in the forum about that.

Chocolatey seems to been interesting ... and should be a option maybe in WinReducer OS. Could you please tell me more about it ? Thanks.

description[ANSWERED] Post-installation script and .bat EmptyRe: [ANSWERED] Post-installation script and .bat

more_horiz
I think .bat support using WinReducer would be a great feature !
When you say "You have to add it manually) what do you mean exactly ? I need to put the .bat code on OOBE text edit panel ? Or type a command to make a call to xxx.bat ?

Hum... Others extensions... don't really know. Maybe .ini ? 

By default, I configure my isos with UAC disabled and terminal with admin rights so, I think it's ok.

Chocolatey is a packages manager usable with windows prompt. I knew about it when I try to automatise the "after installation" Windows Process.
First time, I try to use Chocolatey with a programm called "AutoIt" (a script generator for Windows). It's a way to avoid the creation of an Iso, using a Maser or a Ghost, etc.
At the end of the topic, you could see a small parse of code extract from my AutoIt

Chocolatey is an interesting way because most installs are silent install, can be easily scripted, always take the last version of a program, etc. I think it's the best way to quick install many apps on a "fresh" windows install if you don't want to implement apps on OOBE.

The Code :

#cs ----------------------------------------------------------------------------

 AutoIt Version : 3.3.12.0
 Auteur:         Oppenheimer

 Fonction du Script :
    Modèle de Script AutoIt.

#ce ----------------------------------------------------------------------------

; Début du script - Ajouter votre code ci-dessous.
Run("C:\WINDOWS\system32\cmd.exe") ; On ouvre un prompt
WinWaitActive("Administrateur : C:\WINDOWS\system32\cmd.exe") ; On attend que le prompt soit ouvert avant de lancer la commande suivante
Send( 'choco install notepadplusplus.install' & "{ENTER}") ; Lance l'installation de Notepad++

Sleep(60000)

Send( 'choco install filezilla' & "{ENTER}")

Sleep(60000)

Send( 'choco install foobar2000' & "{ENTER}")

Sleep(60000)

Send( 'choco install keepass ' & "{ENTER}")

description[ANSWERED] Post-installation script and .bat EmptyRe: [ANSWERED] Post-installation script and .bat

more_horiz
By manual, I meant you need to put a line in the WinReducer Editor and copy your bat in the WinReducerPI folder, otherwise it will be skipped.

But later today this will be done automatically by WinReducer, like all exe, msi, ...

description[ANSWERED] Post-installation script and .bat EmptyRe: [ANSWERED] Post-installation script and .bat

more_horiz
Great ! It would be an awesome feature ! Thanks a lot for your implication !

For Chocolatey, I think you should do some tests, try it generaly mean "approve it" Smile

description[ANSWERED] Post-installation script and .bat EmptyRe: [ANSWERED] Post-installation script and .bat

more_horiz
hi,

i got interested in Chocolatey now too Razz

so it Downloads all exe files i want? and on some it uses silent Parameters?

but downloading everytime all exe files is not good in my eyes.

is there a way to download them and let the script install/use them ? i.e. i download them via Chocolatey and copy them at my iso/wim file ? and what would be make more happy is when it could look at those files and see if there are new Versions, and after that download them Razz

is that possoble Razz ??

description[ANSWERED] Post-installation script and .bat EmptyRe: [ANSWERED] Post-installation script and .bat

more_horiz
Basically, Chocolatey use a library system.
Apps are downloaded on C:\ProgramData\chocolatey\lib on a .nupkg format.

With Chocolatey, you can also uninstall apps, with "choco uninstall xxx"

The way to download them and let the script install/use them is via AutoIt program, like i said on top of this topic.
I don't know if we can copy this apps on iso/wim file.
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum