• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Batch file snapin install

    Scheduled Pinned Locked Moved Solved
    Windows Problems
    4
    14
    3.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dureal99d @Tom Elliott
      last edited by

      @Tom-Elliott I know nothing of batch scripting but i’m slowly learning bit by bit. So by all means any and all help is welcome on the matter.

      1 Reply Last reply Reply Quote 0
      • D
        dureal99d
        last edited by

        @Tom-Elliott THe script for whatever reason is not executing which I find to be surprising cause when executed on windows it installs without a hitch. I assume the error code 1 is some permission issue. but I don’t know how when I have disabled the permissions on my systems?

        1 Reply Last reply Reply Quote 0
        • D
          dureal99d @Joe Schmitt
          last edited by

          @Joe-Schmitt said in Batch file snapin install:

          snapin packs is to let you bundle multiple files / scripts together.

          I will research to see how I can convert this. I tried to save it as a vbs but nothing happens then

          1 Reply Last reply Reply Quote 0
          • J
            Joe Schmitt Senior Developer
            last edited by

            @dureal99d you can skip the extra file altogether. I just looked at your script and you’re just using VBS to wait, which can be done in batch natively:

            timeout /t 5 /nobreak
            

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            1 Reply Last reply Reply Quote 0
            • Wayne WorkmanW
              Wayne Workman
              last edited by Wayne Workman

              said in Batch file snapin install:

              “*[PopCap][ExtremlymTorrents.Me].exe”

              I don’t think it knows where these are. In a batch script, the current directory is

              %~dp0
              

              So maybe try this piece

              "%~dp0*[PopCap][ExtremlymTorrents.Me].exe"
              

              EDIT: Fixed, ty @Joe-Schmitt

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              1 Reply Last reply Reply Quote 0
              • J
                Joe Schmitt Senior Developer
                last edited by

                @Wayne-Workman %~dp0 includes the trailing \

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                D 1 Reply Last reply Reply Quote 1
                • D
                  dureal99d @Joe Schmitt
                  last edited by

                  @Joe-Schmitt I will try this soon and report back.

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    dureal99d @dureal99d
                    last edited by

                    @Joe-Schmitt tell me if this is right.

                    @echo off
                    Echo Wscript.Sleep 5000>"%Temp%\Wait.vbs"
                    Echo WScript.Quit>>"%Temp%\Wait.vbs"
                    Echo Installing Game Pack...
                    Echo.
                    For /f "tokens=*" %%a in ('dir /b /on "%~dp0*[PopCap][ExtremlymTorrents.Me].exe" ') do (
                    Echo Installing %%~na...
                    Echo.
                    Start "" /wait Wscript "%Temp%\Wait.vbs"
                    Start "" /wait "%%a" /S
                    )
                    Del "%Temp%\Wait.vbs"```
                    Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                    • Wayne WorkmanW
                      Wayne Workman @dureal99d
                      last edited by

                      @dureal99d You’ve still not gotten rid of the vbs calls.

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                      Daily Clean Installation Results:
                      https://fogtesting.fogproject.us/
                      FOG Reporting:
                      https://fog-external-reporting-results.fogproject.us/

                      D 1 Reply Last reply Reply Quote 0
                      • D
                        dureal99d @Wayne Workman
                        last edited by dureal99d

                        @Wayne-Workman I see. well then how about this?

                        @echo off
                        Echo Installing Game Pack...
                        Echo.
                        For /f "tokens=*" %%a in ('dir /b /on "%~dp0*[PopCap][ExtremlymTorrents.Me].exe"') do (
                        Echo Installing %%~na...
                        Echo.
                        Start "" /wait "%%a" /S
                        )
                        
                        D 1 Reply Last reply Reply Quote 0
                        • D
                          dureal99d @dureal99d
                          last edited by

                          @Joe-Schmitt @Wayne-Workman @Tom-Elliott I thank you guys for the help but the original script worked just fine.

                          I believe this one was an user error and in this case me being that user.

                          When I made the snapin pack I messed up in how I told fog to execute the bat file inside by not telling fog that it had another folder to prior to trying to execute the bat file. as you can see from my original post I had simply _install.bat"
                          when in reality it was popcap/_install.bat I have since then repacked the .zip file with no other folder in the way and simplified the bat file by naming it simply pop.bat all with the original coding @echo off Echo Wscript.Sleep 5000>"%Temp%\Wait.vbs" Echo WScript.Quit>>"%Temp%\Wait.vbs" Echo Installing Game Pack... Echo. For /f "tokens=*" %%a in ('dir /b /on "*[PopCap][ExtremlymTorrents.Me].exe"') do ( Echo Installing %%~na... Echo. Start "" /wait Wscript "%Temp%\Wait.vbs" Start "" /wait "%%a" /S ) Del "%Temp%\Wait.vbs"
                          after doing this all the games installed silently with no issues via fog deployment services. Thank You!!!

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post

                          170

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project