hello all-

I need your help with this script I am trying to write . I have this file located in the windows dir on a couple workstations I just need to modify one line in that file. I figure a script should be able to modify right here is the file. then do a push using kace

 

  

[Globals] 

Bank=812 

Branch=001 

ExePath=\\Enet-03\Teller Train\ExePath 

ShrPath=\\Enet-03\Teller Train\ShrPath 

alphaFldUpperCase=YES 

hostName=192.168.5.151 

portNumber=27201 

DisplayPrintInDemo=NO 

DeviceTable=SPECTRUM 

AutoDownLoad=NO 

  

[Teller] 

autoInquiry=Yes 

CTRAdviseMsg=yes 

ctrLimit1=3000.01 

ctrLimit2=10000.01 

CheckBatching=YES 

ChecksPerfSkipLines=3 

CUNameOnCheck=NO 

InquiryFontName=Lucida Console 

InquiryFontSize=8 

HoldCodeOption=OPTIONAL 

NoDecimal=YES 

AutoCashCount=YES 

AutoCashOutCount=YES 

AutoBillMix=1,2,3,2,2,0,1 

AvailableCoin=N,N,Y,Y,Y,Y 

AutoChkCalc=YES 

TroyLJPrinter=NO 

RepeatTranEnabled=NO 

ForcePostForward=YES 

CashCountTotalReq=NO 

CashCountFocus=100 

  

[ApplicationSetup] 

GUISpectrum= 

AccountHolderProfileSupport=NO 

LenderAdvantageSupport=NO 

LenderAdvantagePathName= 

BranchSuiteSupport=NO 

WebServicesURL=http://YourHost/ASTellerUI/services/VB6Service?wsdl 

ReturnToBRanch=NO 

IMMChkScan=NO 

Next=NO 

  

[ImageManSystem] 

DocManSupport=NO 

ArcHostName=YourHost 

ArcPortNumber=5671 

Autoarchive=NO 

AutoSigCapture=NO 

SigTransfers=NO 

SigCashOut=NO 

SigCheckWD=NO 

SigChkCashing=NO 

SigWithdrawal=NO 

SigFTCodes= 

SigWindow=YES 

DocManSignatureCaptureURL=http://YourHost/TrueImageTellerUI/Signature/SigCapture.jsp 

DocManPathName=http://YourHost/shared 

IDViewerSupport=NO 

IDViewerPathName=http://YourHost/ASTellerUI/memberid 

  

[CashDispenser] 

CoinDispenser=NO 

CashOutDisplay=NO 

  

[Security] 

HostUpRetry=5 

JournalRetentionDays=15 this is the line I need to modify 

PasswordAttempts=3 

UpdateHosts=none 

  

[NarrowReceipts] 

CFReceipts=NO 

CFPrinter= 

CFFontSize=8 

CFFont=Lucida Console 

  

[LocalPrinter] 

LocalPrint=NO 

LPPrinter=\\enet-01\Xerox Phaser 4500N-Train 

LPFont=Lucida Console 

LPFontSize=10  

 

 

 

Please let me know!

 

 

 

Thanks

 

 

 

Alex

 

 

Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

1

how can i push a vbs script through kace

Answered 07/18/2012 by: brighstarcuit
Seventh Degree Black Belt

  • http://www.itninja.com/question/kace-k1000-how-do-you-run-a-vbscript-file
  • thanks beat me to that one.
Please log in to comment

Answers

0

this is what i have so far ' This script opens up an ini file and changes
' the JournalRetentionDays= string from 5 to 15.
 
Const ForReading = 1
Const ForWriting = 2
 
fileToChange = "C:\windows\specwin.ini"
 
set fso = CreateObject("Scripting.FileSystemObject")
 
set oFile = fso.OpenTextFile(iniFile, ForReading)
sText = oFile.ReadAll
oFile.Close
 
sNewText = Replace(sText, "JournalRetentionDays=5", "JournalRetentionDays=15")
 
set oFile = fso.OpenTextFile(fileToChange, ForWriting)
oFile.WriteLine sNewText
oFile.close
 

Answered 07/18/2012 by: brighstarcuit
Seventh Degree Black Belt

  • here is a link for vbscript, you look good so far
    http://blogs.technet.com/b/heyscriptingguy/archive/2005/02/08/how-can-i-find-and-replace-text-in-a-text-file.aspx
  • create an application and upload your script, use cscript.exe as the app and list the script as a dependancy
Please log in to comment
0

I believe in power shell

Get-Content C:\windows\specwin.ini | ForEach-Object { $_ -replace "JournalRetentionDays=5", "JournalRetentionDays=15" } | Set-Content C:\windows\specwin.ini

Answered 07/18/2012 by: SMal.tmcc
Red Belt

  • thanks i got it to work now how can i push it using kace
  • powershell.exe -nologo -executionpolicy bypass -WindowStyle hidden -noprofile -file "script.ps1"
    cscript your.vbs if your are using the vb script you created
  • i am gonna use the script i created do i need to upload the script in the distribution or go to the scripting tab this is my first time doing a push in kace using a vbs script
  • create an application and upload your script, use cscript.exe as the app and list the script as a dependancy
Please log in to comment
0

This can be done using VBScript/Wise Script/MSI/PowerShell etc...

If you want to do it using WiseScript, the link is here

http://www.symantec.com/connect/articles/editing-ini-file-using-wisescript

Answered 07/18/2012 by: jagadeish
Red Belt

  • http://www.itninja.com/question/vbscript-to-modify-already-installed-ini-file
  • VBScript!!!!!!!!!!
  • He has a working VB script just needs to know easiest way to push on 1000, he has never done a VBS that way
Please log in to comment
0

I use this script to find and replace. There are many scripts in the forums but many of them do now work. I use this dynamic script which you can modify a little to suit your needs.

http://msiworld.blogspot.com.au/2012/07/vbscript-to-find-and-replace.html

Answered 07/18/2012 by: piyushnasa
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share