Personally, if you are going to learn it you should start with PowerShell. No point in trying to learn batch or VBscript and then learn PowerShell later.
The best books for me were the ‘Learn PowerShell in a month of lunches’ books. Easy to follow with a lab, and good for small sessions with specific content. Daniel Ratliff From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of David Landry Sent: Tuesday, October 21, 2014 8:54 AM To: mdtosd@lists.myitforum.com Subject: RE: [MDT-OSD] RE: Can't seem to get Symantec Endpoint Protection to install via MDT 2012 Hi All, Thanks for all the assistance. It is truly appreciated. Keith, Your script worked like a charm. My apologies for not trying this when you first suggested it. My lack of understanding what you were doing was responsible for my hesitation. Thank you so much for your assistance. Also, I am interested if anyone knows any easy to understand books on scripting for novices or internet courses that will help with learning how to create scripts? Thanks in advance, Regards, Dave From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of elsalvoz Sent: Monday, October 20, 2014 7:06 PM To: mdtosd@lists.myitforum.com<mailto:mdtosd@lists.myitforum.com> Subject: RE: [MDT-OSD] RE: Can't seem to get Symantec Endpoint Protection to install via MDT 2012 To build on Michael's answer. Batch files have a hard time with UNC paths when running. Try adding: PUSHD %~dp0 at the first line and POPD at the last line Cesar On Oct 20, 2014 3:04 PM, "Michael Niehaus" <michael.nieh...@microsoft.com<mailto:michael.nieh...@microsoft.com>> wrote: It depends. If you set up the batch file (.cmd or .bat) as an application, MDT will map a drive and run the command using the mapped drive, which matches what you described below. But if you set up a “Run command line” task sequence step that just specifies something like this: • Command line: runme.cmd • Working directory: %DeployRoot%\Applications\MyFolder Then it will likely fail as “runme.cmd” won’t see the working directory set to a UNC path; it will end up trying to run it from the default path, typically C:\Windows\System32. You could specify this instead: • Command line: runme.cmd • Working directory: %DeployDrive%\Applications\MyFolder Also, pay attention to the return code from the last command the batch file runs. If it is non-zero, you need to account for that, or tell the task sequence to ignore the error. Using batch files is a bit of a pain overall, which is why scripts are preferred. Thanks, -Michael From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com>] On Behalf Of Keith Garner (Hotmail) Sent: Monday, October 20, 2014 2:50 PM To: mdtosd@lists.myitforum.com<mailto:mdtosd@lists.myitforum.com> Subject: RE: [MDT-OSD] RE: Can't seem to get Symantec Endpoint Protection to install via MDT 2012 That’s not how MDT would run. To simulate MDT, change to the network directory and run the script from there. [cid:image001.png@01CFED10.010F3FF0] From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of David Landry Sent: Monday, October 20, 2014 1:47 PM To: mdtosd@lists.myitforum.com<mailto:mdtosd@lists.myitforum.com> Subject: RE: [MDT-OSD] RE: Can't seem to get Symantec Endpoint Protection to install via MDT 2012 But not if I connect to the server from the target machine. [cid:image002.png@01CFED10.010F3FF0] Dave Landry Site Support Administrator Laird Technologies 1 Perimeter Road – Suite 700 Manchester, NH 03103 +1 603-935-7857<tel:%2B1%20603-935-7857> [LairdLogo] From: David Landry Sent: Monday, October 20, 2014 4:39 PM To: mdtosd@lists.myitforum.com<mailto:mdtosd@lists.myitforum.com> Subject: RE: [MDT-OSD] RE: Can't seem to get Symantec Endpoint Protection to install via MDT 2012 Yes, I can run the sep_install.bat from the local desktop and they work perfectly. Dave Landry Site Support Administrator Laird Technologies 1 Perimeter Road – Suite 700 Manchester, NH 03103 +1 603-935-7857<tel:%2B1%20603-935-7857> [LairdLogo] From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of elsalvoz Sent: Monday, October 20, 2014 4:24 PM To: mdtosd@lists.myitforum.com<mailto:mdtosd@lists.myitforum.com> Subject: RE: [MDT-OSD] RE: Can't seem to get Symantec Endpoint Protection to install via MDT 2012 Do the scripts work when you run them manually? Cesar On Oct 20, 2014 12:24 PM, "David Landry" <david.lan...@lairdtech.com<mailto:david.lan...@lairdtech.com>> wrote: Hi All, I have an MDT server where I want to set up SEP in application Deployment. Below is the scripts I have tried: From Daniel: @echo off IF "%ProgramFiles(x86)%"=="C:\Program Files (x86)" goto x64 else goto x86 :x86 ECHO System is x86 msiexec /i “%~dp0SSEP_12.1.4013.4013_32bit\Sep.msi" /qn /L*V log.txt SYMREBOOT=Suppress goto exit :x64 ECHO System is x64 msiexec /i “%~dp0SSEP_12.1.4013.4013_64bit\Sep64.msi" /qn /L*V log.txt SYMREBOOT=Suppress goto exit :exit -------------and ------------ @echo off IF "%ProgramFiles(x86)%"=="C:\Program Files (x86)" goto x64 else goto x86 :x86 ECHO System is x86 msiexec /i SEP_12.1.4013.4013_32bit\Sep.msi /qn /L*V log.txt SYMREBOOT=Suppress goto exit :x64 ECHO System is x64 msiexec /i SEP_12.1.4013.4013_64bit\Sep64.msi /qn /L*V log.txt SYMREBOOT=Suppress goto exit :exit The command lines have varied quite a bit. But I started with: Cmd.exe /c sep_install.bat The source/working directory in MDT on the software package is: .\Applications\Symantec_Endpoint_Protection The best I have been able to do is get the script to start (it opens a DOS window) then identifies the OS, but it dies right there. Sometimes with no error or return code, sometimes with a return code: 1. Any help sure would be appreciated. Thanks in advance Dave Landry Site Support Administrator Laird Technologies 1 Perimeter Road – Suite 700 Manchester, NH 03103 +1 603-935-7857<tel:%2B1%20603-935-7857> [LairdLogo] From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com>] On Behalf Of David Landry Sent: Friday, October 17, 2014 4:38 PM To: mdtosd@lists.myitforum.com<mailto:mdtosd@lists.myitforum.com> Subject: RE: [MDT-OSD] RE: Can't seem to get Symantec Endpoint Protection to install via MDT 2012 Hi Guys, Thanks for the assistance. The DOS window comes up when the script starts but then it dies, windows close, and I get the white MDT completion window with no errors. I am not sure at this point if the problem is in the .bat file or the command line? Thanks again in advance, Dave Landry From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of Keith Garner (Hotmail) Sent: Friday, October 17, 2014 3:31 PM To: mdtosd@lists.myitforum.com<mailto:mdtosd@lists.myitforum.com> Subject: RE: [MDT-OSD] RE: Can't seem to get Symantec Endpoint Protection to install via MDT 2012 Be aware of smart quotes… Additionally, be aware that if you had one bad software package that was installed to c:\program files (x86) on a x86 system it would fail. If you want to get cute… @if not defined debug echo off if /i "%PROCESSOR_ARCHITECTURE%%PROCESSOR_ARCHITEW6432%"=="x86" ( msiexec /i "%~dps0SEP_12.1.4013.4013_32bit\Sep.msi" /qn /L*V log.txt SYMREBOOT=Suppress ) else ( msiexec /i "%~dps0SEP_12.1.4013.4013_64bit\Sep64.msi" /qn /L*V log.txt SYMREBOOT=Suppress ) -k From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of Daniel Ratliff Sent: Friday, October 17, 2014 11:04 AM To: mdtosd@lists.myitforum.com<mailto:mdtosd@lists.myitforum.com> Subject: [MDT-OSD] RE: Can't seem to get Symantec Endpoint Protection to install via MDT 2012 Always use %~dp0 when calling files from a .bat file, especially when running from the network. @echo off IF "%ProgramFiles(x86)%"=="C:\Program Files (x86)" goto x64 else goto x86 :x86 ECHO System is x86 msiexec /i “%~dp0SEP_12.1.4013.4013_32bit\Sep.msi” /qn /L*V log.txt SYMREBOOT=Suppress goto exit :x64 ECHO System is x64 msiexec /i “%~dp0SEP_12.1.4013.4013_64bit\Sep64.msi” /qn /L*V log.txt SYMREBOOT=Suppress goto exit :exit Daniel Ratliff From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of David Landry Sent: Friday, October 17, 2014 1:55 PM To: mdtosd@lists.myitforum.com<mailto:mdtosd@lists.myitforum.com> Subject: [MDT-OSD] Can't seem to get Symantec Endpoint Protection to install via MDT 2012 Hi All, I have been having a heck of a time trying to get SEP to install. I have imported the installation files for both 32bit and 64bit (in separate folders) along with a .bat file to run them from MDT. The bat file is: @echo off IF "%ProgramFiles(x86)%"=="C:\Program Files (x86)" goto x64 else goto x86 :x86 ECHO System is x86 msiexec /i SEP_12.1.4013.4013_32bit\Sep.msi /qn /L*V log.txt SYMREBOOT=Suppress goto exit :x64 ECHO System is x64 msiexec /i SEP_12.1.4013.4013_64bit\Sep64.msi /qn /L*V log.txt SYMREBOOT=Suppress goto exit :exit I have tried many different command lines which have all resulted in either a white completion window with no errors or a yellow completion window with a return code: 1. The command I have in there right now is: cmd.exe /c \\”servername”\mdt\applications\Symantec_Endpoint_Protection\sep_install.bat<file:///\\”servername”\mdt\applications\Symantec_Endpoint_Protection\sep_install.bat> I have also copied the install folder to the desktop of a test machine and it ran fine. Does anyone have any ideas? Thanks in advance, Dave The information transmitted is intended only for the person or entity to which it is addressed and may contain CONFIDENTIAL material. If you receive this material/information in error, please contact the sender and delete or destroy the material/information. The information transmitted is intended only for the person or entity to which it is addressed and may contain CONFIDENTIAL material. If you receive this material/information in error, please contact the sender and delete or destroy the material/information.