473,779 Members | 2,040 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vb script with alternate credential

14 New Member
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.

Expand|Select|Wrap|Line Numbers
  1. Set GetWMIRegProvider=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & StrLine & "\root\default:StdRegProv")
  2.  
Thanks
Nov 13 '06 #1
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.

Expand|Select|Wrap|Line Numbers
  1. Set GetWMIRegProvider=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & StrLine & "\root\default:StdRegProv")
  2.  
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?
Nov 13 '06 #2
delwar66
14 New Member
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
Expand|Select|Wrap|Line Numbers
  1. Const DISPLAY_REGKEY="HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY\"
  2.  
  3. Const DEBUGFILE="NUL"
  4.  
  5. Const DEBUGMODE=0
  6.  
  7. CompName  = Trim(inputbox("Enter name or IP address of local or remote computer"))
  8.  
  9. Set objArgs = WScript.Arguments
  10.  
  11. Set objFS = CreateObject("Scripting.FileSystemObject")
  12. Set objNewFile = objFS.CreateTextFile("monitor_Output.txt")
  13.  
  14. DebugOut "Execution Started " & cstr(now)
  15.  
  16. '------------------------------------------------------------------------
  17. GetMonitorInfo() 'just write the output to screen
  18. DebugOut "Execution Completed " & cstr(now)
  19.  
  20.  
  21. Function GetMonitorInfo()
  22. debugout "Getting all display devices"
  23. arrAllDisplays=GetAllDisplayDevicesInReg()
  24. debugout "Filtering display devices to monitors"
  25. arrAllMonitors=GetAllMonitorsFromAllDisplays(arrAllDisplays)
  26. debugout "Filtering monitors to active monitors"
  27. arrActiveMonitors=GetActiveMonitorsFromAllMonitors(arrAllMonitors)
  28. if ubound(arrActiveMonitors)=0 and arrActiveMonitors(0)="{ERROR}" then
  29. debugout "No active monitors found"
  30. strFormattedMonitorInfo="[Monitor_1]" & vbcrlf & "Monitor=Not Found" & vbcrlf & vbcrlf
  31. else
  32. debugout "Found active monitors"
  33. debugout "Retrieving EDID for all active monitors"
  34. arrActiveEDID=GetEDIDFromActiveMonitors(arrActiveMonitors)
  35. debugout "Parsing EDID/Windows data"
  36. arrParsedMonitorInfo=GetParsedMonitorInfo(arrActiveEDID,arrActiveMonitors)
  37. debugout "Formatting parsed data"
  38. strFormattedMonitorInfo=GetFormattedMonitorInfo(arrParsedMonitorInfo)
  39. end if
  40. debugout "Data retrieval completed"
  41. GetMonitorInfo=strFormattedMonitorInfo
  42. end function
  43.  
  44. Function GetFormattedMonitorInfo(arrParsedMonitorInfo)
  45. for tmpctr=0 to ubound(arrParsedMonitorInfo)
  46. tmpResult=split(arrParsedMonitorInfo(tmpctr),"|||")
  47. tmpOutput=tmpOutput & CompName & " monitor"  & vbcrlf & vbcrlf 
  48. tmpOutput=tmpOutput & "ManufacturerID = " & tmpResult(1) & vbcrlf
  49. tmpOutput=tmpOutput & "ManufactureDate = " & tmpResult(2) & vbcrlf
  50. tmpOutput=tmpOutput & "SerialNumber = " & tmpResult(0) & vbcrlf
  51. tmpOutput=tmpOutput & "ModelName = " & tmpResult(4) & vbcrlf
  52. next
  53. GetFormattedMonitorInfo=tmpOutput
  54. objNewFile.WriteLine CompName & " monitor"  & vbcrlf & vbcrlf
  55. objNewFile.WriteLine "ManufacturerID = " & tmpResult(1) & vbcrlf
  56. objNewFile.WriteLine "ManufactureDate = " & tmpResult(2) & vbcrlf
  57. objNewFile.WriteLine "SerialNumber = " & tmpResult(0) & vbcrlf
  58. objNewFile.WriteLine "ModelName = " & tmpResult(4) & vbcrlf
  59. Set objShell = Wscript.Createobject("Wscript.Shell")
  60. objShell.Run "monitor_output.txt"
  61. End Function
  62.  
  63. Function GetAllDisplayDevicesInReg()
  64. dim arrResult()
  65. redim arrResult(0)
  66. intArrResultIndex=-1
  67. arrtmpkeys=RegEnumKeys(DISPLAY_REGKEY)
  68. if vartype(arrtmpkeys)<>8204 then
  69. arrResult(0)="{ERROR}"
  70. GetAllDisplayDevicesInReg=false
  71. debugout "Display=Can't enum subkeys of display regkey"
  72. else
  73. for tmpctr=0 to ubound(arrtmpkeys)
  74. arrtmpkeys2=RegEnumKeys(DISPLAY_REGKEY & arrtmpkeys(tmpctr))
  75. for tmpctr2 = 0 to ubound(arrtmpkeys2)
  76. intArrResultIndex=intArrResultIndex+1
  77. redim preserve arrResult(intArrResultIndex)
  78. arrResult(intArrResultIndex)=DISPLAY_REGKEY & arrtmpkeys(tmpctr) & "\" & arrtmpkeys2(tmpctr2)
  79. debugout "Display=" & arrResult(intArrResultIndex)
  80. next 
  81. next
  82. end if
  83. GetAllDisplayDevicesInReg=arrResult
  84. End Function
  85.  
  86. Function GetAllMonitorsFromAllDisplays(arrRegKeys)
  87. dim arrResult()
  88. redim arrResult(0)
  89. intArrResultIndex=-1
  90. for tmpctr=0 to ubound(arrRegKeys)
  91. if IsDisplayDeviceAMonitor(arrRegKeys(tmpctr)) then
  92. intArrResultIndex=intArrResultIndex+1
  93. redim preserve arrResult(intArrResultIndex)
  94. arrResult(intArrResultIndex)=arrRegKeys(tmpctr)
  95. debugout "Monitor=" & arrResult(intArrResultIndex)
  96. end if
  97. next
  98. if intArrResultIndex=-1 then
  99. arrResult(0)="{ERROR}"
  100. debugout "Monitor=Unable to locate any monitors"
  101. end if
  102. GetAllMonitorsFromAllDisplays=arrResult
  103. End Function
  104.  
  105. Function IsDisplayDeviceAMonitor(strDisplayRegKey)
  106. arrtmpResult=RegGetMultiStringValue(strDisplayRegKey,"HardwareID")
  107. strtmpResult="|||" & join(arrtmpResult,"|||") & "|||"
  108. if instr(lcase(strtmpResult),"|||monitor\")=0 then
  109. debugout "MonitorCheck='" & strDisplayRegKey & "'|||is not a monitor"
  110. IsDisplayDeviceAMonitor=false
  111. else
  112. debugout "MonitorCheck='" & strDisplayRegKey & "'|||is a monitor"
  113. IsDisplayDeviceAMonitor=true
  114. end if
  115. End Function
  116.  
  117. Function GetActiveMonitorsFromAllMonitors(arrRegKeys)
  118. dim arrResult()
  119. redim arrResult(0)
  120. intArrResultIndex=-1
  121. for tmpctr=0 to ubound(arrRegKeys)
  122. if IsMonitorActive(arrRegKeys(tmpctr)) then
  123. intArrResultIndex=intArrResultIndex+1
  124. redim preserve arrResult(intArrResultIndex)
  125. arrResult(intArrResultIndex)=arrRegKeys(tmpctr)
  126. debugout "ActiveMonitor=" & arrResult(intArrResultIndex)
  127. end if
  128. next
  129.  
  130. if intArrResultIndex=-1 then
  131. arrResult(0)="{ERROR}"
  132. debugout "ActiveMonitor=Unable to locate any active monitors"
  133. end if
  134. GetActiveMonitorsFromAllMonitors=arrResult
  135. End Function
  136.  
  137. Function IsMonitorActive(strMonitorRegKey)
  138. arrtmpResult=RegEnumKeys(strMonitorRegKey)
  139. strtmpResult="|||" & join(arrtmpResult,"|||") & "|||"
  140. if instr(lcase(strtmpResult),"|||control|||")=0 then
  141. debugout "ActiveMonitorCheck='" & strMonitorRegKey & "'|||is not active"
  142. IsMonitorActive=false
  143. else
  144. debugout "ActiveMonitorCheck='" & strMonitorRegKey & "'|||is active"
  145. IsMonitorActive=true
  146. end if
  147. End Function
  148.  
  149. Function GetEDIDFromActiveMonitors(arrRegKeys)
  150. dim arrResult()
  151. redim arrResult(0)
  152. intArrResultIndex=-1
  153. for tmpctr=0 to ubound(arrRegKeys)
  154. strtmpResult=GetEDIDForMonitor(arrRegKeys(tmpctr))
  155. intArrResultIndex=intArrResultIndex+1
  156. redim preserve arrResult(intArrResultIndex)
  157. arrResult(intArrResultIndex)=strtmpResult
  158. debugout "GETEDID=" & arrRegKeys(tmpctr) & "|||EDID,Yes"
  159. next
  160.  
  161. if intArrResultIndex=-1 then
  162. arrResult(0)="{ERROR}"
  163. debugout "EDID=Unable to retrieve any edid"
  164. end if
  165. GetEDIDFromActiveMonitors=arrResult
  166. End Function
  167.  
  168. Function GetEDIDForMonitor(strMonitorRegKey)
  169. arrtmpResult=RegGetBinaryValue(strMonitorRegKey & "\Device Parameters","EDID")
  170. if vartype(arrtmpResult) <> 8204 then
  171. debugout "GetEDID=No EDID Found|||" & strMonitorRegKey
  172. GetEDIDForMonitor="{ERROR}"
  173. else
  174. for each bytevalue in arrtmpResult
  175. strtmpResult=strtmpResult & chr(bytevalue)
  176. next
  177. debugout "GetEDID=EDID Found|||" & strMonitorRegKey
  178. debugout "GetEDID_Result=" & GetHexFromString(strtmpResult)
  179. GetEDIDForMonitor=strtmpResult
  180. end if
  181. End Function
  182.  
  183. Function GetHexFromString(strText)
  184. for tmpctr=1 to len(strText)
  185. tmpresult=tmpresult & right( "0" & hex(asc(mid(strText,tmpctr,1))),2) & ","
  186. next
  187. GetHexFromString=left(tmpresult,len(tmpresult)-1)
  188. End Function
  189.  
  190. Function GetParsedMonitorInfo(arrActiveEDID,arrActiveMonitors)
  191. dim arrResult()
  192. for tmpctr=0 to ubound(arrActiveEDID)
  193. strSerial=GetSerialFromEDID(arrActiveEDID(tmpctr))
  194. strMfg=GetMfgFromEDID(arrActiveEDID(tmpctr))
  195. strMfgDate=GetMfgDateFromEDID(arrActiveEDID(tmpctr))
  196. strDev=GetDevFromEDID(arrActiveEDID(tmpctr))
  197. strModel=GetModelFromEDID(arrActiveEDID(tmpctr))
  198. strEDIDVer=GetEDIDVerFromEDID(arrActiveEDID(tmpctr))
  199. strWinVesaID=GetWinVESAIDFromRegKey(arrActiveMonitors(tmpctr))
  200. strWinPNPID=GetWinPNPFromRegKey(arrActiveMonitors(tmpctr))
  201. redim preserve arrResult(tmpctr)
  202. arrResult(tmpctr)=arrResult(tmpctr) & strSerial & "|||"
  203. arrResult(tmpctr)=arrResult(tmpctr) & strMfg & "|||"
  204. arrResult(tmpctr)=arrResult(tmpctr) & strMfgDate & "|||"
  205. arrResult(tmpctr)=arrResult(tmpctr) & strDev & "|||"
  206. arrResult(tmpctr)=arrResult(tmpctr) & strModel & "|||"
  207. arrResult(tmpctr)=arrResult(tmpctr) & strEDIDVer & "|||"
  208. arrResult(tmpctr)=arrResult(tmpctr) & strWinVesaID & "|||"
  209. arrResult(tmpctr)=arrResult(tmpctr) & strWinPNPID
  210. debugout arrResult(tmpctr)
  211. next
  212. GetParsedMonitorInfo=arrResult
  213. End Function
  214.  
  215. Function GetWinVESAIDFromRegKey(strRegKey)
  216. if strRegKey="{ERROR}" then
  217. GetWinVESAIDFromRegKey="Bad Registry Info"
  218. exit function
  219. end if
  220. strtmpResult=right(strRegKey,len(strRegkey)-len(DISPLAY_REGKEY))
  221. strtmpResult=left(strtmpResult,instr(strtmpResult,"\")-1) 
  222. GetWinVESAIDFromRegKey=strtmpResult
  223. End Function
  224.  
  225. Function GetWinPNPFromRegKey(strRegKey)
  226. if strRegKey="{ERROR}" then
  227. GetWinPNPFromRegKey="Bad Registry Info"
  228. exit function
  229. end if 
  230. strtmpResult=right(strRegKey,len(strRegkey)-len(DISPLAY_REGKEY))
  231. strtmpResult=right(strtmpResult,len(strtmpResult)-instr(strtmpResult,"\"))
  232. GetWinPNPFromRegKey=strtmpResult
  233. End Function
  234.  
Nov 13 '06 #3
delwar66
14 New Member
Hi Sashi,
Here is the 2nd half

Expand|Select|Wrap|Line Numbers
  1. Function GetSerialFromEDID(strEDID)
  2. 'a serial number descriptor will start with &H00 00 00 ff
  3. strTag=chr(&H00) & chr(&H00) & chr(&H00) & chr(&Hff)
  4. GetSerialFromEDID=GetDescriptorBlockFromEDID(strEDID,strTag)
  5. End Function
  6.  
  7. Function GetModelFromEDID(strEDID)
  8.  
  9. strTag=chr(&H00) & chr(&H00) & chr(&H00) & chr(&Hfc)
  10. GetModelFromEDID=GetDescriptorBlockFromEDID(strEDID,strTag)
  11. End Function
  12.  
  13. Function GetDescriptorBlockFromEDID(strEDID,strTag)
  14. if strEDID="{ERROR}" then
  15. GetDescriptorBlockFromEDID="Bad EDID"
  16. exit function
  17. end if
  18.  
  19. dim arrDescriptorBlock(3)
  20. arrDescriptorBlock(0)=mid(strEDID,&H36+1,18)
  21. arrDescriptorBlock(1)=mid(strEDID,&H48+1,18)
  22. arrDescriptorBlock(2)=mid(strEDID,&H5a+1,18)
  23. arrDescriptorBlock(3)=mid(strEDID,&H6c+1,18)
  24.  
  25. if instr(arrDescriptorBlock(0),strTag)>0 then
  26. strFoundBlock=arrDescriptorBlock(0)
  27. elseif instr(arrDescriptorBlock(1),strTag)>0 then
  28. strFoundBlock=arrDescriptorBlock(1)
  29. elseif instr(arrDescriptorBlock(2),strTag)>0 then
  30. strFoundBlock=arrDescriptorBlock(2)
  31. elseif instr(arrDescriptorBlock(3),strTag)>0 then
  32. strFoundBlock=arrDescriptorBlock(3)
  33. else
  34. GetDescriptorBlockFromEDID="Not Present in EDID"
  35. exit function
  36. end if
  37.  
  38. strResult=right(strFoundBlock,14)
  39.  
  40. if instr(strResult,chr(&H0a))>0 then
  41. strResult=trim(left(strResult,instr(strResult,chr(&H0a))-1))
  42. else
  43. strResult=trim(strResult)
  44. end if
  45.  
  46. if left(strResult,1)=chr(0) then strResult=right(strResult,len(strResult)-1)
  47.  
  48. GetDescriptorBlockFromEDID=strResult
  49. End Function
  50.  
  51. Function GetMfgFromEDID(strEDID)
  52. if strEDID="{ERROR}" then
  53. GetMfgFromEDID="Bad EDID"
  54. exit function
  55. end if
  56.  
  57. tmpEDIDMfg=mid(strEDID,&H08+1,2) 
  58. Char1=0 : Char2=0 : Char3=0 
  59. Byte1=asc(left(tmpEDIDMfg,1)) 'get the first half of the string 
  60. Byte2=asc(right(tmpEDIDMfg,1)) 'get the first half of the string
  61.  
  62. if (Byte1 and 64) > 0 then Char1=Char1+16 
  63.  
  64. if (Byte1 and 32) > 0 then Char1=Char1+8 
  65.  
  66. if (Byte1 and 16) > 0 then Char1=Char1+4 
  67. if (Byte1 and 8) > 0 then Char1=Char1+2 
  68. if (Byte1 and 4) > 0 then Char1=Char1+1 
  69.  
  70. if (Byte1 and 2) > 0 then Char2=Char2+16 
  71. if (Byte1 and 1) > 0 then Char2=Char2+8 
  72.  
  73. if (Byte2 and 128) > 0 then Char2=Char2+4 
  74. if (Byte2 and 64) > 0 then Char2=Char2+2 
  75. if (Byte2 and 32) > 0 then Char2=Char2+1 
  76.  
  77. Char3=Char3+(Byte2 and 16) 
  78. Char3=Char3+(Byte2 and 8) 
  79. Char3=Char3+(Byte2 and 4) 
  80. Char3=Char3+(Byte2 and 2) 
  81. Char3=Char3+(Byte2 and 1) 
  82. tmpmfg=chr(Char1+64) & chr(Char2+64) & chr(Char3+64)
  83. GetMfgFromEDID=tmpmfg
  84. End Function
  85.  
  86. Function GetMfgDateFromEDID(strEDID)
  87. if strEDID="{ERROR}" then
  88. GetMfgDateFromEDID="Bad EDID"
  89. exit function
  90. end if
  91.  
  92. tmpmfgweek=asc(mid(strEDID,&H10+1,1))
  93.  
  94. tmpmfgyear=(asc(mid(strEDID,&H11+1,1)))+1990
  95.  
  96. tmpmdt=month(dateadd("ww",tmpmfgweek,datevalue("1/1/" & tmpmfgyear))) & "/" & tmpmfgyear
  97. GetMfgDateFromEDID=tmpmdt
  98. End Function
  99.  
  100. Function GetDevFromEDID(strEDID)
  101. if strEDID="{ERROR}" then
  102. GetDevFromEDID="Bad EDID"
  103. exit function
  104. end if
  105. tmpEDIDDev1=hex(asc(mid(strEDID,&H0a+1,1)))
  106. tmpEDIDDev2=hex(asc(mid(strEDID,&H0b+1,1)))
  107. if len(tmpEDIDDev1)=1 then tmpEDIDDev1="0" & tmpEDIDDev1
  108. if len(tmpEDIDDev2)=1 then tmpEDIDDev2="0" & tmpEDIDDev2
  109. tmpdev=tmpEDIDDev2 & tmpEDIDDev1
  110. GetDevFromEDID=tmpdev
  111. End Function
  112.  
  113. Function GetEDIDVerFromEDID(strEDID)
  114. if strEDID="{ERROR}" then
  115. GetEDIDVerFromEDID="Bad EDID"
  116. exit function
  117. end if
  118.  
  119. tmpEDIDMajorVer=asc(mid(strEDID,&H12+1,1))
  120.  
  121. tmpEDIDRev=asc(mid(strEDID,&H13+1,1))
  122.  
  123. tmpver=chr(48+tmpEDIDMajorVer) & "." & chr(48+tmpEDIDRev)
  124. GetEDIDVerFromEDID=tmpver
  125. End Function
  126.  
  127. Function RegEnumKeys(RegKey)
  128. hive=SetHive(RegKey)
  129. set objReg=GetWMIRegProvider(CompName)
  130. strKeyPath = right(RegKey,len(RegKey)-instr(RegKey,"\"))
  131. objReg.EnumKey Hive, strKeyPath, arrSubKeys
  132. RegEnumKeys=arrSubKeys
  133. End Function
  134.  
  135. Function RegGetStringValue(RegKey,RegValueName)
  136. hive=SetHive(RegKey)
  137. set objReg=GetWMIRegProvider(CompName)
  138. strKeyPath = right(RegKey,len(RegKey)-instr(RegKey,"\"))
  139. tmpreturn=objReg.GetStringValue(Hive, strKeyPath, RegValueName, RegValue)
  140. if tmpreturn=0 then
  141. RegGetStringValue=RegValue
  142. else
  143. RegGetStringValue="~{{}}~"
  144. end if
  145. End Function
  146.  
  147. Function RegGetMultiStringValue(RegKey,RegValueName)
  148. hive=SetHive(RegKey)
  149. set objReg=GetWMIRegProvider(CompName)
  150. strKeyPath = right(RegKey,len(RegKey)-instr(RegKey,"\"))
  151. tmpreturn=objReg.GetMultiStringValue(Hive, strKeyPath, RegValueName, RegValue)
  152. if tmpreturn=0 then
  153. RegGetMultiStringValue=RegValue
  154. else
  155. RegGetMultiStringValue="~{{}}~"
  156. end if
  157. End Function
  158.  
  159. Function RegGetBinaryValue(RegKey,RegValueName)
  160. hive=SetHive(RegKey)
  161. set objReg=GetWMIRegProvider(CompName)
  162. strKeyPath = right(RegKey,len(RegKey)-instr(RegKey,"\"))
  163. tmpreturn=objReg.GetBinaryValue(Hive, strKeyPath, RegValueName, RegValue)
  164. if tmpreturn=0 then
  165. RegGetBinaryValue=RegValue
  166. else
  167. RegGetBinaryValue="~{{}}~"
  168. end if
  169. End Function
  170.  
  171. On Error Resume Next
  172. Function GetWMIRegProvider(CompName)
  173.  
  174. Set GetWMIRegProvider=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & CompName & "\root\default:StdRegProv")
  175. End Function
  176.  
  177. Function SetHive(RegKey)
  178. HKEY_CLASSES_ROOT=&H80000000
  179. HKEY_CURRENT_USER=&H80000001
  180. HKEY_CURRENT_CONFIG=&H80000005
  181. HKEY_LOCAL_MACHINE=&H80000002
  182. HKEY_USERS=&H80000003
  183. strHive=left(RegKey,instr(RegKey,"\"))
  184. if strHive="HKCR\" or strHive="HKR\" then SetHive=HKEY_CLASSES_ROOT
  185. if strHive="HKCU\" then SetHive=HKEY_CURRENT_USER
  186. if strHive="HKCC\" then SetHive=HKEY_CURRENT_CONFIG
  187. if strHive="HKLM\" then SetHive=HKEY_LOCAL_MACHINE
  188. if strHive="HKU\" then SetHive=HKEY_USERS
  189. End Function
  190.  
  191. Sub Pause
  192. set objStdin=wscript.stdin
  193. set objStdout=wscript.stdout
  194. objStdout.write "Press ENTER to continue..."
  195. strtmp=objStdin.readline
  196. end Sub
  197.  
  198. Sub DebugOut(strDebugInfo)
  199. if DEBUGMODE=0 then exit sub
  200. strCurrScriptHost=lcase(right(wscript.fullname,len(wscript.fullname)-len(wscript.path)-1))
  201. if strCurrScriptHost="cscript.exe" then wscript.echo "Debug: " & strDebugInfo
  202. AppendFileMode=8
  203. set objDebugFSO=CreateObject("Scripting.FileSystemObject")
  204. set objDebugStream=objDebugFSO.OpenTextFile(DEBUGFILE,AppendFileMode,True,False)
  205. objDebugStream.writeline strDebugInfo
  206. objDebugStream.Close
  207. set objDebugStream=Nothing
  208. set objDebugFSO=Nothing
  209. End Sub
  210.  
Nov 13 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1621
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'));">
1
4353
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...
1
6481
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
3
5176
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...
1
1398
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
2
1376
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.
0
1210
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
2
1980
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...
0
1472
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!
0
9633
marktang
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...
0
10305
Oralloy
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...
1
10074
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,...
0
9928
tracyyun
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...
0
8959
agi2029
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...
1
7483
isladogs
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...
0
6724
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();...
0
5373
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...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.