I have worked on this for 2 days. I am creating a LOCAL admin user so that they can run our upgrade process. I created the msi in Wise however it does not uninstall (gives error 1101). I wanted to use the company standard which is installshield.
All that the package does is copy down a vbs file and then executes it, since it is a Deferred execution and the policies are set to always run msi in elevated privileges it should work as it does in Wise. The vbscript:
'Determing computer name
Set objNet=CreateObject("wscript.Network")
strComputer=objNet.ComputerName
'Defining "password never expires" constant
Const ADS_UF_DONT_EXPIRE_PASSWD = &h10000
'creating user
Set colAccounts = GetObject("WinNT://" & strComputer & ",computer")
Set objUser = colAccounts.Create("user","tempaccount")
objUser.SetPassword "password12"
objUser.SetInfo
Set objUser = Nothing
'putting "password never expires" flag
Set objUser = GetObject("WinNT://" & strComputer & "/tempaccount,user")
objUserFlags = objUser.Get("UserFlags")
objPasswordExpirationFlag = objUserFlags OR ADS_UF_DONT_EXPIRE_PASSWD
objUser.Put "userFlags", objPasswordExpirationFlag
objUser.SetInfo
Set objUser = Nothing
'Adding user tempaccount to administartors group
Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators,group")
Set objUser = GetObject("WinNT://" & strComputer & "/tempaccount,user")
objGroup.Add(objUser.ADsPath)
Any replys greatly appreaciated!!
Al..