Sconfig "invalid index" and IPV6 disabled

I have problem with sconfig.vbs on Windows Server 2012 R2 Core. I have to disable IPV6 on our network. But when using sconfig.vbs to modify network settings, there the exact same issue described here:
http://en.gpunktschmitz.de/847-windows-server-core-sconfig-vbs696-21-swbemobjectex-invalid-index
I did some test and yes, when enabled it's working fine. Anybody have a solution for that? I don't mind using powershell myself but there's admins here that can't and they need to use sconfig.
Thanks

You need to take ownership of the vbs file and comment out the references to IPv6.
Open a command prompt with elevated privileges.
Take ownership of the file with the command:
takeown /f c:\Windows\System32\en-US\sconfig.vbs
Add Full permissions with the command:
icacls c:\Windows\System32\en-US\sconfig.vbs /grant username:f
 ¥Where ‘username’ is the administrator account.
Rename the sconfig.vbs file in the %WinDir%\System32\en-US\ directory.
Copy the updated sconfig.vbs file from the media provided to the %WinDir%\System32\en-US\ directory.
' Copyright (c) Microsoft Corporation. All rights reserved.
' Version 2.0
' sconfig.vbs - Configuration script used to setup a machine for remote configuration
const L_Msg001_Text = "No IP address"
const L_Msg002_Text = " No IP "
const L_Msg003_Text = "No active network adapters found."
const L_Msg004_Text = "Warning"
const L_Msg005_Text = " Server Configuration"
const L_Msg006_Text = "1) Domain/Workgroup: "
const L_Msg007_Text = "2) Computer Name: "
const L_Msg008_Text = "3) Add Local Administrator"
const L_Msg009_Text = "8) Network Settings"
const L_Msg010_Text = "5) Windows Update Settings: "
const L_Msg011_Text = "6) Download and Install Updates "
const L_Msg012_Text = "7) Remote Desktop: "
const L_Msg013_Text = "Selection:"
const L_Msg014_Text = "9) Date and Time"
const L_Msg015_Text = ") Log Off User"
const L_Msg016_Text = ") Restart Server"
const L_Msg017_Text = ") Shut Down Server"
const L_Msg018_Text = ") Exit to Command Line"
const L_Msg019_Text = "Enter number to select an option: "
const L_Msg020_Text = "Change Domain/Workgroup Membership"
const L_Msg021_Text = "Join (D)omain or (W)orkgroup? (Blank=Cancel) "
const L_Msg022_Text = "Domain"
const L_Msg023_Text = "Workgroup"
const L_Msg024_Text = "Machine currently joined to a domain."
const L_Msg025_Text = "Do you want to remove this computer from the current domain now?"
const L_Msg026_Text = "Specify an authorized domain\user: "
const L_Msg027_Text = "Removing computer from current domain..."
const L_Msg028_Text = "You must restart your computer to apply these changes."
const L_Msg029_Text = "Restart now?"
const L_Msg030_Text = "Restart"
const L_Msg031_Text = "Specify domain\user: "
const L_Msg032_Text = "Join Domain"
const L_Msg033_Text = "Enter new computer name (Blank=Cancel): "
const L_Msg034_Text = "Computer Name"
const L_Msg035_Text = "Changing Computer name..."
const L_Msg036_Text = "Enter account to join local Administrators group (Blank=Cancel): "
const L_Msg037_Text = "Adding to local Administrators group..."
const L_Msg038_Text = "Local Administrators Group"
const L_Msg039_Text = "User added to local Administrators group."
const L_Msg040_Text = "Output"
const L_Msg043_Text = "Windows Update currently set to: "
const L_Msg044_Text = "Select (A)utomatic or (M)anual updates: "
const L_Msg045_Text = "Automatic"
const L_Msg046_Text = "System will check for and install updates every day at 3:00 AM."
const L_Msg047_Text = "Enabling Automatic updates..."
const L_Msg048_Text = "Manual"
const L_Msg049_Text = "System will never check for updates."
const L_Msg050_Text = "Disabling Automatic updates..."
const L_Msg051_Text = "Windows Update set to "
const L_Msg052_Text = "Update Settings"
const L_Msg053_Text = "(E)nable or (D)isable Remote Desktop? (Blank=Cancel) "
const L_Msg054_Text = "1) Allow only clients running Remote Desktop with Network Level Authentication (more secure)"
const L_Msg055_Text = "2) Allow clients running any version of Remote Desktop (less secure)"
const L_Msg056_Text = "Enter selection: "
const L_Msg057_Text = "Enabling Remote Desktop..."
const L_Msg058_Text = "Remote Desktop enabled for clients running any version of Remote Desktop (less secure)."
const L_Msg059_Text = "Remote Desktop"
const L_Msg060_Text = "Remote Desktop enabled for clients only running Remote Desktop with Network Level Authentication (more secure)."
const L_Msg061_Text = "Failed to disable Remote Desktop."
const L_Msg062_Text = "Disabling Remote Desktop..."
const L_Msg063_Text = "Remote Desktop disabled."
const L_Msg064_Text = "Are you sure you want to log off?"
const L_Msg065_Text = "Log Off"
const L_Msg066_Text = "Are you sure you want to restart?"
const L_Msg067_Text = "Are you sure you want to shut down?"
const L_Msg068_Text = "Shut Down"
const L_Msg069_Text = "Enabled (all clients)"
const L_Msg070_Text = "Enabled (more secure clients only)"
const L_Msg071_Text = "Disabled"
const L_Msg072_Text = "--------------------------------"
const L_Msg073_Text = " Network settings"
const L_Msg074_Text = "Available Network Adapters"
const L_Msg075_Text = "Index# IP address Description"
const L_Msg076_Text = "Select Network Adapter Index# (Blank=Cancel): "
const L_Msg077_Text = " Network Adapter Settings"
const L_Msg078_Text = "NIC Index"
const L_Msg079_Text = "Description"
const L_Msg080_Text = "IP Address"
const L_Msg081_Text = "DHCP enabled"
const L_Msg082_Text = "Preferred DNS Server"
const L_Msg083_Text = "Alternate DNS Server"
const L_Msg084_Text = "1) Set Network Adapter Address"
const L_Msg085_Text = "2) Set DNS Servers"
const L_Msg086_Text = "3) Clear DNS Server Settings"
const L_Msg087_Text = "4) Return to Main Menu"
const L_Msg088_Text = "Select option: "
const L_Msg089_Text = "Select (D)HCP, (S)tatic IP (Blank=Cancel): "
const L_Msg090_Text = "Set Static IP"
const L_Msg091_Text = "Enter static IP address: "
const L_Msg092_Text = "Enter subnet mask (Blank = Default "
const L_Msg093_Text = "): "
const L_Msg094_Text = "Enter default gateway: "
const L_Msg095_Text = "Setting NIC to static IP..."
const L_Msg096_Text = "The IP address could not be changed."
const L_Msg097_Text = "Network Settings"
const L_Msg098_Text = "Setting NIC to use DHCP..."
const L_Msg099_Text = "DNS Servers"
const L_Msg100_Text = "Enter new preferred DNS server (Blank=Cancel): "
const L_Msg101_Text = "Preferred DNS server set."
const L_Msg102_Text = "Enter alternate DNS server (Blank = none): "
const L_Msg103_Text = "Alternate DNS server set."
const L_Msg104_Text = "Alternate DNS server could not be set."
const L_Msg105_Text = "Preferred DNS server could not be set."
const L_Msg106_Text = "DNS servers removed. DNS servers will be automatically obtained from network."
const L_Msg107_Text = "DNS servers could not be deleted."
const L_Msg108_Text = "Failed to join workgroup"
const L_Msg109_Text = "Welcome to workgroup: "
const L_Msg110_Text = "Participating"
const L_Msg111_Text = "Inspecting system..."
const L_Msg112_Text = "Please specify a valid IP address."
const L_Msg113_Text = "IP addresses with 127 are not valid because they are reserved for loopback addresses. Please specify some other valid value between 1 and 223."
const L_Msg114_Text = "Access is denied."
const L_Msg115_Text = "The parameter is incorrect."
const L_Msg116_Text = "The system cannot open the specified object."
const L_Msg117_Text = "Unable to update the password."
const L_Msg118_Text = "Logon failure: unknown username or password."
const L_Msg119_Text = "The specified domain either does not exist or could not be contacted."
const L_Msg120_Text = "The account already exists."
const L_Msg121_Text = "The machine is already joined to the domain."
const L_Msg122_Text = "The machine is not currently joined to a domain."
const L_Msg123_Text = "Failed to join domain."
const L_Msg124_Text = "Name of domain to join: "
const L_Msg125_Text = "Name of workgroup to join: "
const L_Msg126_Text = "Joining "
const L_Msg127_Text = "..."
const L_Msg128_Text = "==============================================================================="
const L_Msg129_Text = "E" '(E)nable
const L_Msg130_Text = "D" '(D)isable
const L_Msg131_Text = "S" '(S)tatic IP
const L_Msg132_Text = "D" '(D)HCP
const L_Msg133_Text = "W" '(W)orkgroup
const L_Msg134_Text = "D" '(D)omain
const L_Msg135_Text = "In a domain environment, specify domain\username."
const L_Msg136_Text = "In a workgroup environment, specify username."
const L_Msg137_Text = "M" 'Manual
const L_Msg138_Text = "A" 'Automatic
const L_Msg139_Text = "Subnet Mask"
const L_Msg140_Text = "Default Gateway"
const L_Msg141_Text = "This option will enable the server graphical user interface shell and require a reboot."
const L_Msg142_Text = "12) Restore Graphical User Interface (GUI)"
const L_Msg143_Text = "11) Windows Activation "
const L_Msg144_Text = "Type SCONFIG to display this menu."
const L_Msg145_Text = "Enabled"
const L_Msg146_Text = "Disabled"
const L_Msg149_Text = "Confirm"
const L_Msg150_Text = "1) Display License info"
const L_Msg151_Text = "2) Activate Windows"
const L_Msg153_Text = "3) Install Product key"
const L_Msg155_Text = "4) Return to main menu"
const L_Msg156_Text = "4) Configure Remote Management "
const L_Msg157_Text = "1) Enable Remote Management"
const L_Msg158_Text = "2) Disable Remote Management"
const L_Msg161_Text = "4) Return to main menu"
const L_Msg165_Text = "Failed to reconfigure Windows Firewall."
const L_Msg166_Text = "Remote Management blocked for all Windows Firewall profiles."
const L_Msg167_Text = "Do you want to change the computer name before restarting the computer?"
const L_Msg168_Text = "Change computer name"
const L_Msg172_Text = "Press Enter to continue..."
const L_Msg175_Text = "Failure"
const L_Msg179_Text = " Configure Remote Management"
const L_Msg186_Text = "IPv6 Address"
const L_Msg187_Text = "IPv6 Gateway"
const L_Msg188_Text = "3) Configure Server Response to Ping"
const L_Msg189_Text = "Allow remote machines to Ping this server?"
const L_Msg190_Text = "Successfully configured to allow Ping"
const L_Msg191_Text = "Successfully configured to disallow Ping"
const L_Msg193_Text = "Help improve Windows Server! By joining the Customer Experience Improvement Program (CEIP), Windows will periodically collect and upload statistical information about your system to Microsoft. The program also periodically downloads a file to collect information about problems you might have with Windows. The information collected is not used to identify or contact you or your company."
const L_Msg194_Text = "If you participate and then decide to use imaging technology on this server to build other servers, those servers will be included in the CEIP."
const L_Msg195_Text = "For more information, please visit http://go.microsoft.com/fwlink/?LinkId=285528"
const L_Msg196_Text = "For Windows privacy information, please visit http://go.microsoft.com/fwlink/?LinkId=280262"
const L_Msg197_Text = "10) Help improve the product with CEIP "
const L_Msg198_Text = "Not participating"
const L_Msg199_Text = "Participate in Customer Experience Improvement Program?"
const L_Msg200_Text = "Customer Experience Improvement Program (CEIP)"
const L_Msg201_Text = " -- Windows Activation --"
const L_Msg202_Text = "Customer Experience Improvement Program (CEIP) settings are managed by system administrator and cannot be modified."
const L_Msg203_Text = "Failed to enable Remote Desktop."
const L_Msg204_Text = "Enabling Remote Management..."
const L_Msg205_Text = "Disabling Remote Management..."
const L_Msg206_Text = "Successfully enabled Remote Management"
const L_Msg207_Text = "Failed to enable Remote Management"
const L_Msg208_Text = "Successfully disabled Remote Management"
const L_Msg209_Text = "Failed to disable Remote Management"
const L_Msg210_Text = "Current Status: Remote Management is enabled"
const L_Msg211_Text = "Current Status: Remote Management is disabled"
const L_Msg212_Text = "Failed to retrieve Remote Management settings"
const L_Msg213_Text = "Remote Management settings are managed by system administrator and cannot be be modified."
const L_Msg214_Text = "Enable Graphical User Interface"
const L_Msg215_Text = "Unknown"
const L_Msg216_Text = "Enter Product Key"
const L_Msg217_Text = "Help improve Microsoft Hyper-V Server! By joining the Customer Experience Improvement Program (CEIP), Windows will periodically collect and upload statistical information about your system to Microsoft. The program also periodically downloads a file to collect information about problems you might have with Windows. The information collected is not used to identify or contact you or your company."
const L_Msg218_Text = "For Microsoft Hyper-V Server privacy information, please visit http://go.microsoft.com/fwlink/?LinkId=227746"
const WUA_Script = "cscript WUA_SearchDownloadInstall.vbs"
Dim CmdResults
Dim pcname
Dim group_type
Dim groupname
Dim InDomain
Dim MgmtNIC
Dim Autopatch
Dim Update_schedule
Dim objNetAdapter
Dim DNSsetting
Dim DisplayIP
Dim objWshScriptExec
Dim TS_status
Dim HVS_SKU
Dim CEIP_Status
Dim RemoteManagementStatus
Set oShell = WScript.CreateObject ("WScript.shell")
Set objWMIService = GetObject( "winmgmts:\\.\root\cimv2")
'Force to run with cscript
if Instr(1,Wscript.FullName,"Cscript",vbTextCompare)=0 then
oShell.Run "cscript " & chr(34) & wscript.ScriptFullName & chr(34)
wscript.quit
end if
Set oUACExec = oShell.Exec("cmd /c " & chr(34) & "whoami /groups | find " & chr(34) & "S-1-16-12288" & chr(34) & chr(34))
Do While (oUACExec.Status = cnWshRunning)
WScript.Sleep 100
Loop
If oUACExec.ExitCode <> 0 Then
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "cscript", Chr(34) & WScript.ScriptFullName & Chr(34), "", "runas", 1
wscript.quit
end if
GetInitialStatusValues()
Do
' Get NICs
Set nics = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration where IPenabled=TRUE")
' Try to select the first NIC with an active IP
for each n in nics
MgmtNIC= n.index
Set objNetAdapter = GetObject("winmgmts:Win32_NetworkAdapterConfiguration=" & MgmtNIC)
exit for
next
' Deal with case where NICs go away
if MgmtNIC="" then
'No active NIC
DisplayIP = L_Msg003_Text
else
Set objNetAdapter = GetObject("winmgmts:Win32_NetworkAdapterConfiguration=" & MgmtNIC)
if objNetAdapter.IPenabled then
DisplayIP = objNetAdapter.IPAddress(0)
else
'No Active NICs
DisplayIP = L_Msg003_Text
end if
end if
' Get Domain status
InDomain = GetDomainStatus()
' Get Remote Desktop status
CheckRemoteDesktop()
' Get Customer Exp Improvement Program status
CheckCEIPstatus()
'Get Remote Mangement status
CheckRemoteManagementStatus()
wscript.echo
wscript.echo L_Msg128_Text '======
wscript.echo L_Msg005_Text 'sconfig
wscript.echo L_Msg128_Text '======
wscript.echo
wscript.echo L_Msg006_Text & group_type &": " & groupname 'domain/workgroup
wscript.echo L_Msg007_Text & pcname 'Computer name
wscript.echo L_Msg008_Text 'Add local admin
wscript.echo L_Msg156_Text & RemoteManagementStatus 'Configure Remote Access
wscript.echo ""
wscript.echo L_Msg010_Text & Update_schedule 'Update settings
wscript.echo L_Msg011_Text 'Download and Install updates
wscript.echo L_Msg012_Text & TS_status 'Remote Desktop
wscript.echo ""
if MgmtNIC="" then ' Network settings
wscript.echo L_Msg009_Text & vbTab & vbTab & vbTab & DisplayIP
else
wscript.echo L_Msg009_Text
end if
wscript.echo L_Msg014_Text ' Date and Time
wscript.echo L_Msg197_Text & CEIP_Status ' CEIP
if HVS_SKU then
offset=0
else
' Show Activation and Restore GUI menu items on Server Core
wscript.echo L_Msg143_Text ' 11) Windows Activation
offset=1
end if
wscript.echo ""
wscript.echo cstr(11+offset) & L_Msg015_Text ' Logoff
wscript.echo cstr(12+offset) & L_Msg016_Text ' Restart
wscript.echo cstr(13+offset) & L_Msg017_Text ' Shut Down
wscript.echo cstr(14+offset) & L_Msg018_Text ' Exit to cmd line
wscript.echo
if HVS_SKU then wscript.echo
wscript.StdOut.Write L_Msg019_Text
OptionSelection = Wscript.StdIn.ReadLine
wscript.echo
Select Case OptionSelection
Case "1" 'Change Domain/workgroup name
wscript.echo
wscript.echo L_Msg020_Text
do
wscript.echo
wscript.StdOut.Write L_Msg021_Text
DorW = Wscript.StdIn.ReadLine
loop until ucase(DorW)=ucase(L_Msg134_Text) or ucase(DorW)=ucase(L_Msg133_Text) or DorW=""
if ucase(DorW)=ucase(L_Msg133_Text) then
'Join Workgroup
'If in a domain, we need to remove it first before joining a workgroup
if InDomain then
confirm = msgbox(L_Msg024_Text & vbCRLF & L_Msg025_Text,VBYesNo,L_Msg004_Text)
if confirm=vbYes then
wscript.StdOut.Write L_Msg026_Text
domainuser = Wscript.StdIn.ReadLine
wscript.echo
wscript.echo L_Msg027_Text
targetstr = "netdom remove %computername% /domain:" & NewGroupName & " /userd:" & domainuser & " /passwordd:*"
result= oShell.Run(targetstr,1,TRUE)
if result=0 then
confirm = msgbox(L_Msg028_Text & vbCRLF & L_Msg029_Text, VBYesNo,L_Msg030_Text)
if confirm=vbYes then oShell.Run "shutdown /r /t 0",1
else
DomainAccessErrorMsg(result)
end if
end if
else
JoinWorkgroup()
end if
end if
if ucase(DorW)=ucase(L_Msg134_Text) then
'Joining Domain
group_type= L_Msg022_Text
wscript.echo
wscript.echo L_Msg032_Text
wscript.StdOut.Write L_Msg124_Text
NewGroupName = Wscript.StdIn.ReadLine
wscript.StdOut.Write L_Msg026_Text
domainuser = Wscript.StdIn.ReadLine
wscript.echo
wscript.echo L_Msg126_Text & NewGroupName & L_Msg127_Text
wscript.echo
targetstr = "netdom join %computername% /domain:" & NewGroupName & " /userd:" & domainuser & " /passwordd:*"
result= oShell.Run(targetstr,1,TRUE)
if result=0 then
confirm = msgbox(L_Msg167_Text, vbYesNo+vbDefaultButton2,L_Msg168_Text)
if confirm=vbYes then
ChangeComputerName()
else
confirm = msgbox(L_Msg028_Text & vbCRLF & L_Msg029_Text, VBYesNo,L_Msg030_Text)
if confirm=vbYes then oShell.Run "shutdown /r /t 0",1
end if
else
DomainAccessErrorMsg(result)
end if
end if
Case "2" 'Change Computer Name
ChangeComputerName()
Case "3" 'Add Account to local admin
wscript.echo L_Msg135_Text
wscript.echo L_Msg136_Text
wscript.echo
wscript.StdOut.Write L_Msg036_Text
AddUserAcct = Wscript.StdIn.ReadLine
if AddUserAcct="" then
'cancel
else
if not InDomain then
'Handle workgroup case by creating account first
targetstr = "net user " & AddUserAcct & " * /add"
result= oShell.Run(targetstr,1,TRUE)
if result<>0 then
'Show error message
RunShowOutput(targetstr)
else
AddToAdminGroup()
end if
else
AddToAdminGroup()
end if
end if
Case "4" 'Configure for remote management
ConfigureRemoteManagement()
Case "5" 'Update Settings
wscript.echo L_Msg043_Text & Update_schedule
wscript.StdOut.Write L_Msg044_Text
updateselection = Wscript.StdIn.ReadLine
if ucase(updateselection)=ucase(L_Msg138_Text) then
'Make updates automatic
Update_schedule= L_Msg045_Text
strSchedule= L_Msg046_Text
wscript.echo
wscript.echo L_Msg047_Text
oShell.Run "Cscript %WinDir%\System32\SCregEdit.wsf /AU 4" & NewComputerName,7,TRUE
end if
if ucase(updateselection)=ucase(L_Msg137_Text) then
'Make updates manual
Update_schedule= L_Msg048_Text
strSchedule= L_Msg049_Text
wscript.echo
wscript.echo L_Msg050_Text
oShell.Run "Cscript %WinDir%\System32\SCregEdit.wsf /AU 1" & NewComputerName,7,TRUE
end if
if ucase(updateselection)=ucase(L_Msg137_Text) or ucase(updateselection)=ucase(L_Msg138_Text) then
oShell.Run "Net stop wuauserv",7,TRUE
oShell.Run "Net start wuauserv",7,TRUE
MsgBox L_Msg051_Text & Update_schedule & ". " & strSchedule, vbInformation, L_Msg052_Text
end if
Case "6" 'Install Security Patches
'Install all patches on seperate thread
oShell.Run WUA_Script,1,False
Case "7" 'Enable/disable Remote Desktop
WScript.Echo
wscript.StdOut.Write L_Msg053_Text
rd = Wscript.StdIn.ReadLine
if ucase(rd)=ucase(L_Msg129_Text) then ' Enable
do
wscript.echo
wscript.echo L_Msg054_Text
wscript.echo
wscript.echo L_Msg055_Text
wscript.echo
wscript.StdOut.Write L_Msg056_Text
rdsecuritylevel = Wscript.StdIn.ReadLine
loop while not (rdsecuritylevel="1" or rdsecuritylevel="2")
wscript.echo
wscript.echo L_Msg057_Text
'Enable Remote Desktop Admin mode
result=oShell.Run("Cscript %WinDir%\System32\Scregedit.wsf /ar 0 " & NewComputerName,7,TRUE)
oShell.Run "Cscript %WinDir%\System32\Scregedit.wsf /cs 1 " & NewComputerName,7,TRUE
if result=0 then
if rdsecuritylevel=2 then
'Allow WinXP and Win 2003 clients
oShell.Run "Cscript %WinDir%\System32\Scregedit.wsf /cs 0 " & NewComputerName,7,TRUE
msgbox L_Msg058_Text,Information,L_Msg059_Text
else
msgbox L_Msg060_Text,Information,L_Msg059_Text
end if
else
msgbox L_Msg203_Text,vbCritical,L_Msg059_Text
end if
end if
if ucase(rd)=ucase(L_Msg130_Text) then
wscript.echo
wscript.echo L_Msg062_Text
'Disable Remote Desktop mode
result=oShell.Run("Cscript %WinDir%\System32\Scregedit.wsf /ar 1 " & NewComputerName,7,TRUE)
oShell.Run "Cscript %WinDir%\System32\Scregedit.wsf /cs 1 " & NewComputerName,7,TRUE
if result=0 then
msgbox L_Msg063_Text,vbInformation,L_Msg059_Text
else
msgbox L_Msg061_Text,vbCritical,L_Msg059_Text
end if
end if
Case "8" 'Change Management NIC Assignment
If MgmtNIC<>"" then
ManagementNICsettings()
else
'Display no active NIC message
DisplayIP = L_Msg003_Text
end if
Case "9" 'Set Date and Time
oShell.Run "control timedate.cpl"
Case "10" 'Customer Experience Improvement Program
DisplayCEIPdialog()
Case "11"
if not(HVS_SKU) then 'show Activation menu item
ActivateInstall()
else 'Logoff
confirm = msgbox(L_Msg064_Text, vbYesNo+vbDefaultButton2,L_Msg065_Text)
if confirm=vbYes then
oShell.Run "logoff",7,True
end if
end if
Case "12"
if not(HVS_SKU) then 'Log Off
confirm = msgbox(L_Msg064_Text, vbYesNo+vbDefaultButton2,L_Msg065_Text)
if confirm=vbYes then
oShell.Run "logoff",7,True
end if
else ' Restart
confirm = msgbox(L_Msg066_Text, vbYesNo+vbDefaultButton2,L_Msg030_Text)
if confirm=vbYes then
oShell.Run "shutdown /r /t 0",1
end if
end if
Case "13"
if not(HVS_SKU) then ' Restart
confirm = msgbox(L_Msg066_Text, vbYesNo+vbDefaultButton2,L_Msg030_Text)
if confirm=vbYes then oShell.Run "shutdown /r /t 0",1
else 'Shut Down
confirm = msgbox(L_Msg067_Text, vbYesNo+vbDefaultButton2,L_Msg068_Text)
if confirm=vbYes then oShell.Run "shutdown /s /t 0",1
end if
Case "14"
if not(HVS_SKU) then 'Shut Down
confirm = msgbox(L_Msg067_Text, vbYesNo+vbDefaultButton2,L_Msg068_Text)
if confirm=vbYes then oShell.Run "shutdown /s /t 0",1
else 'Exit to command line
wscript.quit
end if
Case "15"
if not(HVS_SKU) then 'Exit to command line
wscript.quit
end if
Case Else
end Select
Loop 'Loops back to main menu unless exiting
wscript.quit
sub CheckRemoteDesktop()
' True if Remote Desktop enabled
Dim Sh, sKey, sValueName, sValue, nValue
Set Sh = CreateObject("WScript.Shell")
sKey = "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\"
sValueName = "fDenyTSConnections"
sValue = Sh.RegRead(SKey & sValueName)
if sValue=0 then
nValue= Sh.RegRead(sKey & "WinStations\RDP-Tcp\UserAuthentication")
if nValue = 0 then
TS_status= L_Msg069_Text
else
TS_status= L_Msg070_Text
end if
else
TS_status= L_Msg071_Text
end if
End sub
Function LegalNicSelected(pickedNIC)
LegalNicSelected=False
For Each nic in nics
if pickedNIC=CStr(nic.Index) then
LegalNicSelected=True
end if
Next
end Function
Sub ManagementNICsettings()
Set nics = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPenabled=TRUE")
Set objNetAdapter = GetObject("winmgmts:Win32_NetworkAdapterConfiguration=" & MgmtNIC)
wscript.echo
wscript.echo L_Msg072_Text
wscript.echo L_Msg073_Text
wscript.echo L_Msg072_Text
wscript.echo
wscript.echo
wscript.echo L_Msg074_Text
wscript.echo
wscript.echo L_Msg075_Text
For Each nic in nics
if nic.IPenabled then
DisplayIP = nic.IPAddress(0)
else
DisplayIP=L_Msg002_Text
end if
wscript.echo
'Adjust spacing for non EN-US
if instr(L_Msg075_Text,"Index#") then
wscript.StdOut.Write " " & nic.Index & VBTab & DisplayIP & VBTab & left(nic.Description,54)
else
wscript.StdOut.Write " " & nic.Index & VBTab & VBTab & DisplayIP & VBTab & left(nic.Description,47)
end if
Next
wscript.Echo
do
wscript.Echo
wscript.StdOut.Write L_Msg076_Text
SelectedNIC = Wscript.StdIn.ReadLine
loop until LegalNicSelected(SelectedNIC) or SelectedNIC = ""
if SelectedNIC="" then
'Do nothing, Cancel was selected, return to main menu
else
'Set the MgmtNIC to a legal value
MgmtNIC=SelectedNIC
do
wscript.echo
wscript.echo L_Msg072_Text
wscript.echo L_Msg077_Text
wscript.echo L_Msg072_Text
wscript.echo
Set nics = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration where IPenabled=TRUE")
Set objNetAdapter = GetObject("winmgmts:Win32_NetworkAdapterConfiguration=" & MgmtNIC)
'Display NIC info (IP, DHCP, DNS)
For Each nic in nics
if nic.index=cint(MgmtNIC) then
if nic.IPenabled then
DisplayIP = ""
DisplayIP = nic.IPAddress(0)
'DisplayIPv6 = ""
'DisplayIPv6 = nic.IPAddress(1)
else
DisplayIP=L_Msg002_Text
end if
wscript.echo
wscript.echo L_Msg078_Text & vbTab & vbTab & MgmtNIC
wscript.echo L_Msg079_Text & vbTab & vbTab & nic.Description
wscript.echo L_Msg080_Text & vbTab & vbTab & DisplayIP & vbTab' & DisplayIPv6
wscript.echo L_Msg139_Text & vbTab & vbTab & nic.IPSubnet(0)
wscript.echo L_Msg081_Text & vbTab & vbTab & nic.DHCPenabled
on error resume next
DefaultGateway= cstr(nic.DefaultIPGateway(0))
if err<>0 then
DefaultGateway = ""
end if
on error goto 0
on error resume next
'DisplayIPv6Gateway = cstr(nic.DefaultIPGateway(1))
if err<>0 then
DisplayIPv6Gateway = ""
end if
on error goto 0
wscript.echo L_Msg140_Text & vbTab & vbTab & DefaultGateway & vbTab' & DisplayIPv6Gateway
on error resume next
primarydns= cstr(nic.DNSServerSearchOrder(0))
if err<>0 then
primarydns=""
end if
altdns= cstr(nic.DNSServerSearchOrder(1))
if err<>0 then
altdns=""
end if
on error goto 0
wscript.echo L_Msg082_Text & vbTab & primarydns
wscript.echo L_Msg083_Text & vbTab & altdns
end if
Next
'Display Network Adapter Options
wscript.echo
wscript.echo L_Msg084_Text
wscript.echo L_Msg085_Text
wscript.echo L_Msg086_Text
wscript.echo L_Msg087_Text
wscript.echo
wscript.echo
do
wscript.StdOut.Write L_Msg088_Text
NIC_option = Wscript.StdIn.ReadLine
loop until (left(NIC_option,1)>= "1" and left(NIC_option,1) <= "4") or NIC_option=""
Select Case NIC_option
Case "1" ' Set NIC IP to DHCP or Static
'---- Set IP for Selected NIC
wscript.echo
wscript.echo
wscript.StdOut.Write L_Msg089_Text
IPtypeSelection = Wscript.StdIn.ReadLine
Select Case ucase(IPtypeSelection)
Case ucase(L_Msg131_Text) 'Set Static IP
wscript.echo
wscript.echo L_Msg090_Text
do
wscript.StdOut.Write L_Msg091_Text
ip_address = wscript.StdIn.ReadLine
loop until CheckStaticIP(ip_address)
If IdentifyIPv4(ip_address) then
'Get Netmask
wscript.StdOut.Write L_Msg092_Text & DefaultNetmask(ip_address) & L_Msg093_Text
netmask = wscript.StdIn.ReadLine
if netmask="" then netmask=DefaultNetmask(ip_address)
' Get IPv4 Gateway
do
wscript.StdOut.Write L_Msg094_Text
gateway = wscript.StdIn.ReadLine
if gateway="" then exit do
loop until CheckStaticIP(gateway)
else
' Get IPv6 Gateway
end if
'Set the IP address info
strIPAddress = Array(ip_address)
strSubnetMask = Array(netmask)
strGateway = Array(gateway)
strGatewayMetric = Array(1)
wscript.echo L_Msg095_Text
'clear out all gateway entries first
arrClearGateways = Array()
errGateways = objNetAdapter.SetGateways(arrClearGateways, null)
objNetAdapter.ReleaseDHCPLease
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strGateway, strGatewaymetric)
If errEnable=0 Then
Set objNetAdapter = GetObject("winmgmts:Win32_NetworkAdapterConfiguration=" & MgmtNIC)
Else
msgbox L_Msg096_Text & vbCrLF & errEnable,vbCritical,L_Msg097_Text
wscript.echo L_Msg096_Text
End If
Case ucase(L_Msg132_Text) 'Set DHCP
wscript.echo
wscript.echo L_Msg098_Text
'clear out all gateway entries first
arrClearGateways = Array()
errGateways = objNetAdapter.SetGateways(arrClearGateways, null)
errEnable = objNetAdapter.EnableDHCP()
objNetAdapter.RenewDHCPLease
If errEnable = 0 Then
Set objNetAdapter = GetObject("winmgmts:Win32_NetworkAdapterConfiguration=" & MgmtNIC)
Else
msgbox L_Msg096_Text,vbCritical,L_Msg097_Text
wscript.echo L_Msg096_Text
End If
Case Else
'Cancel
end Select
Case "2" ' Change DNS
wscript.echo L_Msg099_Text
wscript.echo
wscript.StdOut.Write L_Msg100_Text
DNSServer = wscript.StdIn.ReadLine
strDNSServer=Array(DNSServer)
if DNSServer="" then
'Cancelled
else
'Set Preferred DNS
errDNS = objNetAdapter.SetDNSServerSearchOrder(strDNSServer)
If errDNS=0 Then
'Preferred DNS successfully set, set alternate
msgbox L_Msg101_Text,vbInformation,L_Msg097_Text
wscript.StdOut.Write L_Msg102_Text
altDNSServer = wscript.StdIn.ReadLine
strDNSServer=Array(DNSServer,altDNSServer)
if altDNSServer="" then
'skip entering alternate DNS
else
errDNS = objNetAdapter.SetDNSServerSearchOrder(strDNSServer)
If errDNS=0 Then
'Alternate DNS successfully set
msgbox L_Msg103_Text,vbInformation,L_Msg097_Text
wscript.echo L_Msg103_Text
else
msgbox L_Msg104_Text,vbCritical,L_Msg097_Text
wscript.echo L_Msg104_Text
end If
end if
else
msgbox L_Msg105_Text,vbCritical,L_Msg097_Text
end If
end if
Case "3" ' Remove DNS server settings
'clear out all entries and reset
arrDNSServers = Array()
errDNS = objNetAdapter.SetDNSServerSearchOrder(arrDNSServers)
If errDNS=0 Then
'DNS successfully cleared
msgbox L_Msg106_Text,vbInformation,L_Msg097_Text
wscript.echo L_Msg106_Text
else
msgbox L_Msg107_Text,vbCritical,L_Msg097_Text
wscript.echo L_Msg107_Text
end If
Case "4" ' return to Main Menu
Case else
end Select
Loop Until NIC_option="4" or NIC_option=""
end if
end sub
Sub ConfigureRemoteManagement()
do
wscript.echo
wscript.echo L_Msg072_Text
wscript.echo L_Msg179_Text
wscript.echo L_Msg072_Text
wscript.echo
wscript.echo
wscript.echo
resultGet=oShell.Run("configure-smremoting.exe -get",7,TRUE)
if resultGet=0 or resultGet=2 then
wscript.echo L_Msg210_Text
else
if resultGet=1 or resultGet=3 then
wscript.echo L_Msg211_Text
else
wscript.echo L_Msg212_Text
end if
end if
wscript.echo
wscript.echo L_Msg157_Text ' 1 Enable Remote Management
wscript.echo L_Msg158_Text ' 2 Disable Remote Management
wscript.echo L_Msg188_Text ' 3 Ping
wscript.echo
wscript.echo L_Msg161_Text ' 4 Return
wscript.echo
wscript.StdOut.Write L_Msg056_Text
RemoteOption = Wscript.StdIn.ReadLine
select case RemoteOption
Case "1" ' Enable Remote Management
if resultGet=2 or resultGet=3 then
msgbox L_Msg213_Text,,L_Msg179_Text
else
wscript.echo
wscript.echo L_Msg204_Text
'Enable Remote Management
result=oShell.Run("configure-smremoting.exe -enable",7,TRUE)
if result=0 then
msgbox L_Msg206_Text,,L_Msg179_Text
else
msgbox L_Msg207_Text,,L_Msg179_Text
end if
end if
Case "2" ' Disable Remote Management
if resultGet=2 or resultGet=3 then
msgbox L_Msg213_Text,,L_Msg179_Text
else
wscript.echo
wscript.echo L_Msg205_Text
'Enable Remote Management
result=oShell.Run("configure-smremoting.exe -disable",7,TRUE)
if result=0 then
msgbox L_Msg208_Text,,L_Msg179_Text
else
msgbox L_Msg209_Text,,L_Msg179_Text
end if
end if
Case "3" 'Allow/Disallow Ping
wscript.echo
'Allow Ping?
confirm = msgbox(L_Msg189_Text,VBYesNo,L_Msg179_Text)
if confirm=vbYes then
' Allow Ping
result=oShell.Run("netsh firewall set icmpsetting 8",7,TRUE)
if result=0 then
wscript.echo L_Msg190_Text 'Successfully allow ping
msgbox L_Msg190_Text,,L_Msg179_Text
else
wscript.echo L_Msg175_Text 'Failure
msgbox L_Msg165_Text,vbCritical,L_Msg179_Text
end if
else
'Disallow Ping
result=oShell.Run("netsh firewall set icmpsetting 8 disable",7,TRUE)
if result=0 then
wscript.echo L_Msg191_Text 'Disallow Ping successfully set
msgbox L_Msg191_Text,,L_Msg179_Text
else
wscript.echo L_Msg175_Text 'Failure
msgbox L_Msg165_Text,vbCritical,L_Msg179_Text
end if
end if
Case else
end Select
loop while RemoteOption="1" or RemoteOption="2" or RemoteOption="3"
end sub
sub ChangeComputerName()
Wscript.echo L_Msg034_Text
Wscript.echo
wscript.StdOut.Write L_Msg033_Text
NewComputerName = Wscript.StdIn.ReadLine
if NewComputerName<>"" then
wscript.echo L_Msg035_Text
wscript.echo
InDomain = GetDomainStatus()
if not InDomain then
'In workgroup
result = oShell.Run("netdom renamecomputer %computername% /force /NewName:" & NewComputerName,7,TRUE)
else
'In Domain
wscript.StdOut.Write L_Msg026_Text
domainuser = Wscript.StdIn.ReadLine
result = oShell.Run("netdom renamecomputer %computername% /force /NewName:" & NewComputerName & " /userd:" & domainuser & " /passwordd:*",1,TRUE)
end if
if result=0 then
confirm = msgbox(L_Msg028_Text & vbCRLF & L_Msg029_Text, VBYesNo,L_Msg030_Text)
if confirm=vbYes then oShell.Run "shutdown /r /t 0",1
else
DomainAccessErrorMsg(result)
end if
end if
end sub
sub JoinWorkgroup
group_type= L_Msg023_Text
wscript.StdOut.Write L_Msg125_Text
NewGroupName = Wscript.StdIn.ReadLine
wscript.echo
wscript.echo L_Msg126_Text & NewGroupName & L_Msg127_Text
targetstr = "Wmic computersystem where name=" & chr(34) & "%computername%" & chr(34) & " call joindomainorworkgroup name=" & chr(34) & NewGroupName & chr(34)
returncode = oShell.Run(targetstr,7,TRUE)
if returncode<>0 then
msgbox L_Msg108_Text,VBCritical,L_Msg023_Text
else
msgbox L_Msg109_Text & NewGroupName,vbInformation,L_Msg023_Text
end if
end sub
Sub GetInitialStatusValues()
wscript.echo L_Msg111_Text
wscript.echo
on error resume next
'Determine if Hyper-V Server SKU
HVS_SKU= VerifyHVS()
' Get update settings status
AutoPatch = oShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\AUOptions")
if AutoPatch=4 then
Update_schedule = L_Msg045_Text
else
Update_schedule = L_Msg048_Text
end if
Set nics = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration where IPenabled=TRUE")
' Try to select the first NIC with an active IP
if MgmtNIC="" then
DisplayIP = L_Msg001_Text
for each n in nics
MgmtNIC= n.index
Set objNetAdapter = GetObject("winmgmts:Win32_NetworkAdapterConfiguration=" & MgmtNIC)
exit for
next
end if
if MgmtNIC="" then
'Display no active NIC message
DisplayIP = L_Msg003_Text
Msgbox DisplayIP,vbExclamation,L_Msg004_Text
end if
End Sub
function GetCmdLineOutput()
Set objStdOut = objWshScriptExec.StdOut
GetCmdLineOutput = objStdOut.ReadAll
end function
Function CheckStaticIP(ip)
on error resume next
IPstart = left(ip,instr(ip,".")-1)
on error goto 0
if IPstart>=1 and IPstart<224 then
CheckStaticIP=TRUE
else
msgbox L_Msg112_Text,vbCritical,L_Msg097_Text
CheckStaticIP=FALSE
end if
if IPstart=127 then
CheckStaticIP=FALSE
msgbox L_Msg113_Text,vbCritical,L_Msg097_Text
end if
end function
Function IdentifyIPv4(ip)
IdentifyIPv4= TRUE
end function
Function DefaultNetmask(ip)
DefaultNetmask=""
on error resume next
IPstart = left(ip,instr(ip,".")-1)
on error goto 0
if IPstart>=0 and IPstart <127 then
DefaultNetmask="255.0.0.0"
end if
if IPstart>127 and IPstart <224 then
DefaultNetmask="255.255.255.0"
end if
end function
Sub DomainAccessErrorMsg(result)
Select Case result
Case 5 strErrorDescription = L_Msg114_Text
Case 87 strErrorDescription = L_Msg115_Text
Case 110 strErrorDescription = L_Msg116_Text
Case 1323 strErrorDescription = L_Msg117_Text
Case 1326 strErrorDescription = L_Msg118_Text
Case 1355 strErrorDescription = L_Msg119_Text
Case 2224 strErrorDescription = L_Msg120_Text
Case 2691 strErrorDescription = L_Msg121_Text
Case 2692 strErrorDescription = L_Msg122_Text
Case else strErrorDescription = L_Msg123_Text
End Select
msgbox strErrorDescription,vbCritical,L_Msg022_Text
end sub
Function GetDomainStatus()
Set colItems = objWMIService.ExecQuery( "Select * from Win32_ComputerSystem", , 48 )
For Each objItem in colItems
pcname = objItem.Name
strComputerDomain = objItem.Domain
If objItem.PartOfDomain Then
group_type= L_Msg022_Text
groupname= strComputerDomain
GetDomainStatus=TRUE
Else
group_type= L_Msg023_Text
groupname= strComputerDomain
GetDomainStatus=FALSE
End If
Next
end Function
Function VerifyHVS()
on error resume next
OStype = oShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\EditionID")
on error goto 0
if Instr(OStype,"ServerHyper") then
VerifyHVS=TRUE
else
VerifyHVS=FALSE
end if
end Function
sub AddToAdminGroup()
wscript.echo L_Msg037_Text
Set colAccounts = objWMIService.ExecQuery _
("Select * From Win32_Group Where Domain = '" & pcname & "' AND SID = 'S-1-5-32-544'")
For Each objAccount in colAccounts
admingroupname = objAccount.Name
Next
targetstr= "net localgroup " & admingroupname & " /add " & AddUserAcct
RunShowOutput(targetstr)
end sub
sub RunShowOutput(strCommand)
Set objWshScriptExec = oShell.Exec("cmd /C " & strCommand & " 2>&1")
strStdOut = objWshScriptExec.stdout.readall
msgbox strStdOut,,L_Msg040_Text
Set objWshScriptExec=nothing
end sub
sub CheckCEIPstatus()
'Check for policy
on error resume next
CEIP_Value1= oShell.RegRead("HKLM\Software\Policies\Microsoft\SQMClient\Windows\CEIPEnable")
on error goto 0
if CEIP_Value1="" then
'Check for local
on error resume next
CEIP_Value2= oShell.RegRead("HKLM\Software\Microsoft\SQMClient\Windows\CEIPEnable")
if CEIP_Value2="" then CEIP_Value2=0
on error goto 0
if CEIP_Value2=1 then
CEIP_Status= L_Msg110_Text 'Participating
else
CEIP_Status= L_Msg198_Text 'Not Participating
end if
else
if CEIP_Value1=1 then
CEIP_Status= L_Msg110_Text 'Participating
else
CEIP_Status= L_Msg198_Text 'Not Participating
end if
end if
end sub
sub CheckRemoteManagementStatus()
resultGet=oShell.Run("configure-smremoting.exe -get",0,TRUE)
if resultGet=0 or resultGet=2 then
RemoteManagementStatus= L_Msg145_Text 'Enabled
else
if resultGet=1 or resultGet=3 then
RemoteManagementStatus= L_Msg146_Text 'Disabled
else
RemoteManagementStatus= L_Msg215_Text 'Unknown
end if
end if
end sub
sub DisplayCEIPdialog()
on error resume next
CEIP_Value1= oShell.RegRead("HKLM\Software\Policies\Microsoft\SQMClient\Windows\CEIPEnable")
on error goto 0
if HVS_SKU then
'Show Hyper-V Server CEIP text
confirm = msgbox(L_Msg217_Text & vbCrLf & vbCrLf & L_Msg194_Text & vbCrLf & vbCrLf & L_Msg195_Text & vbCrLf & vbCrLf & L_Msg218_Text & vbCrLf & vbCrLf & L_Msg199_Text,vbYesNo+vbDefaultButton2,L_Msg200_Text )
else
'Show Windows Server CEIP text
confirm = msgbox(L_Msg193_Text & vbCrLf & vbCrLf & L_Msg194_Text & vbCrLf & vbCrLf & L_Msg195_Text & vbCrLf & vbCrLf & L_Msg196_Text & vbCrLf & vbCrLf & L_Msg199_Text,vbYesNo+vbDefaultButton2,L_Msg200_Text )
end if
if CEIP_Value1<>"" then
msgbox L_Msg202_Text,,L_Msg200_Text
else
if confirm=vbYes then
oShell.Exec("%ComSpec% /C serverCEIPOptin /enable")
msgbox L_Msg110_Text,,L_Msg145_Text
else
oShell.Exec("%ComSpec% /C serverCEIPOptin /disable")
msgbox L_Msg198_Text,,L_Msg146_Text
end if
end if
end sub
Sub ActivateInstall()
do
wscript.echo
wscript.echo L_Msg201_Text
wscript.echo
wscript.echo L_Msg150_Text '1) Display License info
wscript.echo L_Msg151_Text '2) Activate Windows
wscript.echo L_Msg153_Text '3) Install Product key
wscript.echo L_Msg155_Text '4) Exit
wscript.echo
wscript.StdOut.Write L_Msg056_Text 'Enter selection:
OptionSelection = Wscript.StdIn.ReadLine
Select case OptionSelection
Case "1"
'Display License information
oShell.Run ("%ComSpec% /K cscript %windir%\system32\slmgr.vbs /dli")
Case "2"
'Activate Windows
oShell.Run ("%ComSpec% /K cscript %windir%\system32\slmgr.vbs /ato")
Case "3"
'Install Product key
pid= inputbox(L_Msg216_Text, L_Msg216_Text)
if pid <> "" then
oShell.Run ("%ComSpec% /K cscript %windir%\system32\slmgr.vbs /ipk " & pid)
end if
Case else
end select
loop Until OptionSelection="4"
end sub

Similar Messages

  • Spotlight searching no longer working - indexing and search disabled.

    I've been searching the web and tried everything:
    Server 10.5.8
    In Server Admin - the attached drive is a SharePoint with Spotlight search on.
    I've used mdutil to enable Spotlight.
    I've checked permissions.
    I can search the Boot Drive. I can't search the attached drive.
    mdutil returns indexing and search disabled when used to turn it on.
    very frustrating.
    Anyone out there have a clue?
    Thanks,
    Mark

    HI James,
    Open System Preferences/Spotlight and click the Privacy tab. Where you see; Delete any locations listed, Quit System Preferences and restart your Mac and see if you can use Spotlight.
    Spotlight Tips
    Spotlight: How to re-index folders or volumes
    Carolyn

  • Spotlight disabled - and Indexing and searching disabled - solution

    I have tried most of the recommendations here - and finally even reinstalled and rolled back my entire PB from Time Machine this night - but Spotlight did not work. Got message in terminal "Indexing and searching disabled".
    Solution found on web - below with 2 elements:
    1) Need to remove files that block for indexing
    2) Turn on indexing - Thanks to Patrick Kinsella
    1) Check your root directory for a file called .metadataneverindex
    If it's there, delete it.
    You can only find it after making invisible files visible (se below)
    2) These great hints won’t work if Spotlight is completely disabled (which some people have tried and don’t know how to reverse). If all else fails, follow this procedure:
    Make hidden files visible (copy and paste the next line into Terminal:
defaults write com.apple.finder AppleShowAllFiles -bool YES
    !!!You need to know that the visible/invisible switch works only after a relaunch of Finder (via Command-Alt-Esc).
    Now in (previously hidden) /etc folder in your root/hard drive, find hostconfig, and open it with any text editor.
Does it include this line:
SPOTLIGHT=-YES-
(note the two dashes astride YES)?
If not, type this line at the bottom. Save the file as hostconfig in your root folder (etc folder won’t accept it from a text editor). Now drag and drop this new hostconfig to /etc. This requires your admin password to replace the existing hostconfig.
    Reboot, and your spotlight is working. This may be a long way around, but it worked for me.

    Now make invisibles invisible again with this line in Terminal:
defaults write com.apple.finder AppleShowAllFiles -bool NO
    To fire up Spotlight, you may need to type this into Terminal:
sudo mdutil -i on /
(the slash is important)
    If Mail is still not searching inside Entire Message, type this into Terminal to index your old messages:
sudo mdimport /users/YOURNAME/library/mail [or whatever the path to your mailbox message folders.
    The combination of these two did the trick for me.

    This tip is useful, but a way too complicated way to do this. A better and simpler solution is as follows:
    1. Login in to your server as an administrator.
    2. Open the Terminal application (in your /Applications/Utilities folder)
    3. Type the following exactly as written in to the Terminal:
    +sudo rm /.metadataneverindex+
    It will ask you for your password. I have never seen this file, so you may get a "file not found" error - in which case move on to step 4 anyway.
    4. Type the following in to the Terminal:
    +sudo mdutil -i on /
+
    5. Spotlight in the right corner of your server login should indicate it is indexing, and before long will start working.
    I don't believe editing of hostconfig is required at all, and you don't need to do all this stuff with making invisible files visible since you are already in the Terminal anyway.
    Hope that helps.

  • Sconfig "invalid index"

    I have problem with sconfig.vbs on Windows Server 2012 R2 Core. I have to disable IPV6 on our network. But when using sconfig.vbs to modify network settings, there the exact same issue described here:
    http://en.gpunktschmitz.de/847-windows-server-core-sconfig-vbs696-21-swbemobjectex-invalid-index
    I did some test and yes, when enabled it's working fine. Anybody have a solution for that? I don't mind using powershell myself but there's admins here that can't and they need to use sconfig.
    Thanks

    Hi DBeaudet,
    I'm Sorry for missing your point in my last posting, however, I tested and tried to enable ipv6 through remotely manage UI, Powershell, hotfix and the cmd netsh, it seems Powershell is the easiest way to get it on Server 2012 R2 core.
    You can also try another way via modifying Registry value and reboot, you can edit registry value with the cmd "reg", please also note serious problems might occur if you modify the registry incorrectly,
    for added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs.
    The relevant registry value:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters \
    Now if you have a Key DisabledComponents then configure the value accordingly :
    Type 0 to enable all IPv6 components. (Windows default setting)
    Type 0xffffffff to disable all IPv6 components, except the IPv6 loopback interface. This value also configures Windows to prefer using Internet
    Protocol version 4 (IPv4) over IPv6 by modifying entries in the prefix policy table. For more information, see Source and Destination Address Selection .
    Type 0x20 to prefer IPv4 over IPv6 by modifying entries in the prefix policy table.
    Type 0x10 to disable IPv6 on all nontunnel interfaces (on both LAN and Point-to-Point Protocol [PPP] interfaces).
    Type 0x01 to disable IPv6 on all tunnel interfaces. These include Intra-Site Automatic Tunnel Addressing Protocol (ISATAP), 6to4, and Teredo.
    Type 0x11 to disable all IPv6 interfaces except for the IPv6 loopback interface.
    If you dont find key DisabledComponents, then create it using :
    In the Edit menu, point to New , and then click DWORD (32-bit) Value .
    Type DisabledComponents , and then press ENTER.
    Double-click DisabledComponents .
    Refer to:
    enable ipv6
    Please feel free to let us know whether the suggestion above can work.If
    you have any feedback on our support, please click here.
    Best Regards,
    Anna Wang
    TechNet Community Support

  • Call procedure with Spring and strange invalid index error.

    Hi I call a procedure, from java in this way:
    FlussiGiornalieriStoredProcedure proc = new FlussiGiornalieriStoredProcedure(dataSource);
                   String column_order="";
                   if (orderColumn!=null) {
                        column_order = orderColumn + " " + orderType;
                   } else {
                        column_order = " stato DESC "; //this is the invalid index column of the error               
    Map mappa = proc.execute(idGruppo, dataInizio, dataFine, startRow, endRow, column_order);
                   result = (List<VistaFlussiGiornalieri>) mappa.get("recordsetCursor");
                   numeroTotaleRighe = ((BigDecimal)mappa.get("countRow")).intValue();
    response.setSize(numeroTotaleRighe);
              response.setList((List<VistaFlussiGiornalieri>) result);
    private class FlussiGiornalieriStoredProcedure extends StoredProcedure {
            private static final String SQL = "mkt_flussi_giornalieri2";
            public FlussiGiornalieriStoredProcedure(DataSource ds) {             
                super(ds, SQL);
                declareParameter(new SqlParameter("idGruppo", Types.VARCHAR));
                declareParameter(new SqlParameter("dataInizio", Types.DATE));
                declareParameter(new SqlParameter("dataFine", Types.DATE));           
                declareParameter(new SqlParameter("startRow", OracleTypes.NUMBER));
                declareParameter(new SqlParameter("endRow", OracleTypes.NUMBER));
                declareParameter(new SqlParameter("column_order", OracleTypes.VARCHAR));
                //declareParameter(new SqlParameter("order_name", OracleTypes.VARCHAR));
                declareParameter(new SqlOutParameter("recordsetCursor", OracleTypes.CURSOR, VistaFlussiGiornalieriDaoImpl.this));
                declareParameter(new SqlOutParameter("countRow", OracleTypes.NUMBER, VistaFlussiGiornalieriDaoImpl.this));
                //declareParameter(new SqlOutParameter("QUERY_STM", OracleTypes.VARCHAR, VistaFlussiGiornalieriDaoImpl.this));
                compile();
            public Map execute(String idGruppo, Date dataInizio, Date dataFine, int startRow, int endRow, String column_order) {
                 Map inputs = new HashMap();
                 inputs.put("idGruppo", idGruppo);
                 inputs.put("dataInizio", dataInizio);
                 inputs.put("dataFine", dataFine);
                 inputs.put("startRow", startRow);
                 inputs.put("endRow", endRow);
                 inputs.put("column_order", column_order);
                return execute(inputs);
        }When The java class call the oracle procedure I receive this message:
    >
    Caused by: java.sql.SQLException: Invalid index column
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
         at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:385)
         at it.edison.markettracker.dao.spring.VistaFlussiGiornalieriDaoImpl.mapRow(VistaFlussiGiornalieriDaoImpl.java:155)
         at it.edison.markettracker.dao.spring.VistaFlussiGiornalieriDaoImpl.mapRow(VistaFlussiGiornalieriDaoImpl.java:1)
         at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:92)
         at org.springframework.jdbc.core.JdbcTemplate.processResultSet(JdbcTemplate.java:1124)
         at org.springframework.jdbc.core.JdbcTemplate.extractOutputParameters(JdbcTemplate.java:1085)
         at org.springframework.jdbc.core.JdbcTemplate$5.doInCallableStatement(JdbcTemplate.java:997)
         at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:936)
         ... 26 more
    If I call the procedure, from toad, in this way:
    SET serveroutput ON
    DECLARE
    TROVATI SYS_REFCURSOR;
    NUMERO_TROVATI NUMBER;
    BEGIN
          DBMS_OUTPUT.ENABLE(30000);
          dbms_output.put_line('INIZIO');
          Mkt_Flussi_Giornalieri2(1, trunc(sysdate), trunc(sysdate), 100, 50, 'stato DESC', TROVATI, NUMERO_TROVATI);
          dbms_output.put_line('RECORD TROVATI:'||NUMERO_TROVATI);
    END; I don't receive any error message. Why?
    The procedure is:
    CREATE OR REPLACE PROCEDURE Mkt_Flussi_Giornalieri2
    ( idGruppo IN VARCHAR2
    , dataInizio IN DATE
    , dataFine IN DATE
    , startRow IN NUMBER
    , endRow IN NUMBER
    , column_order in varchar2
    --, order_name in varchar2
    , recordsetCursor OUT SYS_REFCURSOR
    , countRow OUT NUMBER
    ) IS
    order_clause varchar2(200) := ' ';
    sql_stm varchar2(32000);
    BEGIN
    IF column_order IS NOT NULL
    THEN
    order_clause := column_order;
    ELSE
    order_clause := ' stato DESC ';
    END IF;
    dbms_output.put_line('clausola:'||order_clause);
    sql_stm:='
         SELECT idflusso, descrizioneFlusso, dataRiferimento, strDataRiferimento,
            stato,  dataElaborazione, ultimoMessaggio, livello, utentiRiferimento,
            exec_seq, provider_description, log_info FROM
      (SELECT idflusso, descrizioneFlusso, dataRiferimento, strDataRiferimento,
            stato,  dataElaborazione, ultimoMessaggio, livello, utentiRiferimento,
            exec_seq, provider_description, log_info FROM
      (SELECT
    temp.flow_id AS idFlusso,
    MKT_FLOW.flow_id || '' - '' || MKT_FLOW.flow_description || ''('' || temp.exec_seq || '')'' AS descrizioneFlusso,
    TO_DATE(temp.date_id,''yyyymmddhh24miss'') AS dataRiferimento,
    TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''dd/mm/yyyy'')||'' h. ''||TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''hh24:mi'') AS strDataRiferimento,
    temp.status AS stato, temp.end_time AS dataElaborazione, DECODE(temp.status,3, ERROR_DESC, 1, TRACE_DES) AS ultimoMessaggio,
    DECODE(temp.status,3, error_level, 1, fk_trace_level) AS livello,
    Get_Group_Description(MKT_FLOW.flow_id) AS utentiRiferimento, temp.exec_seq AS exec_seq, mp.provider_description,
                             mp.provider_link, mfc.log_info
    FROM (
      SELECT v.*, tr.TRACE_ID, tr.TRACE_DES , tr.trace_date, tr.fk_trace_level, e.ERROR_ID, e.ERROR_CODE, NVL(e.ERROR_DESC, er.ERROR_DESC) AS ERROR_DESC, e.error_date, e.error_level,
      MIN(e.error_id) OVER (PARTITION BY e.fk_exec_seq) eid,
      MAX(tr.trace_id) OVER (PARTITION BY tr.fk_exec_seq) tid
      FROM (
        SELECT fc.*, MAX(exec_seq) OVER (PARTITION BY flow_id, flow_frequency, n_run, date_id) exsq
        FROM mkt_flow_conf_view fc
        WHERE TRUNC(end_time) >= :1
          AND TRUNC(end_time) <= :2
      ) v, MKT_ERROR er, MKT_FLOW_ERROR e, MKT_FLOW_TRC tr
      WHERE v.exec_seq        = v.exsq
        AND e.fk_exec_seq (+) = v.exec_seq
        AND tr.fk_exec_seq (+) = v.exec_seq
        AND er.error_id (+) = e.error_code
    ) temp
    INNER JOIN MKT_FLOW
    ON MKT_FLOW.flow_id = temp.flow_id AND MKT_FLOW.n_run = temp.n_run AND MKT_FLOW.flow_frequency = temp.flow_frequency
    INNER JOIN MKT_FLOW_GROUP ON MKT_FLOW_GROUP.flow_id = MKT_FLOW.flow_id
    LEFT OUTER JOIN
                             (SELECT DISTINCT flow_id, log_info
                                         FROM mkt_flow_conf) mfc
                             ON mkt_flow.flow_id = mfc.flow_id
                             , mkt_provider mp
    WHERE NVL(error_id, -1) = NVL(eid, -1)
      AND NVL(trace_id, -1) = NVL(tid, -1)
      AND MKT_FLOW_GROUP.group_id=:3
      AND NVL (mkt_flow.fk_provider_id, '' '') =
                                                         NVL (mp.provider_id, '' '') )
      WHERE ROWNUM <= :4
      MINUS
      (SELECT idflusso, descrizioneFlusso, dataRiferimento, strDataRiferimento,
            stato,  dataElaborazione, ultimoMessaggio, livello, utentiRiferimento,
            exec_seq, provider_description, log_info FROM
      (SELECT
    temp.flow_id AS idFlusso,
    MKT_FLOW.flow_id || '' - '' || MKT_FLOW.flow_description || ''('' || temp.exec_seq || '')'' AS descrizioneFlusso,
    TO_DATE(temp.date_id,''yyyymmddhh24miss'') AS dataRiferimento,
    TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''dd/mm/yyyy'')||'' h. ''||TO_CHAR(TO_DATE(temp.date_id,''yyyymmddhh24miss''),''hh24:mi'') AS strDataRiferimento,
    temp.status AS stato, temp.end_time AS dataElaborazione, DECODE(temp.status,3, ERROR_DESC, 1, TRACE_DES) AS ultimoMessaggio,
    DECODE(temp.status,3, error_level, 1, fk_trace_level) AS livello,
    Get_Group_Description(MKT_FLOW.flow_id) AS utentiRiferimento, temp.exec_seq AS exec_seq, mp.provider_description,
                             mp.provider_link, mfc.log_info
    FROM (
      SELECT v.*, tr.TRACE_ID, tr.TRACE_DES , tr.trace_date, tr.fk_trace_level, e.ERROR_ID, e.ERROR_CODE, NVL(e.ERROR_DESC, er.ERROR_DESC) AS ERROR_DESC, e.error_date, e.error_level,
      MIN(e.error_id) OVER (PARTITION BY e.fk_exec_seq) eid,
      MAX(tr.trace_id) OVER (PARTITION BY tr.fk_exec_seq) tid
      FROM (
        SELECT fc.*, MAX(exec_seq) OVER (PARTITION BY flow_id, flow_frequency, n_run, date_id) exsq
        FROM mkt_flow_conf_view fc
        WHERE TRUNC(end_time) >= :5
          AND TRUNC(end_time) <= :6
      ) v, MKT_ERROR er, MKT_FLOW_ERROR e, MKT_FLOW_TRC tr
      WHERE v.exec_seq        = v.exsq
        AND e.fk_exec_seq (+) = v.exec_seq
        AND tr.fk_exec_seq (+) = v.exec_seq
        AND er.error_id (+) = e.error_code
    ) temp
    INNER JOIN MKT_FLOW
    ON MKT_FLOW.flow_id = temp.flow_id AND MKT_FLOW.n_run = temp.n_run AND MKT_FLOW.flow_frequency = temp.flow_frequency
    INNER JOIN MKT_FLOW_GROUP ON MKT_FLOW_GROUP.flow_id = MKT_FLOW.flow_id
    LEFT OUTER JOIN
                             (SELECT DISTINCT flow_id, log_info
                                         FROM mkt_flow_conf) mfc
                             ON mkt_flow.flow_id = mfc.flow_id
                             , mkt_provider mp
    WHERE NVL(error_id, -1) = NVL(eid, -1)
      AND NVL(trace_id, -1) = NVL(tid, -1)
      AND MKT_FLOW_GROUP.group_id=:7
      AND NVL (mkt_flow.fk_provider_id, '' '') =
                                                         NVL (mp.provider_id, '' '') )
      WHERE ROWNUM <= :8
      )  ) ORDER BY :9' ;
    dbms_output.enable(30000);
    dbms_output.put_line(sql_stm);
    OPEN recordsetCursor FOR sql_stm USING dataInizio, dataFine, idGruppo, endRow, dataInizio, dataFine, idGruppo, startRow, order_clause;
       SELECT COUNT(*) INTO countRow FROM
      (SELECT
    temp.flow_id AS idFlusso,
    MKT_FLOW.flow_id || ' - ' || MKT_FLOW.flow_description || '(' || temp.exec_seq || ')' AS descrizioneFlusso,
    TO_DATE(temp.date_id,'yyyymmddhh24miss') AS dataRiferimento,
    TO_CHAR(TO_DATE(temp.date_id,'yyyymmddhh24miss'),'dd/mm/yyyy')||' h. '||TO_CHAR(TO_DATE(temp.date_id,'yyyymmddhh24miss'),'hh24:mi') AS strDataRiferimento,
    temp.status AS stato, temp.end_time AS dataElaborazione, DECODE(temp.status,3, ERROR_DESC, 1, TRACE_DES) AS ultimoMessaggio,
    DECODE(temp.status,3, error_level, 1, fk_trace_level) AS livello,
    Get_Group_Description(MKT_FLOW.flow_id) AS utentiRiferimento, temp.exec_seq AS exec_seq, mp.provider_description,
                             mp.provider_link, mfc.log_info
    FROM (
      SELECT v.*, tr.TRACE_ID, tr.TRACE_DES , tr.trace_date, tr.fk_trace_level, e.ERROR_ID, e.ERROR_CODE, NVL(e.ERROR_DESC, er.ERROR_DESC) AS ERROR_DESC, e.error_date, e.error_level,
      MIN(e.error_id) OVER (PARTITION BY e.fk_exec_seq) eid,
      MAX(tr.trace_id) OVER (PARTITION BY tr.fk_exec_seq) tid
      FROM (
        SELECT fc.*, MAX(exec_seq) OVER (PARTITION BY flow_id, flow_frequency, n_run, date_id) exsq
        FROM mkt_flow_conf_view fc
        WHERE TRUNC(end_time) >= dataInizio
          AND TRUNC(end_time) <= dataFine
      ) v, MKT_ERROR er, MKT_FLOW_ERROR e, MKT_FLOW_TRC tr
      WHERE v.exec_seq        = v.exsq
        AND e.fk_exec_seq (+) = v.exec_seq
        AND tr.fk_exec_seq (+) = v.exec_seq
        AND er.error_id (+) = e.error_code
    ) temp
    INNER JOIN MKT_FLOW
    ON MKT_FLOW.flow_id = temp.flow_id AND MKT_FLOW.n_run = temp.n_run AND MKT_FLOW.flow_frequency = temp.flow_frequency
    INNER JOIN MKT_FLOW_GROUP ON MKT_FLOW_GROUP.flow_id = MKT_FLOW.flow_id
    LEFT OUTER JOIN
                             (SELECT DISTINCT flow_id, log_info
                                         FROM mkt_flow_conf) mfc
                             ON mkt_flow.flow_id = mfc.flow_id
                             , mkt_provider mp
    WHERE NVL(error_id, -1) = NVL(eid, -1)
      AND NVL(trace_id, -1) = NVL(tid, -1)
      AND MKT_FLOW_GROUP.group_id=idGruppo
      AND NVL (mkt_flow.fk_provider_id, ' ') =
                                                         NVL (mp.provider_id, ' '));
    END Mkt_Flussi_Giornalieri2;
    /Please, could someone help me?
    Thanks. Bye Bye.

    Hi,
    I have solved the problem, I forgot a parameter in the select, so java tells the an error. But now I have another problem. The procedure doesn't execute the order by. I pass the couple column_name order_type in a string as ("provider_description desc") dinamically but the procedure doesn't execute the ordering. Why?
    Thanks, bye bye.

  • Cisco IOS Zone Based Firewall and IPv6

    Hello,
    I am trying to setup IPv6 tunnel to tunnel-broker Hurrican Electrics. IPv6 connection is working OK only if I disable zone security on WAN interface (Fe0 - IPv4 interface).
    Which protocols must be alloved to and from router?
    IOS version: 15.1.2T1 (Adv.ip services)
    Setup:
    HE (tunnel-broker)  --- Internet (IPv4)  ---- Cisco 1812 (Fe0 (IPv4) and interface tunnel 1 (IPv6))
    Config on router:
    IPv4 (self to internet and internet to self)
    policy-map type inspect Outside2Router-pmap
    class type inspect SSHaccess-cmap
      inspect
    class type inspect ICMP-cmap
      inspect
    class type inspect IPSEC-cmap
      pass
    class type inspect Protocol41-cmap
      pass log
    class class-default
      drop
    interface Tunnel1
    description Hurricane Electric IPv6 Tunnel Broker
    no ip address
    zone-member security IPv6tunnel
    ipv6 address 2001:47:25:105B::2/64
    ipv6 enable
    ipv6 mtu 1300
    tunnel source FastEthernet0
    tunnel mode ipv6ip
    tunnel destination xxx.66.80.98
    interface FastEthernet0
    description WAN interface
    ip address xxx.xxx.252.84 255.255.0.0
    no ip redirects
    no ip unreachables
    no ip proxy-arp
    zone-member security WAN
    duplex auto
    speed auto
    zone-pair security IPv6Tunnel_2_WAN source IPv6tunnel destination WAN
    service-policy type inspect IPv6-out-pmap
    zone-pair security WAN_2_IPv6tunnel source WAN destination IPv6tunnel
    service-policy type inspect IPv6-out-pmap
    policy-map type inspect IPv6-out-pmap
    class type inspect IPv6-internet-class
      inspect
    class class-default
      drop
    class-map type inspect match-all IPv6-internet-class
    match protocol tcp
    match protocol udp
    match protocol icmp
    match protocol ftp
    ipv6 route ::/0 Tunnel1
    ipv6 unicast-routing
    ipv6 cef
    parameter-map type inspect v6-param-map
    ipv6 routing-header-enforcement loose
    sessions maximum 10000

    OK, removed the cmap the packet was getting dropped on, so the current self to wan zone-pair policy map looks like this:
    policy-map type inspect pm-selftowan
    class type inspect cm-selftowan-he-out
      inspect
    class type inspect cm-dhcpwan
      pass
    class class-default
      drop
    class-map type inspect match-all cm-selftowan-he-out
    match access-group name HETunnelOutbound
    ip access-list extended HETunnelOutbound
    permit 41 any any
    permit ip any host 64.62.200.2
    permit ip any host 66.220.2.74
    permit ip any host 216.66.80.26
    Now we see the same error, just on the 'new' first cmap in the pmap:
    *Oct  5 02:39:31.316 GMT: %FW-6-DROP_PKT: Dropping Unknown-l4 session :0 216.66.80.26:0 on zone-pair selftowan class cm-selftowan-he-out due to  Invalid Segment with ip ident 0
    Yet as you can see above, we are allowing proto 41 any any.
    I didn't expect any other result really since the previous cmap had 'permit ip any any' but still
    any ideas?
    Thanks,
    //TrX
    EDIT: Out of curiosity after reading this post: https://supportforums.cisco.com/thread/2043222?decorator=print&displayFullThread=true
    I decided to change the outbound cm-selftowan-he-out action to 'pass'.
    I suddently noticed the following log:
    *Oct  5 02:39:31.316 GMT: %FW-6-DROP_PKT: Dropping Unknown-l4 session  216.66.80.26:0 :0 on zone-pair wantoself class  cm-wantoself-he-in due to  Invalid Segment with ip ident 0
    Notice this is now inbound having trouble where as before was outbound.
    I changed the inbound pmap policy for cmap cm-wantoself-he-in to pass also and IPv6 PACKETS ARE GETTING ICMP6 REPLIES FROM GOOGLE!
    Looking at the original outbound PMAP:
    policy-map type inspect pm-selftowan
    class type inspect cm-selftowan
      inspect
    class type inspect cm-selftowan-he-out
      inspect
    class type inspect cm-dhcpwan
      pass
    class class-default
      drop
    cm-selftowan has always been infront of cm-selftowan-he-out, and because that is ip any any, it has been 'grabbing' the IP proto 41 packets and doing ip inspect on them (which fails as it seems ip inspect only handles a handful of proto's).
    This is why setting cm-selftowan-he-out and cm-wantoself-he-in both to 'pass' instead of 'inspect' in the past has not been doing anything, because the outbound packets were never getting to the cm-selftowan-he-out cmap.
    Would never have got to this without ip inspect log. Why didn't I think of just trying ip inspect logging two days ago!
    Anyway, thank you, I have now restored my faith in my own knowledge of ZBF!
    Hope this helps the OP too
    //TrX

  • Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))

    I've Main Report + 5 sub report. All of this in a 1 file named _rptBorang.rpt.
    This _rptBorang.rpt consists of
    1. Main Report
    2. _spupimSPMBorang.rpt
    3. _spupimSTPMBorang.rpt
    4. _spupimSijilDiploma.rpt
    5. _spupimKoQ.rpt
    6. _spupimPilihanProg.rpt
    When I preview the report, the Enter values dialog box ask 7 parameters. It's
    1. idx
    2. tbl_MST_Pemohon_idx
    3. tbl_MST_Pemohon_idx(_spupimSPMBorang.rpt)
    4. tbl_MST_Pemohon_idx(_spupimSTPMBorang.rpt)
    5. tbl_MST_Pemohon_idx(_spupimSijilDiploma.rpt)
    6. tbl_MST_Pemohon_idx(_spupimKoQ.rpt)
    7. tbl_MST_Pemohon_idx(_spupimPilihanProg.rpt)
    My ASP.NET code as following,
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="_cetakBorang.aspx.vb" Inherits="_cetakBorang" title="SPUPIM" %>
    <%@ Register assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="Head1" runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1n" runat="server">
        <div align="center">
            <asp:Label ID="lblMsg" runat="server" ForeColor="Red"></asp:Label>
            <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
                AutoDataBind="true" />
        </div>
        </form>
    </body>
    </html>
    Imports System.configuration
    Imports System.Data.SqlClient
    Imports System.Web.Security
    Imports CrystalDecisions.Shared
    Imports CrystalDecisions.CrystalReports.Engine
    Partial Class _cetakBorang
        Inherits System.Web.UI.Page
        Private Const PARAMETER_FIELD_NAME1 As String = "idx"
        Private Const PARAMETER_FIELD_NAME2 As String = "tbl_MST_Pemohon_idx"
        Private Const PARAMETER_FIELD_NAME3 As String = "tbl_MST_Pemohon_idx(_spupimSPMBorang.rpt)"
        Private Const PARAMETER_FIELD_NAME4 As String = "tbl_MST_Pemohon_idx(_spupimSTPMBorang.rpt)"
        Private Const PARAMETER_FIELD_NAME5 As String = "tbl_MST_Pemohon_idx(_spupimSijilDiploma.rpt)"
        Private Const PARAMETER_FIELD_NAME6 As String = "tbl_MST_Pemohon_idx(_spupimKoQ.rpt)"
        Private Const PARAMETER_FIELD_NAME7 As String = "tbl_MST_Pemohon_idx(_spupimPilihanProg.rpt)"
        Dim myReport As New ReportDocument
        'rpt connection
        Public rptSvrNme As String = ConfigurationManager.AppSettings("rptSvrNme").ToString()
        Public rptUsr As String = ConfigurationManager.AppSettings("rptUsr").ToString()
        Public rptPwd As String = ConfigurationManager.AppSettings("rptPwd").ToString()
        Public rptDB As String = ConfigurationManager.AppSettings("rptDB").ToString()
        Private Sub SetCurrentValuesForParameterField(ByVal reportDocument As ReportDocument, ByVal arrayList As ArrayList, ByVal paramFieldName As String)
            Dim currentParameterValues As New ParameterValues()
            For Each submittedValue As Object In arrayList
                Dim parameterDiscreteValue As New ParameterDiscreteValue()
                parameterDiscreteValue.Value = submittedValue.ToString()
                currentParameterValues.Add(parameterDiscreteValue)
            Next
            Dim parameterFieldDefinitions As ParameterFieldDefinitions = reportDocument.DataDefinition.ParameterFields
            Dim parameterFieldDefinition As ParameterFieldDefinition = parameterFieldDefinitions(paramFieldName)
            parameterFieldDefinition.ApplyCurrentValues(currentParameterValues)
        End Sub
        Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
            If Not IsPostBack Then
                publishReport(Convert.ToInt32(Session("applicantIdx")), Convert.ToInt32(Session("applicantIdx")))
            End If
        End Sub
        Private Sub publishReport(ByVal idx As Integer, ByVal tbl_MST_Pemohon_idx As Integer)       
            Try
                Dim reportPath As String = String.Empty
                reportPath = Server.MapPath("_rptBorang.rpt")
                myReport.Load(reportPath)
                myReport.SetDatabaseLogon(rptUsr, rptPwd, rptSvrNme, rptDB)
                Dim arrayList1 As New ArrayList()
                arrayList1.Add(idx)
                SetCurrentValuesForParameterField(myReport, arrayList1, PARAMETER_FIELD_NAME1)
                Dim arrayList2 As New ArrayList()
                arrayList2.Add(tbl_MST_Pemohon_idx)
                SetCurrentValuesForParameterField(myReport, arrayList2, PARAMETER_FIELD_NAME2)
                Dim arrayList3 As New ArrayList()
                arrayList3.Add(tbl_MST_Pemohon_idx)
                SetCurrentValuesForParameterField(myReport, arrayList3, PARAMETER_FIELD_NAME3)
                Dim arrayList4 As New ArrayList()
                arrayList4.Add(tbl_MST_Pemohon_idx)
                SetCurrentValuesForParameterField(myReport, arrayList4, PARAMETER_FIELD_NAME4)
                Dim arrayList5 As New ArrayList()
                arrayList5.Add(tbl_MST_Pemohon_idx)
                SetCurrentValuesForParameterField(myReport, arrayList5, PARAMETER_FIELD_NAME5)
                Dim arrayList6 As New ArrayList()
                arrayList6.Add(tbl_MST_Pemohon_idx)
                SetCurrentValuesForParameterField(myReport, arrayList6, PARAMETER_FIELD_NAME6)
                Dim arrayList7 As New ArrayList()
                arrayList7.Add(tbl_MST_Pemohon_idx)
                SetCurrentValuesForParameterField(myReport, arrayList7, PARAMETER_FIELD_NAME7)
                Dim parameterFields As ParameterFields = CrystalReportViewer1.ParameterFieldInfo
                CrystalReportViewer1.ReportSource = myReport
            Catch ex As Exception
                lblMsg.Text = ex.Message
            End Try
        End Sub
        Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
            myReport.Close()
        End Sub
    End Class
    The result was, my ASP.NET return error --- > Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
    I'm stuck
    Really need help
    Edited by: WKM1925 on Feb 22, 2012 11:49 AM

    First off, it would really be nice to have the version of CR you are using. Then
    1) does this report work the CR designer?
    2) What CR SDK are you using?
    3) If .NET, what version?
    4) Web or Win app?
    5) What OS?
    Then, please re-read your post and see if it actually makes any sense. To me, it's just gibberish...
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Auth against trsuted domain - 500 Internal Server Error Invalid index.(1413

    Hi all,
            we are publishing a SAP portal via ISA 2006. <br /><br />
    I have eventually managed to get single sign on working all the way through for company.local users, however we also have a domain where all our customer accounts sit - extcustomers.local, which has a two way trust with company.local. <br /><br />
    When logging on with a company.local account, via an ISA form, and we are getting an error below.<br /><br />
    <strong>"500 Internal Server Error. Invalid index. (1413) " </strong><br />
    I'm struggling to find why this error is occuring - and was hoping you guys may be able to point me in the right direction. <br />
    Also in Portal Logs  i can see the fallowing.<br />
    LOGIN.FAILED<br />
    User: N/A<br />
    Authentication Stack: ticket<br /><br />
    Login Module                                                               Flag        Initialize  Login      Commit     Abort      Details<br />
    1. com.sap.security.core.server.jaas.EvaluateTicketLoginModule             SUFFICIENT  ok          false                 true       <br />
    2. com.sap.security.core.server.jaas.SPNegoLoginModule                     OPTIONAL    ok          exception             true       Failure unspecified at GSS-API level (Mechanism level: Integrity check on decrypted field failed (31))<br />
    3. com.sap.engine.services.security.server.jaas.BasicPasswordLoginModule   REQUISITE   ok          false                 false   <br />  
    4. com.sap.security.core.server.jaas.CreateTicketLoginModule               OPTIONAL    ok          false                 true       <br />
    And Fallowed by .<br />
    <strong>CreateContext failed: GSSException: Failure unspecified at GSS-API level (Mechanism level: Integrity check on decrypted field failed (31)) </strong><br />
    [EXCEPTION]<br />
    GSSException: Failure unspecified at GSS-API level (Mechanism level: Integrity check on decrypted field failed (31)) <br />
    at sun.security.jgss.krb5.Krb5Context.acceptSecContext(Krb5Context.java:734) <br />
    at sun.security.jgss.GSSContextImpl.acceptSecContext(GSSContextImpl.java:300) <br />
    at sun.security.jgss.GSSContextImpl.acceptSecContext(GSSContextImpl.java:246) <br />
    at com.sap.security.core.server.jaas.SPNegoLoginModule.doHandshake(SPNegoLoginModule.java:749) <br />
    at com.sap.security.core.server.jaas.SPNegoLoginModule.login(SPNegoLoginModule.java:365) <br />
    at com.sap.engine.services.security.login.LoginModuleLoggingWrapperImpl.login(LoginModuleLoggingWrapperImpl.java:185) <br />
    at com.sap.engine.services.security.login.ModulesProcessAction.run(ModulesProcessAction.java:70) <br />
    at java.security.AccessController.doPrivileged(Native Method) <br /><br />
    at com.sap.engine.services.security.login.FastLoginContext.login(FastLoginContext.java:181) <br />
    at com.sap.engine.system.SystemLoginModule.login(SystemLoginModule.java:90) <br />
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) <br />
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) <br />
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) <br />
    at java.lang.reflect.Method.invoke(Method.java:324) <br />
    at javax.security.auth.login.LoginContext.invoke(LoginContext.java:675) <br />
    at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129) <br />
    at javax.security.auth.login.LoginContext$4.run(LoginContext.java:610) <br />
    at java.security.AccessController.doPrivileged(Native Method) <br />
    at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:607) <br />
    at javax.security.auth.login.LoginContext.login(LoginContext.java:534) <br />
    at com.sap.security.core.logon.imp.SAPJ2EEAuthenticator.getLoggedInUser(SAPJ2EEAuthenticator.java:149) <br />
    at com.sapportals.portal.prt.service.authenticationservice.AuthenticationService.getLoggedInUser(AuthenticationService.java:303) <br />
    at com.sapportals.portal.prt.connection.UMHandler.handleUM(UMHandler.java:96) <br />
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:186) <br />
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:524) <br />
    at java.security.AccessController.doPrivileged(Native Method) <br />
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:407) <br />
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) <br />
    at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156) <br />
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) <br />
    at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:321) <br />
    at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:377) <br />
    at com.sap.portal.navigation.Gateway.service(Gateway.java:126) <br />
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) <br />
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) <br />
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) <br />
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386) <br />
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364) <br />
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039) <br />
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265) <br />
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) <br />
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175) <br />
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process<br />(ApplicationSessionMessageListener.java:33) <br />
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) <br />
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) <br />
    at java.security.AccessController.doPrivileged(Native Method) <br /><br />
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102) <br />
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    <br /><br />
    Any Ideas regarding would be greately appritiated.<br /><br />
    Kind Regards,<br />
    vamsi<br />
    Edited by: Vamsi Krishna Koganti on Jun 30, 2009 8:01 AM
    Edited by: Vamsi Krishna Koganti on Jun 30, 2009 9:27 AM
    Edited by: Vamsi Krishna Koganti on Jun 30, 2009 5:41 PM

    Hi All,
    Thanks for having a look at this.
    The Problem is that at ISA wron g server is maintained and wrong service principal name is maintained adn after changing this the problem is solved.
    From the research i can say that there are 2 things  we need to look at  when we have this issue.
    1. Password
    2. Serviceprincipalname
    Kind Regards
    Vamsi

  • Unable to boot: Mac HD verify error - invalid index key

    Thank you in advance for your assistance. Please provide a detailed response. There is a lot I have to learn about computers.
    I allowed my macbook air mid-2013 os x 10.10.2 to update yesterday. I didn't look at what the update was (just saw the notification and clicked restart). It shut down, but did not restart. When I try to boot, the loading bar slows and tops at approx 35%, and the computer shuts off. I can boot in recovery mode. In disk utility, on the left side the first line is Macintosh HD. I can verify this without errors. The second line is also Macintosh HD written in lighter grey. I cannot interact with this until I click unlock and type in my password. After doing so, it is written in dark black, and I then have the option to verify disk. Doing so, I am given the follow error in the log:
    (in red) Invalid index key.
    (in red) Invalid record count.
    (in red) The volume Macintosh HD could not be verified completely.
    (in black) File system check exit code is 8.
    (in red) Error: This disk needs to be repaired. Click Repair Disk.
    A pop-up message says:
    Disk Utility stopped verifying "Macintosh HD"
    This disk needs to be repaired.
    I click an "ok" box, but the Repair Disk button is not available.
    At this point, I noticed the "mount" button is available. If I click this, it says:
    Mount Failed
    The disk "Macintosh HD" could not be mounted.
    Try running First Aid on the disk and then retry mounting.
    Of course, the only option in First Aid is Verify Disk, which I have already done.
    I also tried reinstalling OS X from safe mode, but the installation failed. I would ideally like to fix this without losing any data, but my computer is backed up so it won't be terrible if I have to start fresh. My SSD failed on my macbook air 2012, so I hope this isn't happening again.
    Thank you.

    Startup Issues - Resolve
    Startup Issues - Resolve (2)
    Startup Issues - Resolve (3)

  • Invalid Index in Web Report

    Post Author: mhamill
    CA Forum: .NET
    I have a report which is being published and viewed on the web via a CrystalReportViewer app to display the reports (.rpt files)All other reports are running fine.
    When I run this new report in Crystal on my desktop- It works fine.  When I publish to the web I get this error:
    System.Runtime.InteropServices.COMException: Invalid index
    &#91;COMException (0x8002000b): Invalid index.&#93;   CrystalDecisions.ReportAppServer.DataDefModel.FieldsClass.get_Item(Int32 Index) +0   CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitions.get_Item(Int32 index) +30   CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitions.get_Item(String fieldName) +46   CrystalDecisions.CrystalReports.Engine.ReportDocument.SetParameterValue(String name, Object val) +144   webViewer.webViewer.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\reportTool\webViewer\webViewer.aspx.vb:68   System.Web.UI.Control.OnLoad(EventArgs e) +67   System.Web.UI.Control.LoadRecursive() +35   System.Web.UI.Page.ProcessRequestMain() +750
    I have REMOVED the parameter field from the report and still get this error.  When I view the SQL there is no WHERE clause in the statement.
    Any Ideas?  It is an elaborate report and I dont want to start over.  

    Post Author: alembic
    CA Forum: .NET
    Hi, were you able to resolve this problem? I'm getting the same exception when I deploy my report. It works fine on my development machine. The only difference in my case is that SetParameterValue bombs when I try to set a value for a subreport parameter.

  • Invalid Index Error when Report is run on Web

    Post Author: mhamill
    CA Forum: Crystal Reports
    I have a report which is being published and viewed on the web via a CrystalReportViewer app to display the reports (.rpt files)All other reports are running fine.
    When I run this new report in Crystal on my desktop- It works fine.  When I publish to the web I get this error:
    System.Runtime.InteropServices.COMException: Invalid index
    &#91;COMException (0x8002000b): Invalid index.&#93;   CrystalDecisions.ReportAppServer.DataDefModel.FieldsClass.get_Item(Int32 Index) +0   CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitions.get_Item(Int32 index) +30   CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinitions.get_Item(String fieldName) +46   CrystalDecisions.CrystalReports.Engine.ReportDocument.SetParameterValue(String name, Object val) +144   webViewer.webViewer.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\reportTool\webViewer\webViewer.aspx.vb:68   System.Web.UI.Control.OnLoad(EventArgs e) +67   System.Web.UI.Control.LoadRecursive() +35   System.Web.UI.Page.ProcessRequestMain() +750
    I have REMOVED the parameter field from the report and still get this error.  When I view the SQL there is no WHERE clause in the statement.
    Any Ideas?  It is an elaborate report and I dont want to start over.  

    Post Author: Ted Ueda
    CA Forum: JAVA
    The PSReportFactory service, CR Page Server, is only for viewing Crystal Report formats, and not instances in other formats.
    For the other formats, ensure you list the SI_FILES property in the InfoStore query, then cast the resulting InfoObject to IContent.  The IContent interface support methods to stream the file content from the File Repository Server.
    Sincerely,
    Ted Ueda

  • Oracle.security.jazn.JAZNRuntimeException: Invalid index

    Hi all,
    I'm getting this exception very often:
    oracle.security.jazn.JAZNRuntimeException: Invalid index
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:480)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:583)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:334)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:942)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:843)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:658)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:626)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:417)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:163)
         at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.java:275)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:237)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:29)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:877)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.IllegalStateException: Invalid index
         at org.apache.myfaces.trinidad.bean.util.StateUtils.restoreKey(StateUtils.java:68)
         at org.apache.myfaces.trinidad.bean.util.StateUtils.restoreState(StateUtils.java:142)
         at org.apache.myfaces.trinidad.bean.util.FlaggedPropertyMap.restoreState(FlaggedPropertyMap.java:194)
         at org.apache.myfaces.trinidad.bean.FacesBeanImpl.restoreState(FacesBeanImpl.java:342)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.restoreState(UIXComponentBase.java:898)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:57)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)...{code}
    Usualy when I click on refresh button on browser and in many other cases that I can't recognize as some rule...
    Thanks in advance,
    s o v i e t                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi Frank!
    This error occur for me when I have "pending" PPR and I start a new one (e.g. fast clicking same button twice). Also, it may happen when I have pending lazy fetching of some table or graph and I hit some action button, or when I refresh a page using browser refresh button (while PPR is still not finished).
    And I notice that it doesn't occur when I don't use ADF Controller.
    I have not found cause nor workaround, expect to keep users patient until the PPR is finished (blocking attribute is not working in TP4, and your very nice glasspane trick is not appropriate for each and every button click).
    Regards,
    PaKo

  • Invalid Index in Crystal Report

    Hello,
    I have written a code which displays records in the crystal report filtered by a textbox in the windows form. I wanted to pass the value of the textbox into the parameter field found in the header of the report. Please help anyone.
    SqlConnection conn = conString.getCon();
    ReportDocument cy = new ReportDocument();
    dt1 ds = new dt1();
    conn.Open();
    cy.Load(Application.StartupPath + @"\crpt.rpt");
    SqlDataAdapter da = new SqlDataAdapter("exec viewInfo @gen", conn);
    da.SelectCommand.Parameters.AddWithValue("@gen", txtGender.Text);
    da.Fill(ds.Info);
    cy.SetDataSource(ds);
    cy.SetParameterValue("gName", txtGender.Text); // prompts invalid index although I did check this already
    //Everything works except this line
    crystalReportViewer1.ReportSource = cy;
    conn.Close();
    Thanks in advance.

    Hi dptmpc,
    Thank you for posting in MSDN forum.
    Since
    this forum is to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.
    Based on your issue, since this Crystal Report is a third-party report, we are not support it. So I suggest you could try to consult this issue to this Crystal Report site:http://scn.sap.com/community/crystal-reports/content?filterID=contentstatus%5bpublished%5d~objecttype~objecttype%5bthread%5d
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • WARNING: Invalid index...

    Hi all,
    When I insert my declarative component on simple jspx page, doubleclicking on submit button page crashes.
    Debugging log:
    May 9, 2008 3:11:20 PM oracle.security.jazn.oc4j.JAZNFilter doFilter
    WARNING: Invalid index
    java.lang.IllegalStateException: Invalid index
         at org.apache.myfaces.trinidad.bean.util.StateUtils.restoreKey(StateUtils.java:68)
         at org.apache.myfaces.trinidad.bean.util.StateUtils.restoreState(StateUtils.java:142)
         at org.apache.myfaces.trinidad.bean.util.FlaggedPropertyMap.restoreState(FlaggedPropertyMap.java:194)
         at org.apache.myfaces.trinidad.bean.FacesBeanImpl.restoreState(FacesBeanImpl.java:342)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.restoreState(UIXComponentBase.java:898)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:57)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
    ...and error in browser:
    500 Internal Server Error
    oracle.security.jazn.JAZNRuntimeException: Invalid index
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:480)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:583)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:334)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:942)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:843)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:658)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:626)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:417)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:163)
         at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.java:275)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
         at java.lang.Thread.run(Thread.java:595)My declarative component contains single af:inputText and af:popup that I open and close using javascript...
    Can someone help me on this?
    Thanks in advance,
    s o v i e t

    Frank,
    I'm using FireFox 2.0.0.14.
    I'm not sure what causing this error but it's very common...
    I'm using declarative components in my application...
    Could this be the reason?
    At first glance I thought that this is the reason, but it appears on pages without declarative components... Now I'm not sure...
    500 Internal Server Error
    oracle.security.jazn.JAZNRuntimeException: Invalid index
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:480)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:583)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:334)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:942)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:843)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:658)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:626)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:417)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:163)
         at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.java:275)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:237)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:29)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:877)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.IllegalStateException: Invalid index
         at org.apache.myfaces.trinidad.bean.util.StateUtils.restoreKey(StateUtils.java:68)
         at org.apache.myfaces.trinidad.bean.util.StateUtils.restoreState(StateUtils.java:142)
         at org.apache.myfaces.trinidad.bean.util.FlaggedPropertyMap.restoreState(FlaggedPropertyMap.java:194)
         at org.apache.myfaces.trinidad.bean.FacesBeanImpl.restoreState(FacesBeanImpl.java:342)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.restoreState(UIXComponentBase.java:898)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:57)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:144)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at org.apache.myfaces.trinidad.component.TreeState.restoreState(TreeState.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.processRestoreState(UIXComponentBase.java:872)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1157)
         at org.apache.myfaces.trinidadinternal.application.StateManagerImpl.restoreView(StateManagerImpl.java:597)
         at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:290)
         at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:193)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:260)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._restoreView(LifecycleImpl.java:481)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:252)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adfinternal.view.faces.webapp.rich.SharedLibraryFilter.doFilter(SharedLibraryFilter.java:135)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:69)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at oracle.adfinternal.view.faces.activedata.ADSFilter.doFilter(ADSFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:241)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:198)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:141)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:118)
         at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
         at oracle.security.jazn.oc4j.JAZNFilter$3.run(JAZNFilter.java:434)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:308)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:452)
         ... 16 moreRegards,
    s o v i e t

  • "Invalid Index Key" Error - External HFS+ Drive

    So I've got this external drive (Seagate Freeagent Go) that I formated with the Journaled filesystem. All of a sudden yesterday I could not access the drive after restarting my computer and when I could no longer see it on my desktop I opened Disk Utility. DU was able to see the drive and the partition but couldn't mount it, and when I ran a Verify/Repair I got the following:
    Verify and Repair volume “Artimis”
    Checking Journaled HFS Plus volume.
    Checking Extents Overflow file.
    Checking Catalog file.
    Invalid index key
    Rebuilding Catalog B-tree.
    The volume Artimis could not be repaired.
    Error: Filesystem verify or repair failed.
    Can anyone help me with a potential fix? I've had no power surges and had just been using the drive with no issues the night before

    It's possible that Disk Warrior may be able to repair the drive's directory. If not you will have to reformat it.

Maybe you are looking for