Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Adobe Acrobat

  • Print
  • + Share This
Like this article? We recommend

The methodology covered in this article is a small sample of my Scripting Framework. Using similar methodology, you can take care of adding printers, icons, applications, registry keys, outlook settings, regional and office specific settings, and much more.

As you can see, KiXtart is a powerful utility for logon scripts and network automation.

Functions File MyFunctions.kix

;===============================================================
Function GroupArray()
;===============================================================
Dim $i
Dim $strGrpLst
Dim $gName
$i = 0
$strGrpLst = ""
Do
 $gName = EnumGroup($i)
 $i = $i + 1
 If Len($gName) > 0
  If Len($strGrpLst) > 0
   $strGrpLst = $strGrpLst + ","
  EndIf
  $strGrpLst = $strGrpLst + $gName
 EndIf
Until Len($gName) = 0
$ary = Split($strGrpLst,",",-1)
;? "Before return array size is:" + Ubound($ary)
$GroupArray = $ary
EndFunction
;===============================================================

;===============================================================
Function GroupMap($inFile,$inSec)
;===============================================================
Dim $tmpDrv
$Sec = ReadProfileString($inFile,$inSec,"") 
$aMaps = Split($Sec,Chr(10),-1)
For Each $a In $aMaps
 $tmpDrv = ReadProfileString($inFile,$inSec,$a)
 $aParms = Split($tmpDrv,",")                     
  $act = Ubound($aParms)
  Use $aParms[0] + ":" $aParms[1]
Next
$GroupMap = 1
EndFunction
;===============================================================

DriveMap.kix file

;===============================================================
Call "MyFunctions.kix"
$aryGroups = GroupArray()
$strIniFile = "c:\kixwork\DriveMappings.ini"
For Each $ae in $aryGroups
  GroupMap($strIniFile,$ae)
Next
;===============================================================

DriveMapping.ini file

;===============================================================

;====================================
; TestGroup 1
;=Start==============================
[Domain Users]
MapDrive1=v,\\servername\sharename
MapDrive2=g,\\servername\sharename
;=End================================

;====================================
; Test Group 2
;=Start==============================
[AGroup]
MapDrive1=h,\\servername\sharename


;====================================
; Test Group 3
;====================================
[BGroup]
MapDrive1=K,\\servername\sharename
;=End================================
;===============================================================
  • + Share This
  • 🔖 Save To Your Account