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

snapin query resizing partitions

Scheduled Pinned Locked Moved Unsolved
Windows Problems
5
6
1.7k
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.
  • I
    irishfoguser
    last edited by Tom Elliott Jan 4, 2017, 11:53 AM Jan 4, 2017, 5:46 PM

    I want to run this script to resize images to the full size of the drive as a snapin buts its got 2 parts. Never used the snap in before.

    How should i do it.

    first part vbs script.

    ########## Extend Disk Partition (MAX) ##########
    'LogFilename = "C:\Windows\Setup\InstallLog.txt"
    'LogFile.writeline "-------------------------------"
    'LogFile.writeline "Extending partition to max size:"
    'LogFile.writeline "-------------------------------" & VbCrlf
    
    diskpartScript = "c:\extend_max.txt"
     
    Set oShell = CreateObject("Wscript.Shell")
    Set oShellExec = oShell.Exec("cmd /c diskpart -s " & diskpartScript)
    set oStdOutputText = oShellExec.StdOut
     
    Do While Not oStdOutputText.AtEndOfStream
    diskpartOutput = oStdOutputText.ReadLine
    'LogFile.writeline diskpartOutput
    Loop
    

    second part is a txt file. extend_max.txt"

    select disk 0
    detail disk
    list disk
    select volume c
    extend disk 0
    list disk
    exit
    
    1. can i use a snpain to copy extend_max.txt and then vbs to run to an image after its imaged
    2. how will it run it then?

    apologies for my ignorance on snapins.

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Jan 4, 2017, 5:53 PM

      I don’t understand why you’re trying to resize partitions using a snapin, the image system can handle this for you already.

      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

      1 Reply Last reply Reply Quote 0
      • G
        george1421 Moderator
        last edited by george1421 Jan 4, 2017, 1:26 PM Jan 4, 2017, 7:24 PM

        I can’t speak for snapins (don’t use them). But you should be able to bundle files with a snapin in addition to the vbscript code.

        Looking at your vbscript code this line raised a question

        Set oShellExec = oShell.Exec("cmd /c diskpart -s " & diskpartScript)
        

        diskpart is an exe not a batch script, so the cmd /c is extra. I might suggest

        Set oShellExec = oShell.Exec("diskpart -s " & diskpartScript)
        

        Also before fog supported resizeable disks I used a script similar. It was a simple added at the end of the setupcomplete.cmd batch file. I ran the diskpart command with the commands just as you have to expand the disks. It worked really well. But now the single disk resizeable option in fog works much better. Just a warning, you have to capture the image in that mode for it to work correctly on the target computer.

        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!

        1 Reply Last reply Reply Quote 0
        • W
          Wayne Workman
          last edited by Jan 5, 2017, 3:26 AM

          Fog supports re-sizable disks natively without any extra software installed in your image or any extra scripting post-imaging. This is the easiest way to solve the problem of mismatching disk sizes. I would advise against any custom solution. When you create your image in FOG, use the default which is “single disk - resizable”. This is pictured below.

          0_1483586768042_Resizable images.png

          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
          • I
            irishfoguser
            last edited by Jan 5, 2017, 9:47 AM

            @Tom-Elliott can you elaborate more.

            most of my images are windows 7/8/10 and therefore are multi partition images.
            so i use the option multiple partition image - single disk not resizeable.

            Am i doing something wrong, I was given the admin of the server when someone left and thats what i was told what to do. the old server is 0.32 and the new one i have built myself is 1.3.0.

            Q 1 Reply Last reply Jan 5, 2017, 10:10 AM Reply Quote 0
            • Q
              Quazz Moderator @irishfoguser
              last edited by Quazz Jan 5, 2017, 4:10 AM Jan 5, 2017, 10:10 AM

              @irishfoguser Hi, generally speaking you’re better off using Resizable image. If this for some reason doesn’t work (fails to deploy), then trying the other options is recommended.

              For your situation, it sounds like Resizable Image will do the trick. So I recommend picking an image, setting it to resizable, recapture, deploy and see if it works for you.

              1.3 is able to resize the correct partition for you before Windows even boots for the first time.

              1 Reply Last reply Reply Quote 4
              • 1 / 1
              1 / 1
              • First post
                2/6
                Last post

              182

              Online

              12.0k

              Users

              17.3k

              Topics

              155.2k

              Posts
              Copyright © 2012-2024 FOG Project