RSS

Using PsExec to execute Serial Port commands

This is a small blog post about the basics of PsExec. Psexec is a strong utility that allows one to execute commands on a remote computer with out having to RDC. This is great utility for installing updates on computers without having to physically access the computer.

Notes and Resources

Notes

Prep work

  1. Create a folder at “C:\workingtemp\Psexec” and “C:\workingtemp\Psexec Commands”.
  2. Unzip the “PsTools.zip” file to the Psexec directory.
  3. Copy the “PsExec.exe” into your “C:\Windows” folder.

Configure your target computer

  1. My target computer is called “videoComp”.
  2. Note: this is the computer we are sending commands to.
  3. Navigate to “\\videoComp\c$”and make a folder there called “video”
  4. Place all the files from “C:\workingtemp\projector” into this folder.
    NOTE: If you did not read the last post <NAME AND LINK> , put your serial port commands for your projector in “\\videoComp\C$\video”.

Make your PsExec Commands

Note: Depending on if you are a super user on your network your psexec commands will vary. Make copy and paste the appropriate commands in to a text file, we will be using these shortly.

  • If you have Administrative privileges on your network use the following commands.
  • This command will be responsible for powering on the projector, by executing the “power_on.bat” we made earlier.
    psexec -i -s \\videoComp C:\video\power_on.bat
  • This command will be responsible for powering off the projector, by executing the “power_off.bat” we made earlier.
    psexec -i -s \\videoComp C:\video\power_off.bat
  • This command will be responsible for the switching input to input 1 on the projector, by executing the “Switch_To_Input_2.bat” we made earlier.
    psexec -i \\videoComp C:\video\Switch_To_Input_1.bat
  • This command will be responsible for the switching input to input 2 on the projector, by executing the “Switch_To_Input_2.bat” we made earlier.
    psexec -i \\videoComp C:\video\Switch_To_Input_2.bat
  • If you are not a super user, it will be neccessary to provide a Administrative username and password to the computer. Use the following commands
  • username = <DomainOfVideoComp>\User
  • password = User’s Password
  • Power On Projector
    psexec -i \\videoComp -u username -p password C:\video\power_on.bat
  • Power Off Projector
    psexec -i \\videoComp -u username -p password C:\video\power_off.bat
  • Switch to input 1 on the projector\
    psexec -i \\videoComp -u username -p password C:\video\Switch_Input_To_1.bat
  • Switch to input 2 on the projector\
    psexec -i \\videoComp -u username -p password C:\video\Switch_Input_To_2.bat

Make AutoIt .au3 files 

  1. Make another folder at “C:\workingtemp\Psexec Commands\autoit”, “C:\workingtemp\Psexec Commands\autoit\source” and “C:\workingtemp\Psexec Commands\autoit\compliled”.
  2. Make three files called “Power_On.au3”, “Power_Off.au3” and “Switch_To_Input_2.au3”.
  3. The Format of making these files are easy, it is as follows.
    RunWait ("<Your PsExec command>")
  4. In Power_On.au3, your command will look like this.
    RunWait("psexec -i -s \\videoComp C:\video\power_on.bat")
    or
    RunWait("psexec -i \\videoComp -u username -p password C:\video\power_on.bat")
  5. In Power_Off.au3, your command will look like this.
    RunWait("psexec -i -s \\videoComp C:\video\power_off.bat")
    or
    RunWait("psexec -i \\videoComp -u username -p password C:\video\power_off.bat")
  6. In Switch_To_Input_1.au3, your command will look like this.
    RunWait("psexec -i -s \\videoComp C:\video\Switch_To_Input_1.bat")
    or
    RunWait("psexec -i \\videoComp -u username -p password C:\video\Switch_To_Input_1.bat")
  7. In Switch_To_Input_2.au3, your command will look like this.
    RunWait("psexec -i -s \\videoComp C:\video\Switch_To_Input_2.bat")
    or
    RunWait("psexec -i \\videoComp -u username -p password C:\video\Switch_To_Input_2.bat")
  8. Drop these “.au3” files in “C:\workingtemp\Psexec Commands\autoit\source”

Make executables out of au3 files

  1. In “C:\workingtemp\…\autoit\source” right click on one of the files and select “Compile Script (x64)”.
  2. This will generate a executable of the .au3 file you clicked on. Do this for each file in this folder.
  3. Move these executables to “C:\workingtemp\Psexec Commands\autoit\compiled”
  4. When finished it should look something like this.

Make a batch file that will turn on the projector and switch to input2

  1. In “C:\workingtemp\…\autoit\compiled”
  2. Make a batch file called “Power_On_Projector.bat”.
  3. Place the following code inside this batch file.
    start /wait Power_On.exe
    start /wait Switch_To_Input_2.exe
  4. When this file is added the “C:\…\compiled” directory will look like this.

Testing the commands

  1. In “C:\workingtemp\…\autoit\compiled”, run the command “Power_On_Projector.bat”. Two command prompts should appear, the first is running the Power_On_Projector.bat and the second will run the first command in this batch file. It will look like this.
  2. Once the “power_on.exe” is ran, the “Switch_To_Input_2.exe” command will run. It will look like this.
  3. The projector should turn on and display your desktop screen. If your computer is connected to input two on the projector.
  4. Now test to see that  your Switch_To_Input_1.exe is working.

  5. Now test to see that your Power_Off.exe is working.

 
Leave a comment

Posted by on August 29, 2012 in Uncategorized

 

SCCM Task Sequence – Disable Autologon

Recently I was working on a project that creates lab images using SCCM task sequences. I encountered a problem, the image after being completely set up would autologin to the local administrator at reboot. This was a security risk. I found a fix by running a script at the end of the deployment in which will change the registry settings to disable auto login. Note: this guide assumes that you have the SCCM administrator console installed.

Find and add a script to the proper source directory

  1. Open the SCCM Configuration Manager Console and navigate to your site packages.
  2. Right click on your Task Sequence Scripts and click on “Properties”.
  3. A menu will pop up, navigate to the “Data Source” Tab, the “Source Directory” is where you will want to put your script you will be writing.
  4. Navigate and keep this source directory open.

Make the disable autologin script

  1. Open notepad and put the following into it and name it something like “autologin_disable.reg”.
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
    "AutoAdminLogon"="0"
    "DefaultUserName"=-
    "DefaultPassword"=-
    "DefaultDomain"="Chemistry"
  2. It will look something like this.
  3. Add this script to the source directory that we found earlier.

Add the script to your task sequence

  1. Locate your task sequence in the SCCM console, right click on it and choose “Edit”.
  2. A menu will pop up, on the left scroll down to the bottom and click the last task in the sequence. Click the “Add” button at he top and choose “General” -> “Run Command Line”.
  3. A menu will pop up, give the rule a name, Something like “Disable Auto Login”.
  4. Check the box next to “Package” and hit the browse button. Choose the “Task Sequence script” that you placed your script in earlier. Hit “ok”.
  5. In the “Command Line” section, input the following command:
    REG IMPORT <yourScriptName>.reg
  6. Before you hit “Apply” your new rule should look something like this.
  7. You should be done.

Please feel free to leave a comment or a question!

 
Leave a comment

Posted by on August 8, 2012 in Uncategorized

 

[Simple] How to enable “God Mode” on windows 7

Essiencially “God Mode” is a folder with special attributes. This folder when created will give you a detailed list of the computer settings. Really this folder is the control panel with more options.

God Mode

  1. Create a new folder on your desktop.
  2. Copy and paste the following code into the folder name.
    GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
  3. Click the desktop after the God mode code is pasted into your target folder. Notice that the icon for the folder will change.
  4. Open the folder and you will see the detailed list of system options/controls.
 
1 Comment

Posted by on August 8, 2012 in Uncategorized

 

Print Manager Plus WebAdvantage Setup

This is a blog post on setting up WebAdvantage suite. The WebAdvantage add-on allows a company to host a website to view/edit print jobs on multiple Print Manager Plus servers. This website can be used by anyone who has a username and password to WebAdvantage. Typically, editing print jobs would require logging into the PMP server, which wastes time. This is a relevantly easy install/setup.

Notes and Prerequisites

  • Note: WebAdvantage is an add-on for your current Print Manager Plus Servers. It is necessary to have Print Manger Plus installed before moving on.
  • WebAdvantage Suite users manual.
  • Download the WebAdvantage Suite Evaluation.
  • I will be installing WebAdvatage on a Windows Server 2008 R2, named “pmp-webadv”.
  • PMP Administrator Console and the PMP SQL Instance are on a Windows Server 2008 R2 server called “pmprint”. Substitute the server name “pmprint” with your PMP SQL server as needed

Make a User for WebAdvantage Connection to pmprint

  1. Make an account on active directory called “pmp-webuser”. We will use this account for IIS communication with the SQL instance.
  2. Open your Print Manager Plus SQL Database.
  3. Expand “Security” and right click on “Logins”. Choose the “New Login…” option.
  4. A menu called “Login” will appear. In the box next to “Login name:” input the name, with your domain first.
    <yourDomain>\pmp-webuser
  5. Under “Select a page”, choose “Server Roles”. Under “Server roles” only “public” should be checked.
  6. Click the “User Mapping” page. Under “Users mapped to this login” check the box next to the “PrintManager” Database. Then under “Database role membership for: Printmanager”, check “db_datareader”, “db_datawriter”, and “public”.
  7. Leave the “Securables” page to default.
  8. Under the “Status” page, ensure “Grant” is chosen under “Permission to connect to database engine”.  Under “Login” ensure that “Enabled” is selected.
  9. Hit “Ok” and your user will be added to your Print Manager Plus logins.

Installation

  1. Move the installation file to “C:\workingtemp” on your WebAdvantage server (pmp-webadv).
  2.  Double click the “Install WebAdvantage.exe” and this will start the installation.
  3. If you do not already have “Microsoft ASP .NET 2.0” a menu will pop up stating this is required for the WebAdvantage install. Click “Install”.
  4. After the installation of .NET 2.0, the main installation welcome screen will appear. Hit the “Next” button.
  5. Accept the terms and license agreements. Hit “Next”.
  6. The next menu will deal with setting up IIS. I left the settings for this menu to default. Hit the “Next” button.
  7.  The next menu will ask to specify the SQL Server that hosts your Print Manager Plus database. In the box next to “Database Server” enter the name of this server or browse for it. I entered “pmprint” like below. Hit the next button once the name is entered.
  8. The next menu called “Authentication Information”, will ask to specify an account that will be used by WebAdvantage to talk to pmprint. Enter the information for the “pmp-webuser” that we made earlier.
  9.  The next menu will ask for a destination folder to install WebAdvantage. Hit “Next” and the installation should begin.
  10. The installation will finish, uncheck the “Open WebAdvantage” box and hit the “Finished” button.

Configuring WebAdvantage

  1. Double click the “WebAdvantage Suite” icon on your desktop. A web browser will pop up.
  2. The page will state “No WebAdvantage Key Found”, this is ok, hit continue.
  3. The next page will ask to “Create a Master User Password”. Enter the password you would like to use for your “Master” account and hit “Next”.
  4. The next page will ask to “Select the Available Features” for WebAdvantage. For my WebAdvantage server, I unchecked everything besides “Job History Feature”. Click “Next”.
  5. This next page will finalize the installation. Click “Finished” when ready.
  6. This login screen for your WebAdvantage Suite will appear, enter your “Master” username and password.
  7. Once you are logged in your home screen for WebAdvantage will look like this (based on the features you chose earlier).
  8. At this point WebAdvantage is set up and ready to test.

Testing WebAdvantage

  1. Choose an image and name it “My Test Print”.
  2. Choose a printer to print to. Mine will be called “NW2105 – HP LaserJet P4015dn”,
  3. Login to pmprint and open Print Manager Plus Administrator Console. Navigate to the “Printers” tab. Ensure the printer you want to print to is not grayed out.
  4. On your local machine connect to this printer and do a test print.
    Note: This image is called “My Test Print.jpg”
  5. Go back to your pmprint server. Navigate to the “Reports” tab.
  6. Click the “Printer Reports” option, then choose “Detailed History by Printer”
  7. The report viewer options menu will appear. Under “Select Printers: Available Values:” choose the printer your did a test print on and hit the “>” button.
  8. For “Start of Range”, under “Enter the Date Range you wish to Report On”, click the calender icon and select todays date. For “End of Range”, check the box next to “No upper value”. Hit the “Ok” button.
  9. A menu called “Reports Viewer” will pop up. Under “Detailed History for \\PMPRINT\NW2105 – HP LaserJet P4015dn”, the first recorded instance was my test print. For security reasons I omitted usernames, but next to “Document”, “My Test Print.jpg” is shown.
  10. Now navigate to your “pmp-webadv” server and open “WebAdvantage Suite”. Navigate to “History”.
  11. The “History” menu will appear. Under “Printer:” choose “NW2105 – HP LaserJet P4015dn”. Under “To:” put in the next day from today. Click the “Show Jobs” refresh button.
  12. Under “Job Name” you will see “My Test Print.jpg”. This shows that the print job we sent was successfully recorded.

Securing the WebAdvantage Site

Create a Self Signed Certificate

  • By default WebAdvantage listens to port 48111. This is “http” and is not secure.
  • The default port for “http” requests is port 80. This is not secure.
  •  The default port for “https” requests is port 443. This is secure.
  • General outline
    • Create a self-signed certificate and bind the WebAdvantage site to port 443.
    • Redirect all incoming “http” requests to the “https” site.
  • Note: If there is a PKI set up at your company, contact the PKI administrator for a web server certificate. Otherwise, we can create a self-signed certificate (instructions below).
  1. On your WebAdvantage server (pmp-webadv), open the IIS Manager. Select your “PMP-WEBADV” site and choose “Server Certificates”.
  2. In the “Server Certificates” settings choose “Create Self-Signed Certificate…”.
  3. A menu will pop up that will ask you to “Specify a Friendly Name” for the certificate. I entered “SSL Cert for PMP websites” and hit “Ok”.

Edit Bindings

  1. Expand the “Sites” folder. Click on the “Default Web Site” and click “Bindings…”. A menu called “Site Bindings” will pop up.
  2. Ensure that there is an “http” binding in the “Site Bindings” menu.
  3. For the “PMP” site, choose “Bindings” as we did before.
  4. Hit the “Add…” button. For “Type:” choose “https”, for “Port:” enter “443” and for “SSL certificate” choose our “SSL Cert for PMP websites”. Hit “Ok” on both menus when done.

Set up Anonymous Authentication

  1. Note: Ensure that windows and integrated authentication is disabled, as our site will not load if logged in as a domain user and using IE.
  2. Expand the “Sites” folder.
  3. Click on “Default Web Site” and Click “Authentication”. Make sure “Anonymous Authentication” is the only one enabled.
  4. Right click “Anonymous Authentication” and hit “edit”. This will bring up a menu that will enable you to edit the anonymous authentication credentials.
  5. Click the “Set…” button, enter in your “pmp-webuser” credentials. Click “Ok” on both menus when finished entering user credentials.
  6. For the “PMP” website set the anonymous authentication credentials the same as above.
  7. Expand “PMP” and for “WebAdvantage” website set the anonymous authentication credentials the same as above.

Set up HTTP redirect

  1. Click on your “Default Web Site” and click “HTTP Redirect”.
  2.  In “HTTP Redirect” check the box next to “Redirect requests to this destination”. In the empty box below this, enter the following information.
    https://pmp-webadv.<yourDomain>/WebAdvantage
  3. Under “Redirect Behavior” check both available boxes. For “Status code:” use “Found (302)”. Click “Apply” when finished.
  4. Click on your “PMP” site and open “HTTP Redirect”. Check the box next to “Redirect requests to this destination” and in the box beneath put in the following instruction.
    /WebAdvantage
  5. Under “Redirect Behavior”, check the box to the left of “Only redirect requests to content in this directory (not subdirectories)”. Hit “Apply” when done.


 
1 Comment

Posted by on August 8, 2012 in Uncategorized

 

How to extract Sony exe drivers

This is a small post on extracting Sony .EXE drivers. I found that the typical extractors such as 7zip and Winrar fail at extracting Sony EXE drivers.

Prerequisites

Prep the Driver for Extraction

  1. Create and save the driver to “C:\workingtemp\Sony Audio Driver”
  2. Create another folder called “Extracted Driver” in this location.

Extract the Driver

  1. Right click on your “Universal Installer” applicaiton and “Run as Administrator”.
  2. A menu called Universal Extractor v1.61 will appear. Hit the “…” button to the right of the “Archive/Installer to extract:” box. Find and select your driver and hit the “Open” button.
  3. Next click the “…” button next to the “Destination directory” box. Select the “Extracted Driver” folder and hit “Ok” button.
  4. When all the settings are correct, hit the “Ok” button to start the extraction of the Sony Driver.
  5. A menu titled “Wis Installer Extraction” will appear. Choose “Wise Installer /x switch” and hit “Ok”.
  6. A warning bar will appear, hit “OK”.
  7. The Sony Driver should now be extracted to your “Extracted Driver” folder.
  8. You should be done!
 
Leave a comment

Posted by on August 8, 2012 in Uncategorized

 

Updating WebAdvantage Suite

Prerequisites 

  1. You should already have a WebAdvantage server running and working before doing an upgrade. Check this <post> if you need help doing this.
  2. Get the installation files from the Print Manager website. The version I downloaded was 3.1.2.
  3. My WebAdvantage server is called “pmp-webadv”.

Updating WebAdvantage

  1. Unzip the file you received from Print Manager to “C:\workingtemp” on your WebAdvantage server.
  2. Double Click on your “Install WebAdvantage.exe” and the WebAdvantage installer will open. The installer will display “Updating WebAdvantage Suite” and click “Next”.
  3.  The installation will immediatly begin and when finished will display a “Update Complete” screen.

Testing

  1. Open IIS Manager and Browse to your WebAdvantage website.
  2. Your WebAdvantage login screen will appear.
  3. If your logon screen did not appear, please check the troubleshooting section.

Troubleshooting

  1. If you get an error screen (below) when trying to log into your WebAdvantage site then there is a simple fix.
    The error on this page will be:
    Server Error in “/WebAdvantage” Application.
    Access to the path “C:\inetput\wwwroot\PMP\sessionlogs” is denied.
  2. With the most recent release of WebAdvantage, Print Manager enables logging. Create a folder at “C:\inetpub\wwwroot\PMP” called “sessionlogs”.
  3. Browse to your WebAdvantage site and it should be working.
 
Leave a comment

Posted by on July 2, 2012 in Uncategorized

 

Serial Port Commands for an LCD Projector

This is a short blog about using a computer to control a projector via sending serial port commands. The computer and the projector are connected via a serial cable (RS-232C cable). The commands and syntax will vary with each projector.

Notes

Set the serial port settings for the computer

  • Signal Format: Conforms to RS-232C standard. (look this up)
  • Baud rate: 9,600 bps
  • Data Length: 8 bits
  • Parity bit: NON
  • Stop bit: 1 bit
  • Flow control: None

Command Syntax

I want the projector to do four functions; turn on, turn off, switch-input-to-1 and switch-input-to-2. Depending on the projector you must format your commands based on the syntax specified in the projectors manual.

  • The syntax for my projector is very simple.
  • The commands are 8 characters long, the first 4 specifies the command, and the last 4 specifies the parameter.
  • A good example of this is the mute command.
  • Turn mute on.
    MUTE   1
  •  Turn mute off.
    MUTE   0
  • Note: there are 3 spaces between the mute command and its parameter.

Creating Commands

  1. Make and Navigate to the “C:\video” folder.
  2. Create four text files called “power_on.txt”, “power_off.txt”, “input1_on.txt” and “input2_on.txt”.
  3. Place the following code in power_on.txt.
    POWR   1
  4. Place the following code in power_off.txt.
    POWR   0
  5. Place the following code in input1_on.txt.
    IRGB   1
  6. Place the following code in input2_on.txt.
    IRGB   2

Creating Command Batch files

  1. In your “C:\video” folder, make four batch files called “power_on.bat”, “power_off.bat”, “Switch_To_Input_1..bat” and “Switch_To_Input_2.bat”.
  2. Place the following code in power_on.bat
    mode com1: BAUD=9600 PARITY=n DATA=8 STOP=1 xon=off odsr=off octs=off dtr=off rts=off idsr=off
    copy c:\video\power_on.txt COM1:
  3. Place the following code in power_off.bat
    mode com1: BAUD=9600 PARITY=n DATA=8 STOP=1 xon=off odsr=off octs=off dtr=off rts=off idsr=off
    copy c:\video\power_off.txt COM1:
  4. Place the following code in Switch_To_Input_1..bat
    mode com1: BAUD=9600 PARITY=n DATA=8 STOP=1 xon=off odsr=off octs=off dtr=off rts=off idsr=off
    copy c:\video\input1_on.txt COM1:
  5. Place the following code in Switch_To_Input_2..bat
    mode com1: BAUD=9600 PARITY=n DATA=8 STOP=1 xon=off odsr=off octs=off dtr=off rts=off idsr=off
    copy c:\video\input2_on.txt COM1:
  6. Your “C:\video” folder should look like this.

Test the Serial Port Commands

  1. Double click the “power_on.bat”. A command prompt will pop up that will look like this and the projector will turn on.


  2. Double click the “Switch_To_Input_2.bat”. A command prompt will pop up that will look like this and the projector will switch its input to 2.

  3. Double click the “Switch_To_Input_1.bat”. A command prompt will pop up that will look like this and the projector will switch its input to 1.

  4. Double click the “power_off.bat”. A command prompt will pop up that will look like this and the projector will turn off.

 
1 Comment

Posted by on May 4, 2012 in Serial Port Commands

 

Tags: , ,

SCCM – Using Powershell in a Task Sequence

Using System Center Configuration Manager (SCCM),  I was trying to deploy a task sequence for lab computer imaging. I was trying to use a batch file to run a Powershell script that makes shortcuts in a specified folder, but the command prompt kept throwing an error. This error happend everytime the command prompt tried to execute the Powershell script.

Source Code

  •  Here is my source code (batch file contents).
    REM Installing  Mathematica 8
    Mathematica_8.0.4_WIN.exe /silent /suppressmsgboxes
    REM Run Shortcut Script
    powershell .\Make-Shortcuts_Mathematica8.ps1

Problem

  • When I tried to run the command:
    powershell .\Make-Shortcuts_Mathematica8.ps1
  • I get an error that states:
    File C:\workingtemp\mathematica8\Make-Shortcuts_Mathematica8.ps1 cannot be loaded. The file C:\workingtemp\mathematica8\Make-Shortcuts_Mathematica8.ps1 is not digitally signed. The script will not execute on the system. Please see “get-help about_signing” for more details..
    At line:1 char:34
    + .\Make-Shortcuts_Mathematica8.ps1 <<<<
    + CategoryInfo          : NotSpecified: (:) [], PSSecurityException
    + FullyQualifiedErrorId : RuntimeExecption 
  • The error looks like this:

Solution

  • Here is the solution, this command will work for any powershell script.
    powershell  -noprofile -command "& {$variable = Get-ExecutionPolicy:If((Get-ExecutionPolicy) -ne 'Unrestricted'){Set-ExecutionPolicy unrestricted -force;}; .\<YOURSCRIPTHERE>; Set-ExecutionPolicy $variable}"
  • This command will check if the “Execution Policy” is set to unrestricted. If not it will set it to unrestricted, then run the target powershell script. Finally, the command will set the Execution Policy back to the previous value.

Please leave a comment for any questions/problems!

 
4 Comments

Posted by on March 20, 2012 in Uncategorized

 

Tags: , , , ,

Installers and Silent Switches

This post will cover the different types of installers I’ve encountered when making automated installations in SCCM.

Installer Types

The types of installers I’ve encountered.

  1. MSI Installers
    • For setup files that use Windows Installer or Microsoft installer, use the following command-line syntax.
    • msiexec /i file.msi /qb
  2. InstallShield variant 1
    • To silently install using installshield, it is necessary to have a “answer file”. A file named “setup.iss” is configured during the record phase. All changes/additions during this manual installation phase will be recorded in the “setup.iss” file.
    • Use the command below.
      setup.exe /r
    • After running through the installation, a file called “setup.iss” will be made in your “C:\Windows” directory. Place this file in the same directory as your setup.exe.
    • Uninstall the program you just installed. This will ensure a clean install.
    • Remove “/r” and replace with “/s”, like so.
      setup.exe /s
  3. InstallShield Variant 2
    • In some versions of InstallShield different switches are used. Its always worth trying one of these commands:
      setup.exe /s
      setup.exe /silent
      setup.exe /quiet
  4. Copy the installation directory.
    • Some programs are portable enough that you can install them manually, zip the installation directory and move it to another machine
    • Use the command xcopy to copy the installation files.
    • XCOPY syntax:
      • XCOPY source [destination] [options]
      • Examples:
        xcopy putty.exe %systemroot%
        xcopy "\*.*' %systemroot%
Please leave a comment for any questions/problems!
 
2 Comments

Posted by on March 20, 2012 in Uncategorized

 

Tags: , , , , , ,

SCCM – Creating a Package

This post assumes that for the target package you have created a silent install batch file. The example application for this package is called “Putty”. If this doesn’t sound familiar, see my previous post named “SCCM Package – Putty“.

Create SCCM Package source directory

  1. First add a folder to your packages source directory. The packages source directory should be something like \\<ServerName>\<SourceDirectory>$\<Packages>\<Application>. Make the folder name the same as your application name, in my case I named the folder “Putty”.
  2. Copy your installer files and silent batch script into this new folder.

Creating the Package

  1. Open up the “ConfigMgr Console”.
  2. Expand “Site Database” on the left, then expand “Computer Management”.  Navigate to the “Software Distribution” Section. Expand this section and right click on “Packages” -> “New” -> “Package”.
  3. The “New Package Wizard” will appear. On the “General” scrren, enter a name for your package. The remainder of this page is optional.
  4. On the next screen called “Data Source”, check “This package contains source files” box. Under this option there will be another called “Source directory”, click the “Set” button to the right of the textbox. This should pop up a dialog that allows you to enter your network folder you made earlier. When finished, click “Ok” and “Next”.
  5. On the “Data Access” screen, leave everything to the defaults.
  6. On the “Distribution Settings” screen, click “Next”.
  7. On the “Reporting” screen, click “Next”.
  8. On the “Security” screen, click “Next”.
  9. On the “Summary” screen, click “Next.
  10. On the next screen called “Wizard Complete”, click “Close”.

Create the Program

  1. Navigate to your package and expand it.
  2. Right click on “Program” -> “New” -> “Program”.
  3. A screen called “New Program Wizard” will appear. Name the program “Install”. For “Command line”, enter the name of your silent install batch file. Under “Category” choose “Applications”.
  4. On the “Requirements” screen, set the estimated disk space the program will use and click “Next”.
  5. On the “Environment” screen, under “Program can run:”, select  “Whether or not a user is logged in” from the drop down menu.
  6. On the “Advanced” screen, check the box beside “Advertise this program to be installed from the Install Software task sequence without being advertised”.
  7. On the “Windows Installer” screen, I left everything to default. 
  8. On the “MOM Maintenance Mode” screen, check both boxes.
  9. On the “Summary” screen, shown is everything to be installed, hit “Next”.
  10. The program will install and finish, hit “Close”.

Manage Distribution Points

  1. In “ConfigMgr Console” find your package.
  2. Right click on the “Putty” package and choose “Manage Distribution Points”.
  3.  A screen called “Manage Distribution Points Wizard” will appear, click the “Next” button.
    \
  4. On the “Select Destination Distribution” screen, select “Copy the package to new distribution points”.
  5. On the “Package” screen. Under the “Distribution Points” section, choose “SCCM” and hit next. Do not distribute to your PXE point.
  6. Hit “Next” untill it finishes and you will be done updating the distribution points.
  7. Hit “Close” and You should be done.

Please leave a comment if you have any questions/problems!

 
1 Comment

Posted by on March 20, 2012 in Uncategorized

 

Tags: