TechnicallyChris.com

Technical and Personal Ramblings of a Bostonian
  • Home
  • About Chris
  • Donate
  • Contact Chris
Home > McAfee EE / SafeBoot > ForceSync with McAfee EE / SafeBoot with AutoIt Functions

ForceSync with McAfee EE / SafeBoot with AutoIt Functions

March 13th, 2009
Goto comments Leave a comment

As promised, here is a sample of code that causes a client to ForceSync using the AutoIt functions I wrote in this previous post.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#Include <_McAfeeEndpointEncryption.au3>
 
; Silent RUN Errors
AutoItSetOption("RunErrorsFatal", 0) 
 
; Register COM
$regCom = _EEPCRegisterCOM()
if @error Then
	consolewrite("Error at line " & @ScriptLineNumber & " - " & @error)
	exit(11)
EndIf
 
; Connect to Database
$eeConnect = _EEPCConnect("installer", "mypassword", false)
if @error Then
	consolewrite("Error at line " & @ScriptLineNumber & " - " & @error)
	exit(11)
EndIf
 
$ret = _EEPCExecute($eeConnect, "ForceSync")
 
if @error Then
	consolewrite("Error at line " & @ScriptLineNumber & " - " & @error)
	exit(11)
EndIf
 
$ret = _EEPCDisconnect($eeConnect)
if @error Then
	consolewrite("Error at line " & @ScriptLineNumber & " - " & @error)
	exit(11)
EndIf

After including the UDF in Line #1, we register the COM on Line #7, then connect to the database in Line #14. The $eeConnect variable now holds the connection reference so that we can issue one or more commands to the database.

On line #20 we issue ForceSync, and if you’re watching your client status window, you should see the sync startup Note that this may not work if you’ve disabled the ability to manually sync in your policy.

If you enjoyed this article or it helped you in any way, I’d appreciate it if you’d post a comment below to let me know. All code examples are for demonstration only and should be used at your own risk. I cannot accept liability for unexpected results.

Chris McAfee EE / SafeBoot McAfee Endpoint Encryption, SafeBoot

Comments (2) Trackbacks (0) Leave a comment Trackback
  1. zn
    August 24th, 2009 at 17:47 | #1
    Reply | Quote

    thanks for your udf, can you post an example with a more detailed command like creating a user then assiging it to a device

  2. Chris
    August 25th, 2009 at 11:44 | #2
    Reply | Quote

    @zn
    Hi ZN,

    Here’s a pretty bare bones sample, you’ll probably want to add some error checking and logging later. Basically we just use CREATEUSER to create the new user, and SETUSER to assign that account to a computer.

    If your users are being created by an AD or LDAP synch, you should use that instead so that your users created by those connections stay in sync with their original objects and you don’t need to maintain two user databases.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    
    ; ------ Code Start -----
    #Include <_McAfeeEndpointEncryption.au3>
     
    ; Connect to Database
    $eeConnect = _EEPCConnect("username", "password", "false")
     
    ; Create User (Default Password, Default Group)
    dim $params[1][2]
    $params[0][0] = "User"
    $params[0][1] = "JoeUser"
    _EEPCExecute($eeConnect, "CreateUser", $params, "")
     
    ; Assign User to Machine
    ; Machine must already exist in database
    ; Machine name can be left blank to use the current machine
    dim $params[2][2]
    $params[0][0] = "Machine"
    $params[0][1] = "PC-00000123"
    $params[1][0] = "User"
    $params[1][1] = "JoeUser"
    _EEPCExecute($eeConnect, "SetUser", $params, "")
     
    ; ----- End of Code -----
  1. No trackbacks yet.
Subscribe to comments feed
The cfQuickDocs Plugin Updated (For Real This Time…) Ignoring Netware Tree or Server Error with SafeBoot
RSS feed
  • Google
  • Youdao
  • Xian Guo
  • Zhua Xia
  • My Yahoo!
  • newsgator
  • Bloglines
  • iNezha

Sponsored By

RoboForm: Learn more...Read my review of RoboForm here.

Recent Posts

  • Just Bought the Google Nexus One
  • Seven Things I’ve Liked About Windows 7 in Seven Day
  • What’s Happened to Customer Service (Part 2)?
  • What’s Happened to Customer Service (Part 1)?
  • Capturing S.M.A.R.T. Hard Disk Data from WMI with AutoIt
  • Adjusting DCOM Settings via Script
  • How to Manually Call the Google Cache
  • RoboForm & RoboForm2Go Product Review
  • Updated PingCell Function for Excel
  • Creating Hyperlinks in Word and Excel Longer than 256 Characters

Categories

  • ColdFusion
  • Firefox
  • Google Nexus One
  • IIS
  • McAfee EE / SafeBoot
  • Microsoft Windows
  • Oracle
  • Random Code
  • Random Technology
  • Sports and Recreation
  • Subversion
  • The Untechnological

Archives

  • January 2010
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • October 2007
  • September 2007
  • August 2007
  • January 2007
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006

Meta

  • Register
  • Log in
PageRank
Top WordPress
Copyright © 2006-2010 TechnicallyChris.com
Theme by mg12. Valid XHTML 1.1 and CSS 3.