Can anyone help me with this this to run under alternate credentials. What would be proper syntax for that. pls explain and show me how if you can. -
Set GetWMIRegProvider=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & StrLine & "\root\default:StdRegProv")
-
Thanks
3 3177 sashi 1,754
Recognized Expert Top Contributor
Can anyone help me with this this to run under alternate credentials. What would be proper syntax for that. pls explain and show me how if you can. -
Set GetWMIRegProvider=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & StrLine & "\root\default:StdRegProv")
-
Thanks
Hi there,
Am not trying to be rude here, pls explain to me on how are you come up with such a line of code without properly understanding / uncertain about syntax? Are you copying it from somewhere on the net?
Hi Sashi,
Well, I have a scripts that collect the remote computer monitor information remotely but it only works now if you log on to a machine with administrator and if the remote machine and local machine has same administrator password. The script is too long, thats why i could not paste it here. But I will now in two separate post. pls have a look.
First Half -
Const DISPLAY_REGKEY="HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY\"
-
-
Const DEBUGFILE="NUL"
-
-
Const DEBUGMODE=0
-
-
CompName = Trim(inputbox("Enter name or IP address of local or remote computer"))
-
-
Set objArgs = WScript.Arguments
-
-
Set objFS = CreateObject("Scripting.FileSystemObject")
-
Set objNewFile = objFS.CreateTextFile("monitor_Output.txt")
-
-
DebugOut "Execution Started " & cstr(now)
-
-
'------------------------------------------------------------------------
-
GetMonitorInfo() 'just write the output to screen
-
DebugOut "Execution Completed " & cstr(now)
-
-
-
Function GetMonitorInfo()
-
debugout "Getting all display devices"
-
arrAllDisplays=GetAllDisplayDevicesInReg()
-
debugout "Filtering display devices to monitors"
-
arrAllMonitors=GetAllMonitorsFromAllDisplays(arrAllDisplays)
-
debugout "Filtering monitors to active monitors"
-
arrActiveMonitors=GetActiveMonitorsFromAllMonitors(arrAllMonitors)
-
if ubound(arrActiveMonitors)=0 and arrActiveMonitors(0)="{ERROR}" then
-
debugout "No active monitors found"
-
strFormattedMonitorInfo="[Monitor_1]" & vbcrlf & "Monitor=Not Found" & vbcrlf & vbcrlf
-
else
-
debugout "Found active monitors"
-
debugout "Retrieving EDID for all active monitors"
-
arrActiveEDID=GetEDIDFromActiveMonitors(arrActiveMonitors)
-
debugout "Parsing EDID/Windows data"
-
arrParsedMonitorInfo=GetParsedMonitorInfo(arrActiveEDID,arrActiveMonitors)
-
debugout "Formatting parsed data"
-
strFormattedMonitorInfo=GetFormattedMonitorInfo(arrParsedMonitorInfo)
-
end if
-
debugout "Data retrieval completed"
-
GetMonitorInfo=strFormattedMonitorInfo
-
end function
-
-
Function GetFormattedMonitorInfo(arrParsedMonitorInfo)
-
for tmpctr=0 to ubound(arrParsedMonitorInfo)
-
tmpResult=split(arrParsedMonitorInfo(tmpctr),"|||")
-
tmpOutput=tmpOutput & CompName & " monitor" & vbcrlf & vbcrlf
-
tmpOutput=tmpOutput & "ManufacturerID = " & tmpResult(1) & vbcrlf
-
tmpOutput=tmpOutput & "ManufactureDate = " & tmpResult(2) & vbcrlf
-
tmpOutput=tmpOutput & "SerialNumber = " & tmpResult(0) & vbcrlf
-
tmpOutput=tmpOutput & "ModelName = " & tmpResult(4) & vbcrlf
-
next
-
GetFormattedMonitorInfo=tmpOutput
-
objNewFile.WriteLine CompName & " monitor" & vbcrlf & vbcrlf
-
objNewFile.WriteLine "ManufacturerID = " & tmpResult(1) & vbcrlf
-
objNewFile.WriteLine "ManufactureDate = " & tmpResult(2) & vbcrlf
-
objNewFile.WriteLine "SerialNumber = " & tmpResult(0) & vbcrlf
-
objNewFile.WriteLine "ModelName = " & tmpResult(4) & vbcrlf
-
Set objShell = Wscript.Createobject("Wscript.Shell")
-
objShell.Run "monitor_output.txt"
-
End Function
-
-
Function GetAllDisplayDevicesInReg()
-
dim arrResult()
-
redim arrResult(0)
-
intArrResultIndex=-1
-
arrtmpkeys=RegEnumKeys(DISPLAY_REGKEY)
-
if vartype(arrtmpkeys)<>8204 then
-
arrResult(0)="{ERROR}"
-
GetAllDisplayDevicesInReg=false
-
debugout "Display=Can't enum subkeys of display regkey"
-
else
-
for tmpctr=0 to ubound(arrtmpkeys)
-
arrtmpkeys2=RegEnumKeys(DISPLAY_REGKEY & arrtmpkeys(tmpctr))
-
for tmpctr2 = 0 to ubound(arrtmpkeys2)
-
intArrResultIndex=intArrResultIndex+1
-
redim preserve arrResult(intArrResultIndex)
-
arrResult(intArrResultIndex)=DISPLAY_REGKEY & arrtmpkeys(tmpctr) & "\" & arrtmpkeys2(tmpctr2)
-
debugout "Display=" & arrResult(intArrResultIndex)
-
next
-
next
-
end if
-
GetAllDisplayDevicesInReg=arrResult
-
End Function
-
-
Function GetAllMonitorsFromAllDisplays(arrRegKeys)
-
dim arrResult()
-
redim arrResult(0)
-
intArrResultIndex=-1
-
for tmpctr=0 to ubound(arrRegKeys)
-
if IsDisplayDeviceAMonitor(arrRegKeys(tmpctr)) then
-
intArrResultIndex=intArrResultIndex+1
-
redim preserve arrResult(intArrResultIndex)
-
arrResult(intArrResultIndex)=arrRegKeys(tmpctr)
-
debugout "Monitor=" & arrResult(intArrResultIndex)
-
end if
-
next
-
if intArrResultIndex=-1 then
-
arrResult(0)="{ERROR}"
-
debugout "Monitor=Unable to locate any monitors"
-
end if
-
GetAllMonitorsFromAllDisplays=arrResult
-
End Function
-
-
Function IsDisplayDeviceAMonitor(strDisplayRegKey)
-
arrtmpResult=RegGetMultiStringValue(strDisplayRegKey,"HardwareID")
-
strtmpResult="|||" & join(arrtmpResult,"|||") & "|||"
-
if instr(lcase(strtmpResult),"|||monitor\")=0 then
-
debugout "MonitorCheck='" & strDisplayRegKey & "'|||is not a monitor"
-
IsDisplayDeviceAMonitor=false
-
else
-
debugout "MonitorCheck='" & strDisplayRegKey & "'|||is a monitor"
-
IsDisplayDeviceAMonitor=true
-
end if
-
End Function
-
-
Function GetActiveMonitorsFromAllMonitors(arrRegKeys)
-
dim arrResult()
-
redim arrResult(0)
-
intArrResultIndex=-1
-
for tmpctr=0 to ubound(arrRegKeys)
-
if IsMonitorActive(arrRegKeys(tmpctr)) then
-
intArrResultIndex=intArrResultIndex+1
-
redim preserve arrResult(intArrResultIndex)
-
arrResult(intArrResultIndex)=arrRegKeys(tmpctr)
-
debugout "ActiveMonitor=" & arrResult(intArrResultIndex)
-
end if
-
next
-
-
if intArrResultIndex=-1 then
-
arrResult(0)="{ERROR}"
-
debugout "ActiveMonitor=Unable to locate any active monitors"
-
end if
-
GetActiveMonitorsFromAllMonitors=arrResult
-
End Function
-
-
Function IsMonitorActive(strMonitorRegKey)
-
arrtmpResult=RegEnumKeys(strMonitorRegKey)
-
strtmpResult="|||" & join(arrtmpResult,"|||") & "|||"
-
if instr(lcase(strtmpResult),"|||control|||")=0 then
-
debugout "ActiveMonitorCheck='" & strMonitorRegKey & "'|||is not active"
-
IsMonitorActive=false
-
else
-
debugout "ActiveMonitorCheck='" & strMonitorRegKey & "'|||is active"
-
IsMonitorActive=true
-
end if
-
End Function
-
-
Function GetEDIDFromActiveMonitors(arrRegKeys)
-
dim arrResult()
-
redim arrResult(0)
-
intArrResultIndex=-1
-
for tmpctr=0 to ubound(arrRegKeys)
-
strtmpResult=GetEDIDForMonitor(arrRegKeys(tmpctr))
-
intArrResultIndex=intArrResultIndex+1
-
redim preserve arrResult(intArrResultIndex)
-
arrResult(intArrResultIndex)=strtmpResult
-
debugout "GETEDID=" & arrRegKeys(tmpctr) & "|||EDID,Yes"
-
next
-
-
if intArrResultIndex=-1 then
-
arrResult(0)="{ERROR}"
-
debugout "EDID=Unable to retrieve any edid"
-
end if
-
GetEDIDFromActiveMonitors=arrResult
-
End Function
-
-
Function GetEDIDForMonitor(strMonitorRegKey)
-
arrtmpResult=RegGetBinaryValue(strMonitorRegKey & "\Device Parameters","EDID")
-
if vartype(arrtmpResult) <> 8204 then
-
debugout "GetEDID=No EDID Found|||" & strMonitorRegKey
-
GetEDIDForMonitor="{ERROR}"
-
else
-
for each bytevalue in arrtmpResult
-
strtmpResult=strtmpResult & chr(bytevalue)
-
next
-
debugout "GetEDID=EDID Found|||" & strMonitorRegKey
-
debugout "GetEDID_Result=" & GetHexFromString(strtmpResult)
-
GetEDIDForMonitor=strtmpResult
-
end if
-
End Function
-
-
Function GetHexFromString(strText)
-
for tmpctr=1 to len(strText)
-
tmpresult=tmpresult & right( "0" & hex(asc(mid(strText,tmpctr,1))),2) & ","
-
next
-
GetHexFromString=left(tmpresult,len(tmpresult)-1)
-
End Function
-
-
Function GetParsedMonitorInfo(arrActiveEDID,arrActiveMonitors)
-
dim arrResult()
-
for tmpctr=0 to ubound(arrActiveEDID)
-
strSerial=GetSerialFromEDID(arrActiveEDID(tmpctr))
-
strMfg=GetMfgFromEDID(arrActiveEDID(tmpctr))
-
strMfgDate=GetMfgDateFromEDID(arrActiveEDID(tmpctr))
-
strDev=GetDevFromEDID(arrActiveEDID(tmpctr))
-
strModel=GetModelFromEDID(arrActiveEDID(tmpctr))
-
strEDIDVer=GetEDIDVerFromEDID(arrActiveEDID(tmpctr))
-
strWinVesaID=GetWinVESAIDFromRegKey(arrActiveMonitors(tmpctr))
-
strWinPNPID=GetWinPNPFromRegKey(arrActiveMonitors(tmpctr))
-
redim preserve arrResult(tmpctr)
-
arrResult(tmpctr)=arrResult(tmpctr) & strSerial & "|||"
-
arrResult(tmpctr)=arrResult(tmpctr) & strMfg & "|||"
-
arrResult(tmpctr)=arrResult(tmpctr) & strMfgDate & "|||"
-
arrResult(tmpctr)=arrResult(tmpctr) & strDev & "|||"
-
arrResult(tmpctr)=arrResult(tmpctr) & strModel & "|||"
-
arrResult(tmpctr)=arrResult(tmpctr) & strEDIDVer & "|||"
-
arrResult(tmpctr)=arrResult(tmpctr) & strWinVesaID & "|||"
-
arrResult(tmpctr)=arrResult(tmpctr) & strWinPNPID
-
debugout arrResult(tmpctr)
-
next
-
GetParsedMonitorInfo=arrResult
-
End Function
-
-
Function GetWinVESAIDFromRegKey(strRegKey)
-
if strRegKey="{ERROR}" then
-
GetWinVESAIDFromRegKey="Bad Registry Info"
-
exit function
-
end if
-
strtmpResult=right(strRegKey,len(strRegkey)-len(DISPLAY_REGKEY))
-
strtmpResult=left(strtmpResult,instr(strtmpResult,"\")-1)
-
GetWinVESAIDFromRegKey=strtmpResult
-
End Function
-
-
Function GetWinPNPFromRegKey(strRegKey)
-
if strRegKey="{ERROR}" then
-
GetWinPNPFromRegKey="Bad Registry Info"
-
exit function
-
end if
-
strtmpResult=right(strRegKey,len(strRegkey)-len(DISPLAY_REGKEY))
-
strtmpResult=right(strtmpResult,len(strtmpResult)-instr(strtmpResult,"\"))
-
GetWinPNPFromRegKey=strtmpResult
-
End Function
-
Hi Sashi,
Here is the 2nd half -
Function GetSerialFromEDID(strEDID)
-
'a serial number descriptor will start with &H00 00 00 ff
-
strTag=chr(&H00) & chr(&H00) & chr(&H00) & chr(&Hff)
-
GetSerialFromEDID=GetDescriptorBlockFromEDID(strEDID,strTag)
-
End Function
-
-
Function GetModelFromEDID(strEDID)
-
-
strTag=chr(&H00) & chr(&H00) & chr(&H00) & chr(&Hfc)
-
GetModelFromEDID=GetDescriptorBlockFromEDID(strEDID,strTag)
-
End Function
-
-
Function GetDescriptorBlockFromEDID(strEDID,strTag)
-
if strEDID="{ERROR}" then
-
GetDescriptorBlockFromEDID="Bad EDID"
-
exit function
-
end if
-
-
dim arrDescriptorBlock(3)
-
arrDescriptorBlock(0)=mid(strEDID,&H36+1,18)
-
arrDescriptorBlock(1)=mid(strEDID,&H48+1,18)
-
arrDescriptorBlock(2)=mid(strEDID,&H5a+1,18)
-
arrDescriptorBlock(3)=mid(strEDID,&H6c+1,18)
-
-
if instr(arrDescriptorBlock(0),strTag)>0 then
-
strFoundBlock=arrDescriptorBlock(0)
-
elseif instr(arrDescriptorBlock(1),strTag)>0 then
-
strFoundBlock=arrDescriptorBlock(1)
-
elseif instr(arrDescriptorBlock(2),strTag)>0 then
-
strFoundBlock=arrDescriptorBlock(2)
-
elseif instr(arrDescriptorBlock(3),strTag)>0 then
-
strFoundBlock=arrDescriptorBlock(3)
-
else
-
GetDescriptorBlockFromEDID="Not Present in EDID"
-
exit function
-
end if
-
-
strResult=right(strFoundBlock,14)
-
-
if instr(strResult,chr(&H0a))>0 then
-
strResult=trim(left(strResult,instr(strResult,chr(&H0a))-1))
-
else
-
strResult=trim(strResult)
-
end if
-
-
if left(strResult,1)=chr(0) then strResult=right(strResult,len(strResult)-1)
-
-
GetDescriptorBlockFromEDID=strResult
-
End Function
-
-
Function GetMfgFromEDID(strEDID)
-
if strEDID="{ERROR}" then
-
GetMfgFromEDID="Bad EDID"
-
exit function
-
end if
-
-
tmpEDIDMfg=mid(strEDID,&H08+1,2)
-
Char1=0 : Char2=0 : Char3=0
-
Byte1=asc(left(tmpEDIDMfg,1)) 'get the first half of the string
-
Byte2=asc(right(tmpEDIDMfg,1)) 'get the first half of the string
-
-
if (Byte1 and 64) > 0 then Char1=Char1+16
-
-
if (Byte1 and 32) > 0 then Char1=Char1+8
-
-
if (Byte1 and 16) > 0 then Char1=Char1+4
-
if (Byte1 and 8) > 0 then Char1=Char1+2
-
if (Byte1 and 4) > 0 then Char1=Char1+1
-
-
if (Byte1 and 2) > 0 then Char2=Char2+16
-
if (Byte1 and 1) > 0 then Char2=Char2+8
-
-
if (Byte2 and 128) > 0 then Char2=Char2+4
-
if (Byte2 and 64) > 0 then Char2=Char2+2
-
if (Byte2 and 32) > 0 then Char2=Char2+1
-
-
Char3=Char3+(Byte2 and 16)
-
Char3=Char3+(Byte2 and 8)
-
Char3=Char3+(Byte2 and 4)
-
Char3=Char3+(Byte2 and 2)
-
Char3=Char3+(Byte2 and 1)
-
tmpmfg=chr(Char1+64) & chr(Char2+64) & chr(Char3+64)
-
GetMfgFromEDID=tmpmfg
-
End Function
-
-
Function GetMfgDateFromEDID(strEDID)
-
if strEDID="{ERROR}" then
-
GetMfgDateFromEDID="Bad EDID"
-
exit function
-
end if
-
-
tmpmfgweek=asc(mid(strEDID,&H10+1,1))
-
-
tmpmfgyear=(asc(mid(strEDID,&H11+1,1)))+1990
-
-
tmpmdt=month(dateadd("ww",tmpmfgweek,datevalue("1/1/" & tmpmfgyear))) & "/" & tmpmfgyear
-
GetMfgDateFromEDID=tmpmdt
-
End Function
-
-
Function GetDevFromEDID(strEDID)
-
if strEDID="{ERROR}" then
-
GetDevFromEDID="Bad EDID"
-
exit function
-
end if
-
tmpEDIDDev1=hex(asc(mid(strEDID,&H0a+1,1)))
-
tmpEDIDDev2=hex(asc(mid(strEDID,&H0b+1,1)))
-
if len(tmpEDIDDev1)=1 then tmpEDIDDev1="0" & tmpEDIDDev1
-
if len(tmpEDIDDev2)=1 then tmpEDIDDev2="0" & tmpEDIDDev2
-
tmpdev=tmpEDIDDev2 & tmpEDIDDev1
-
GetDevFromEDID=tmpdev
-
End Function
-
-
Function GetEDIDVerFromEDID(strEDID)
-
if strEDID="{ERROR}" then
-
GetEDIDVerFromEDID="Bad EDID"
-
exit function
-
end if
-
-
tmpEDIDMajorVer=asc(mid(strEDID,&H12+1,1))
-
-
tmpEDIDRev=asc(mid(strEDID,&H13+1,1))
-
-
tmpver=chr(48+tmpEDIDMajorVer) & "." & chr(48+tmpEDIDRev)
-
GetEDIDVerFromEDID=tmpver
-
End Function
-
-
Function RegEnumKeys(RegKey)
-
hive=SetHive(RegKey)
-
set objReg=GetWMIRegProvider(CompName)
-
strKeyPath = right(RegKey,len(RegKey)-instr(RegKey,"\"))
-
objReg.EnumKey Hive, strKeyPath, arrSubKeys
-
RegEnumKeys=arrSubKeys
-
End Function
-
-
Function RegGetStringValue(RegKey,RegValueName)
-
hive=SetHive(RegKey)
-
set objReg=GetWMIRegProvider(CompName)
-
strKeyPath = right(RegKey,len(RegKey)-instr(RegKey,"\"))
-
tmpreturn=objReg.GetStringValue(Hive, strKeyPath, RegValueName, RegValue)
-
if tmpreturn=0 then
-
RegGetStringValue=RegValue
-
else
-
RegGetStringValue="~{{}}~"
-
end if
-
End Function
-
-
Function RegGetMultiStringValue(RegKey,RegValueName)
-
hive=SetHive(RegKey)
-
set objReg=GetWMIRegProvider(CompName)
-
strKeyPath = right(RegKey,len(RegKey)-instr(RegKey,"\"))
-
tmpreturn=objReg.GetMultiStringValue(Hive, strKeyPath, RegValueName, RegValue)
-
if tmpreturn=0 then
-
RegGetMultiStringValue=RegValue
-
else
-
RegGetMultiStringValue="~{{}}~"
-
end if
-
End Function
-
-
Function RegGetBinaryValue(RegKey,RegValueName)
-
hive=SetHive(RegKey)
-
set objReg=GetWMIRegProvider(CompName)
-
strKeyPath = right(RegKey,len(RegKey)-instr(RegKey,"\"))
-
tmpreturn=objReg.GetBinaryValue(Hive, strKeyPath, RegValueName, RegValue)
-
if tmpreturn=0 then
-
RegGetBinaryValue=RegValue
-
else
-
RegGetBinaryValue="~{{}}~"
-
end if
-
End Function
-
-
On Error Resume Next
-
Function GetWMIRegProvider(CompName)
-
-
Set GetWMIRegProvider=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & CompName & "\root\default:StdRegProv")
-
End Function
-
-
Function SetHive(RegKey)
-
HKEY_CLASSES_ROOT=&H80000000
-
HKEY_CURRENT_USER=&H80000001
-
HKEY_CURRENT_CONFIG=&H80000005
-
HKEY_LOCAL_MACHINE=&H80000002
-
HKEY_USERS=&H80000003
-
strHive=left(RegKey,instr(RegKey,"\"))
-
if strHive="HKCR\" or strHive="HKR\" then SetHive=HKEY_CLASSES_ROOT
-
if strHive="HKCU\" then SetHive=HKEY_CURRENT_USER
-
if strHive="HKCC\" then SetHive=HKEY_CURRENT_CONFIG
-
if strHive="HKLM\" then SetHive=HKEY_LOCAL_MACHINE
-
if strHive="HKU\" then SetHive=HKEY_USERS
-
End Function
-
-
Sub Pause
-
set objStdin=wscript.stdin
-
set objStdout=wscript.stdout
-
objStdout.write "Press ENTER to continue..."
-
strtmp=objStdin.readline
-
end Sub
-
-
Sub DebugOut(strDebugInfo)
-
if DEBUGMODE=0 then exit sub
-
strCurrScriptHost=lcase(right(wscript.fullname,len(wscript.fullname)-len(wscript.path)-1))
-
if strCurrScriptHost="cscript.exe" then wscript.echo "Debug: " & strDebugInfo
-
AppendFileMode=8
-
set objDebugFSO=CreateObject("Scripting.FileSystemObject")
-
set objDebugStream=objDebugFSO.OpenTextFile(DEBUGFILE,AppendFileMode,True,False)
-
objDebugStream.writeline strDebugInfo
-
objDebugStream.Close
-
set objDebugStream=Nothing
-
set objDebugFSO=Nothing
-
End Sub
-
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: VR |
last post by:
Hi,
I am trying to have a menu item (which is an HTML img) to
change as a mouse moves over it. So, my code looks
something like this:
<a
onmouseover="ActivateImage('MyImage');"
onmouseout="InactivateImage('MyImage');"
href="javascript:void(FollowLink('MyImage'));">
|
by: Eric Lindsay |
last post by:
I am trying to understand the differences between and uses of
persistent, default and alternate styles. I have read
http://www.w3.org/TR/REC-html40/present/styles.html section 14.3.2 on
specifying external style sheets in link using combinations of rel and
using or not using the title attribute.
I think I sort of understand rel="alternate stylesheet". It seems to be
able to act something like the media="print" or media="handheld" or...
|
by: Tedmond |
last post by:
Dear all,
I wrote a function to use WebClient to retrieve information from the Web.
It worked fine. However, the proxy setting of our firm has been changed.
Proxy authentication is required now but I have no idea how to set the
credential for the WebClient. I went through the .Net document and only
found an example of reading credentials. Can anyone give me the idea how to
set the WebClient credential?
Thanks for any help
|
by: Daniel Greene |
last post by:
Dear web writers,
My lucky web visitors who are using certain browsers can select one of
my style sheets out of a list, and see how my pages change "before
their very eyes." Cool! But what if they're using one of those browsers
that doesn't allow the user to select from a list of author's style
sheets? Is there a script I can write to create an object on the page
itself that allows users to see the magic of CSS in action? I know
there...
|
by: adiel_g |
last post by:
Does anyone know how to remove the required credential check for a web
service in VS2005?
There should be an option to remove the required credential check
since I will be running the
service in an intranet and will not require authentication. After I
remove the credential check,
I should be able to remove this line:
objSVC.Credentials = System.Net.CredentialCache.DefaultCredentials
| |
by: sweetpotatop |
last post by:
Hi,
I wonder how can I get the window/network credential from the user
machine thru' ASP.NET?
I have been using LDAP, however, the user will be prompted for
username and password at least once. Is there a way to get the user
credential without the dialog box?
Thanks in advance. Your help would be greatly appreciated.
|
by: Hayato Iriumi |
last post by:
Hello,
I poked around System.Threading.Thread and
System.Net.NetworkCredential to see if I could run a thread with a
different credential from the credential that the executable is
running under. I know that I can run the entire executable as a
different credential doing RunAs, but I'm wondering that is possible
at thread level.
TIA
|
by: Michael Bray |
last post by:
I have a client/server application that utilizes Impersonation on a TCP
Channel. So I create the channel with the version of the constructor
that takes an IDictionary of channel properties, and specify
"impersonate = true".
OK great - everything works - I can confirm on the server that the
process runs in the context of the user that is making the remote call
from the client.
However, I also want to give the user the ability to...
|
by: madankarmukta |
last post by:
Hi,
Can anyone tell me how the Credential Provider architecture works ..?
In Winodws NT all versions we use GINA for login process.. How does Credential Provider Paly the same role in Vista/Windows server 2008..?
Could I get any help with respect to this.I basically want to create my own credential provider , Hence keen to know all about this.
Thanks!
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |