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

snapin and batch script

Scheduled Pinned Locked Moved Unsolved
FOG Problems
6
54
19.9k
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.
  • P
    plegrand @Avaryan
    last edited by May 16, 2017, 12:35 PM

    @Avaryan then i use your ps script as a powershell template into snapin ?
    thanks i try

    T 1 Reply Last reply May 16, 2017, 12:36 PM Reply Quote 0
    • T
      Tom Elliott @plegrand
      last edited by May 16, 2017, 12:36 PM

      @plegrand I still doubt if that will work. If UpdateInstaller.exe requires user input, the script won’t run (or will be stuck running forever).

      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.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      P 1 Reply Last reply May 16, 2017, 12:40 PM Reply Quote 0
      • P
        plegrand @Tom Elliott
        last edited by May 16, 2017, 12:40 PM

        @Tom-Elliott i’m testing the ps script, but i cant understand why it could works better than a batch script which make the same thing

        T 1 Reply Last reply May 16, 2017, 12:53 PM Reply Quote 0
        • P
          plegrand @Avaryan
          last edited by May 16, 2017, 12:46 PM

          @Avaryan it doesn’ works, the share is not mounted at all

          1 Reply Last reply Reply Quote 0
          • T
            Tom Elliott @plegrand
            last edited by May 16, 2017, 12:53 PM

            @plegrand I’m asking if UpdateInstaller.exe (as you’re running it) expects user input?

            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.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            P 1 Reply Last reply May 16, 2017, 1:23 PM Reply Quote 0
            • P
              plegrand @Tom Elliott
              last edited by plegrand May 16, 2017, 7:24 AM May 16, 2017, 1:23 PM

              @Tom-Elliott In fact i will not use “UpdateInstaller.exe” IRl. I will use a command line with arguments like that :

              "call W:\cmd\DoUpdate.cmd /verify /updatecpp /updatetsc /instdotnet4 /autoreboot"
              

              But this command doesnt open a window then for my test i cant see if the command is well launched or not.

              But for the moment my problem is : how mount a samba share with snapin which is usable by administrator user

              T A 2 Replies Last reply May 16, 2017, 1:32 PM Reply Quote 0
              • T
                Tom Elliott @plegrand
                last edited by May 16, 2017, 1:32 PM

                @plegrand You can’t. Not with snapins in that sense. It will be mounted by the SYSTEM user only as that’s how snapins run.

                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.

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                P 1 Reply Last reply May 16, 2017, 1:46 PM Reply Quote 0
                • A
                  Avaryan @plegrand
                  last edited by May 16, 2017, 1:42 PM

                  @plegrand said in snapin and batch script:

                  But for the moment my problem is : how mount a samba share with snapin which is usable by administrator user

                  What version of Windows would this Snapin be run on?

                  P 1 Reply Last reply May 16, 2017, 1:47 PM Reply Quote 0
                  • P
                    plegrand @Tom Elliott
                    last edited by plegrand May 16, 2017, 7:47 AM May 16, 2017, 1:46 PM

                    @Tom-Elliott may be with psexec tool ?
                    For the moment i cant make it works syntax problem but with snapin pack ?

                    T 1 Reply Last reply May 16, 2017, 1:50 PM Reply Quote 0
                    • P
                      plegrand @Avaryan
                      last edited by May 16, 2017, 1:47 PM

                      @Avaryan Windows 7 and Windows 10

                      1 Reply Last reply Reply Quote 0
                      • T
                        Tom Elliott @plegrand
                        last edited by May 16, 2017, 1:50 PM

                        @plegrand I am pretty sure, no amount of tries (with or without) snapin pack, snapin plain, psexec, powershell, batch, vbscript, or any thing else will get this working for you.

                        The first step would be to find out if the command is actually needing user input. Snapins cannot operate with the user environment.

                        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.

                        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                        P 1 Reply Last reply May 16, 2017, 1:57 PM Reply Quote 0
                        • W
                          Wayne Workman @Tom Elliott
                          last edited by May 16, 2017, 1:56 PM

                          @Tom-Elliott said in snapin and batch script:

                          Essentially, the reason why the “red x” happens is because System user is who mounted the point, and the permissions are not available to the user you’re actually logged in under. If you need a “global” mount of a drive, this would be more readily handled using GPO’s, not fog snapins. While I’m sure it “could” be handled via a snapin, i think such a thing is out of scope for the FOG Client.

                          This is correct, use Group Policy to do this. Either in a startup script or a login script. That’s how I’ve always accomplished it.
                          Additionally, you don’t even need to script it because Group Policy has native functionality for mapping & mounting remote volumes.

                          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
                          • P
                            plegrand @Tom Elliott
                            last edited by plegrand May 16, 2017, 7:59 AM May 16, 2017, 1:57 PM

                            @Tom-Elliott as i said before the command i will use will not need user input :

                            I will use a command line with arguments like that :

                            "call W:\cmd\DoUpdate.cmd /verify /updatecpp /updatetsc /instdotnet4 /autoreboot"
                            

                            once share mounted in w:

                            I would like to update my computer once image deployed, for that i use “WsusOffline”
                            WsusOffline is located on a samba share, then i have to mount the samba share, in “w:” for example, and then launch this command :

                            W:\cmd\DoUpdate.cmd /verify /updatecpp /updatetsc /instdotnet4 /autoreboot"
                            

                            from the samba share

                            1 Reply Last reply Reply Quote 0
                            • A
                              Avaryan
                              last edited by May 16, 2017, 1:59 PM

                              Based on a couple minutes of research, I don’t think you can run UpdateInstaller.exe silently. So this is likely just not going to work.
                              http://www.wsusoffline.net/docs/

                              P 1 Reply Last reply May 16, 2017, 2:00 PM Reply Quote 0
                              • P
                                plegrand @Avaryan
                                last edited by May 16, 2017, 2:00 PM

                                @Avaryan said in snapin and batch script:

                                UpdateInstaller.exe

                                is only for testing, the command i want to launch is :

                                "call W:\cmd\DoUpdate.cmd /verify /updatecpp /updatetsc /instdotnet4 /autoreboot"
                                

                                from the samba share

                                T 1 Reply Last reply May 16, 2017, 2:02 PM Reply Quote 0
                                • T
                                  Tom Elliott @plegrand
                                  last edited by May 16, 2017, 2:02 PM

                                  @plegrand Does the “DoUpdate.cmd” script call UpdateInstaller.exe?

                                  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.

                                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                  P 2 Replies Last reply May 16, 2017, 2:02 PM Reply Quote 0
                                  • P
                                    plegrand @Tom Elliott
                                    last edited by May 16, 2017, 2:02 PM

                                    @Tom-Elliott no
                                    It works alone without waiting something from the user

                                    T P 2 Replies Last reply May 16, 2017, 2:05 PM Reply Quote 0
                                    • T
                                      Tom Elliott @plegrand
                                      last edited by May 16, 2017, 2:05 PM

                                      @plegrand So have you tried with using the DoUpdate.cmd instead of trying with UpdateInstaller.exe?

                                      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.

                                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                      P 1 Reply Last reply May 17, 2017, 7:51 AM Reply Quote 0
                                      • P
                                        plegrand @Tom Elliott
                                        last edited by plegrand May 16, 2017, 8:15 AM May 16, 2017, 2:13 PM

                                        @Tom-Elliott @Avaryan
                                        It works !!! with psexec
                                        for the moment from command line, then i need to package my script and psexec ?

                                        here is the command :

                                        psexec \\%computername% -u %computername%\Administrateur -p password -e cmd /c "net use y: \\samba\wsus$ "my'password" /User:samba\Administrateur & y:\wsusoffline\client\UpdateInstaller.exe"
                                        

                                        UpdateInstaller.exe open a windows and wait for user input.
                                        For the moment i dont if it will works with snapin

                                        1 Reply Last reply Reply Quote 0
                                        • P
                                          plegrand @plegrand
                                          last edited by plegrand May 16, 2017, 8:43 AM May 16, 2017, 2:38 PM

                                          @plegrand yes
                                          but for the moment nothing happen 😉
                                          I’m trying snapin pack
                                          with this command :

                                          psexec \\%computername% -u %computername%\Administrateur -p password -e cmd /c "net use y: \\samba\wsus$ "my'password" /User:samba\Administrateur & y:\wsusoffline\client\cmd\DoUpdate.cmd /verify /updatecpp /updatetsc /instdotnet4 /autoreboot"
                                          

                                          i made a zip with my batch script (test.bat) and psexec

                                          Snapin Type Snapin Pack
                                          Snapin Pack Template Batch Script
                                          Snapin Pack File cmd.exe
                                          Snapin Pack Arguments /c “[FOG_SNAPIN_PATH]\MyScript.bat”
                                          Snapin File Max Size:1900M test.zip
                                          Snapin Command cmd.exe /c “[FOG_SNAPIN_PATH]\MyScript.bat”

                                          W 1 Reply Last reply May 17, 2017, 1:56 AM Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 2 / 3
                                          2 / 3
                                          • First post
                                            27/54
                                            Last post

                                          162

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project