KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Desktop Autority & Kix

 
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic
View previous topic :: View next topic  
Author Message
mojo1979_2003
KiXforms Novice
KiXforms Novice


Joined: 26 Jun 2008
Posts: 1

PostPosted: Thu Jun 26, 2008 2:30 pm    Post subject: Desktop Autority & Kix Reply with quote

Hi,

I am using Desktop Authority to create a post-engine script that will make some registry changes to MS Office so that the correct username and initials are present within the personalised settings in Word, Excel etc. I have tested this as a .vbs script and it works perfectly. However once this script is used with Desktop Authority, and hence it is converted to a .kix file then I get the follwoing error message:

Error: IDispatch pointers not allowed in expressions!
Script: \\domaincontroller\netlogon\officeresetid.kix
Line: 9

The contents of the .kix file is below:

; ScriptLogic Custom Script File
; File Name: officeidreset.kix
; Description: officeidreset.kix
;
;----------------------------------------------------------

Set objSysInfo = CreateObject("ADSystemInfo")

strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)

Set objWord = CreateObject("Word.Application")
objWord.UserName = objUser.givenName & " " & objUser.SN
objWord.UserInitials = Left(objUser.givenName, 1) & Left(objUser.SN, 1)
objWord.quit
;----------------------------------------------------------
RETURN ; Must be last line of file. Do not remove this line

Any ideas how I can get this to work?

Cheers

Steven
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Thu Jun 26, 2008 6:16 pm    Post subject: Reply with quote

Not sure that Desktop Authority will automatically convert the VBS script for you, having said that, here's a quick conversion (un-tested), see if this works any better:

Code:

$objSysInfo = CreateObject("ADSystemInfo")

$strUser = $objSysInfo.UserName
$objUser = GetObject("LDAP://" + $strUser)

$objWord = CreateObject("Word.Application")
$objWord.UserName = $objUser.givenName + " " + $objUser.SN
$objWord.UserInitials = Left($objUser.givenName, 1) + Left($objUser.SN, 1)
$objWord.quit

Exit 0
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group