+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
O/S Deployment Thread, MDT Run Batch File in Technical; do you add timezonename twice? or was that a typo?? also you say edit it from the control folder, is ...
  1. #16

    Join Date
    Jul 2008
    Location
    Merseyside
    Posts
    297
    Thank Post
    16
    Thanked 10 Times in 10 Posts
    Rep Power
    14
    do you add timezonename twice? or was that a typo?? also you say edit it from the control folder, is this the same as doing it in the gui, right click on the share go to properties etc, that's how ive done it in the past, think i just have the time zone name incorrect.

    also how comes you put the wsus server part in, isnt that better to be done via group policy?

    cheers

  2. #17


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,588
    Thank Post
    228
    Thanked 856 Times in 735 Posts
    Rep Power
    296
    Quote Originally Posted by mbrunt View Post
    do you add timezonename twice? or was that a typo?? also you say edit it from the control folder, is this the same as doing it in the gui, right click on the share go to properties etc, that's how ive done it in the past, think i just have the time zone name incorrect.

    also how comes you put the wsus server part in, isnt that better to be done via group policy?

    cheers
    its in twice as that was the specific setting i then just copy n pasted the rest of that part it dosent need to be in twice

    wsus depends what you are doing you can either get it to update pre and or post application deployment in mdt or when its domained its personal preference id rather have it patched before anyone uses it so i do it there (i also tend to use mdt for xp so i do 1 pc then sysprep and pull a wds image as its quicker to deploy imo)

    sophos this is the batch file i use

    Code:
    @echo OFF
    REM --- Check for an existing installation of Sophos Anti-Virus
    if exist "c:\sophos4.txt" goto _End
    REM --- Deploy to Windows 2000/XP/2003
    \\server1\SophosUpdate\CIDs\S000\SAVSCFXP\Setup.exe -updp "\\server1\SophosUpdate\CIDs\S000\SAVSCFXP" -user "emlibuser1" -pwd "sophos" -mng yes
    copy "\\server1\netlogon\sophos4.bat" "c:\sophos4.txt"
    REM --- End of the script
    :_End

  3. #18

    Join Date
    Jul 2008
    Location
    Merseyside
    Posts
    297
    Thank Post
    16
    Thanked 10 Times in 10 Posts
    Rep Power
    14
    i see, my script is very similar...

    @echo Installing Sophos Antivirus
    \\ccsophos01\SophosUpdate\CIDs\S000\SAVSCFXP\setup .exe -updp "\\ccsophos01\SophosUpdate\CIDs\S000\SAVSCFXP" -user "carmel.local\sophos" -pwd "ccsophos" -mng yes

    This scripts work perfectly when I run it from my computer, its just not working when run from MDT. I'm wondering if its a permissions thing, because at the end of the deployment the computer auto logs on as local administrator (thats right isnt it??) and of course local admin wont have permission to the ccsophos01 server???

  4. #19


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,588
    Thank Post
    228
    Thanked 856 Times in 735 Posts
    Rep Power
    296
    Quote Originally Posted by mbrunt View Post
    i see, my script is very similar...

    @echo Installing Sophos Antivirus
    \\ccsophos01\SophosUpdate\CIDs\S000\SAVSCFXP\setup .exe -updp "\\ccsophos01\SophosUpdate\CIDs\S000\SAVSCFXP" -user "carmel.local\sophos" -pwd "ccsophos" -mng yes

    This scripts work perfectly when I run it from my computer, its just not working when run from MDT. I'm wondering if its a permissions thing, because at the end of the deployment the computer auto logs on as local administrator (thats right isnt it??) and of course local admin wont have permission to the ccsophos01 server???
    ive honestly not tried sophos with mdt i just have that as a startup script on all domain pcs so they should get sophos if its a domain member. Its possible that it is a quirk of already having mapped drives honestly dont know

  5. #20

    Join Date
    Jul 2008
    Location
    Merseyside
    Posts
    297
    Thank Post
    16
    Thanked 10 Times in 10 Posts
    Rep Power
    14
    yeah ill just set it as a script too, just as easy.

  6. #21

    Join Date
    Jul 2008
    Location
    Merseyside
    Posts
    297
    Thank Post
    16
    Thanked 10 Times in 10 Posts
    Rep Power
    14
    Just an update to let you know where I'm up to...

    In the state restore section of my task sequence I have a custom task called "Run Command Line" all this does is launch a script called c:\endscript.bat which lives on the local c drive of the image.

    The script contains the following...

    winsat.exe dwmformal
    powercfg -h off
    net use s: \\ccsophos01.domain\sophosupdate /User:domain\sophos sophos
    s:
    cd CIDs\S000\SAVSCFXP
    setup.exe -updp "\\ccsophos01\SophosUpdate\CIDs\S000\SAVSCFXP" -user "domain\sophos" -pwd "sophos" -mng yes
    net use s: /delete /y
    del %0

    which basically does a few things, firstly checks to see if aero capable graphics exists, if so, enables aero.
    then switches off hibernate
    then maps a network drive to my sophos share using a username and password
    navigates to the network drive
    changes directory to the sophos folder
    runs the sophos exe with some switches for an unattended setup
    deletes the network drive.
    and then deletes itself.

    many thanks for all your help, im more or less sorted, got a few other issues that i've opened in new posts but mainly everything is good

  7. #22

    Join Date
    Jul 2012
    Location
    Michigan
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Running Batch during mdt deployment

    Quote Originally Posted by sted View Post
    or you could just add it as an mdt application
    Attachment 10820Sted,
    Running the batch file
    Attachment 10821
    Attachment 10822
    Attachment 10823

    next next finish (or similar then from the install setup screens select it and it will install as soon as windows is done (and any pre software updates you may or may not have set to deploy are done)
    Sted if I want to setup a batch file to run during MDT deployment which is a part of our FlashPlayer modified install looking at your Command-Line argument for running it \\

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Batch File to run a shortcut
    By tommccann in forum Scripts
    Replies: 6
    Last Post: 13th September 2010, 02:17 PM
  2. Block users running a batch file to run command.com?
    By reggiep in forum Windows Server 2008
    Replies: 3
    Last Post: 1st August 2009, 03:44 PM
  3. run a batch file on logon with a CC3 Network
    By new-2-this in forum How do you do....it?
    Replies: 5
    Last Post: 17th July 2008, 07:57 PM
  4. prezzie batch file to collect dps logs
    By russdev in forum ICT KS3 SATS Tests
    Replies: 4
    Last Post: 16th May 2006, 12:16 PM
  5. batch file help
    By beeswax in forum Scripts
    Replies: 9
    Last Post: 3rd March 2006, 07:48 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •