Is This Silly - Windows Server Making Scripts for .exe Installs

jamesleecolemanjamesleecoleman Member Posts: 1,899 ■■■■■□□□□□
So I'm making GPO's to install software. I find myself making .bat files just to install programs with .exe. Is this a silly way to try to do things?

I'm not even sure it's working for me :/
Booya!!
WIP : | CISSP [2018] | CISA [2018] | CAPM [2018] | eCPPT [2018] | CRISC [2019] | TORFL (TRKI) B1 | Learning: | Russian | Farsi |
*****You can fail a test a bunch of times but what matters is that if you fail to give up or not*****

Comments

  • djrabesdjrabes Member Posts: 66 ■■□□□□□□□□
    Nothing is ever silly in IT, as long as it works! icon_lol.gif

    What version of Windows Server are you doing this on?

    You could create a GPO in Computer Configuration > Software Settings > Software Installation and use an MSI package to remotely install programs.

    What does your script look like?
    Certifications: CompTIA A+, MCP, MCSA: Windows Server 2012, Windows Server 2016, Windows 10
    Studying: Exam 70-414: Implementing an Advanced Server Infrastructure
    Want: MCSA: Office 365, MCSE: Cloud Platform and Infrastructure Exam 70-414: Implementing an Advanced Server Infrastructure), Network+, Security+
  • BlackBeretBlackBeret Member Posts: 683 ■■■■■□□□□□
    What are the permission settings for the .bat file? The location where the .exe is stored? Could someone replace the .exe with another, then let your script install their malicious file with elevated permissions? Could someone alter your .bat file to change what's being installed if they gained access to your account?
  • gespensterngespenstern Member Posts: 1,243 ■■■■■■■■□□
    No. It is a good way to go. Collecting info and supplying it to msiexec options is one of reliable approaches that worked for decades and still works and is supported and can be used remotely via psexec, WinRM, group policies, SCCM, whatever.
  • ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    We use a combination of serva 32/64. Nlite to patch the iso with all updates. You pxe boot and are greeted with a menu of all Windows installs, Utilities / Linux distros.

    Answer file automatically installs Windows and created a small partition for saving PC check reports)

    Windows installs and a script is fired off using a combination of autoit and Powershell. This automatically installs office starter and ninite apps, deletes install files and reboots machine.

    Drivers is the next challenge currently I am building up a archive of drivers by manufacturers and storing on a server share . I may look at some Powershell wizardry to auto silent install .MSI files. That is a future task.
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
  • jamesleecolemanjamesleecoleman Member Posts: 1,899 ■■■■■□□□□□
    Alright so what I have for the a/v is this:

    @echo off

    R:\installation\ESET Endpoint\avremover_eea_nt64_enu.exe /quiet /norestart


    O365 is this:
    start /wait R:\deployment tool R:\deployment toolconfiguration.xml



    I was able to get a .msi to work... kinda.

    Nessus Agent:

    @echo off

    msiexec /i NessusAgent-6.10.1-x64.msi NESSUS_GROUPS="laptops" NESSUS_SERVER="cloud.tenable.com" NESSUS_KEY=XXXXXXX



    I made GPOs to the laptops OU and this would install all the stuff but I set it up on sign in for the script. I realized that stuff would install again when people signed in so I moved the GPO to a different OU called 'install' and linked/enforced the GPOs that will install software and now it's not working. I'm gonna go crazy lol.
    Booya!!
    WIP : | CISSP [2018] | CISA [2018] | CAPM [2018] | eCPPT [2018] | CRISC [2019] | TORFL (TRKI) B1 | Learning: | Russian | Farsi |
    *****You can fail a test a bunch of times but what matters is that if you fail to give up or not*****
  • CodeBloxCodeBlox Member Posts: 1,363 ■■■■□□□□□□
    I pretty much always use scripts if needing to install something on multiple workstations. Gives me the option to do cleanup or other things if needed after running the exe.
    Currently reading: Network Warrior, Unix Network Programming by Richard Stevens
  • jamesleecolemanjamesleecoleman Member Posts: 1,899 ■■■■■□□□□□
    So I guess I gotta get good at batch and powershell scripting.
    Booya!!
    WIP : | CISSP [2018] | CISA [2018] | CAPM [2018] | eCPPT [2018] | CRISC [2019] | TORFL (TRKI) B1 | Learning: | Russian | Farsi |
    *****You can fail a test a bunch of times but what matters is that if you fail to give up or not*****
Sign In or Register to comment.