Hi
Is anyone here who can help me to get this scripts running under alternate credentials.... ............. -
-
'''''''''''''''''''''''''''
-
-
'''''''''''''''''''''''''''
-
' Monitor EDID Information'
-
strComputer = Trim(inputbox("Enter name or IP address of local or remote computer"))
-
Dim oDisplaySubKeys : Set oDisplaySubKeys = CreateObject("Scripting.Dictionary")
-
Dim oRawEDID : Set oRawEDID = CreateObject("Scripting.Dictionary")
-
Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE
-
-
Int intMonitorCount=0
-
Int intDisplaySubKeysCount=0
-
Int i=0
-
-
Set oRegistry = GetObject("winmgmts:\\" & strComputer & "/root/default:StdRegProv")
-
strDisplayBaseKey = "SYSTEM\CurrentControlSet\Enum\DISPLAY\"
-
-
' Retrieving EISA-Id from HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY and storing in strarrDisplaySubKeys
-
iRC = oRegistry.EnumKey(HKLM, strDisplayBaseKey, strarrDisplaySubKeys)
-
-
' Deleting from strarrDisplaySubKeys "Default_Monitor" value
-
For Each sKey In strarrDisplaySubKeys
-
-
If sKey ="Default_Monitor" Then
-
intDisplaySubKeysCount=intDisplaySubKeysCount - 1
-
Else
-
oDisplaySubKeys.add sKey, intDisplaySubKeysCount
-
End If
-
-
intDisplaySubKeysCount=intDisplaySubKeysCount + 1
-
-
Next
-
-
' Storing result in oDisplaySubKeys
-
strResultDisplaySubKeys=oDisplaySubKeys.Keys
-
-
toto=0
-
-
For i = 0 to oDisplaySubKeys.Count -1
-
-
strEisaIdBaseKey = strDisplayBaseKey & strResultDisplaySubKeys(i) & "\"
-
-
' Retrieving Pnp-Id from HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY\EISA-Id and storing in strarrEisaIdSubKeys
-
iRC2 = oRegistry.EnumKey(HKLM, strEisaIdBaseKey, strarrEisaIdSubKeys)
-
-
For Each sKey2 In strarrEisaIdSubKeys
-
oRegistry.GetMultiStringValue HKLM, strEisaIdBaseKey & sKey2 & "\", "HardwareID", sValue
-
-
For tmpctr=0 to ubound(svalue)
-
-
If lcase(Left(svalue(tmpctr),8))="monitor\" then
-
-
strMsIdBaseKey = strEisaIdBaseKey & sKey2 & "\"
-
-
iRC3 = oRegistry.EnumKey(HKLM, strMsIdBaseKey, strarrMsIdSubKeys)
-
-
For Each sKey3 In strarrMsIdSubKeys
-
-
If skey3="Control" then
-
-
toto=toto + 1
-
-
oRegistry.GetBinaryValue HKLM, strMsIdBaseKey & "Device Parameters\", "EDID", intarrEDID
-
-
strRawEDID=""
-
strRawEDIDb=""
-
-
If vartype(intarrEDID) = 8204 then
-
-
For each strByteValue in intarrEDID
-
-
strRawEDID=strRawEDID & Chr(strByteValue)
-
strRawEDIDb=strRawEDIDb & Chr(strByteValue)
-
-
Next
-
-
Else
-
-
strRawEDID="EDID Not Available"
-
-
End If
-
-
-
oRawEDID.add intMonitorCount , strRawEDID
-
intMonitorCount=intMonitorCount + 1
-
-
End If
-
Next
-
End If
-
Next
-
Next
-
Next
-
-
-
-
'now the EDID info For each active monitor is stored in an dictionnary of strings called oRawEDID
-
'so we can process it to get the good stuff out of it which we will store in a 5 dimensional array
-
'called arrMonitorInfo, the dimensions are as follows:
-
'0=VESA Mfg ID, 1=VESA Device ID, 2=MFG Date (M/YYYY),3=Serial Num (If available),4=Model Descriptor
-
-
-
strResultRawEDID=oRawEDID.Keys
-
-
dim arrMonitorInfo()
-
redim arrMonitorInfo(intMonitorCount-1,5)
-
dim location(3)
-
-
-
-
For i=0 to oRawEDID.Count - 1
-
-
If oRawEDID(i) <> "EDID Not Available" then
-
-
-
-
location(0)=mid(oRawEDID(i),&H36+1,18)
-
location(1)=mid(oRawEDID(i),&H48+1,18)
-
location(2)=mid(oRawEDID(i),&H5a+1,18)
-
location(3)=mid(oRawEDID(i),&H6c+1,18)
-
-
-
strSerFind=Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&Hff)
-
-
-
strMdlFind=Chr(&H00) & Chr(&H00) & Chr(&H00) & Chr(&Hfc)
-
-
intSerFoundAt=-1
-
intMdlFoundAt=-1
-
-
For findit = 0 to 3
-
If instr(location(findit),strSerFind)>0 then
-
-
intSerFoundAt=findit
-
-
End If
-
-
If instr(location(findit),strMdlFind)>0 then
-
-
intMdlFoundAt=findit
-
-
End If
-
-
Next
-
-
'If a location containing a serial number block was found then store it
-
If intSerFoundAt<>-1 then
-
-
tmp=Right(location(intSerFoundAt),14)
-
-
If instr(tmp,Chr(&H0a))>0 then
-
-
tmpser=Trim(Left(tmp,instr(tmp,Chr(&H0a))-1))
-
-
Else
-
-
tmpser=Trim(tmp)
-
-
End If
-
-
-
If Left(tmpser,1)=Chr(0) then tmpser=Right(tmpser,Len(tmpser)-1)
-
-
Else
-
-
tmpser="Serial Number Not Found in EDID data"
-
-
End If
-
-
'If a location containing a model number block was found then store it
-
If intMdlFoundAt<>-1 then
-
-
tmp=Right(location(intMdlFoundAt),14)
-
-
If instr(tmp,Chr(&H0a))>0 then
-
-
tmpmdl=Trim(Left(tmp,instr(tmp,Chr(&H0a))-1))
-
-
Else
-
-
tmpmdl=Trim(tmp)
-
-
End If
-
-
-
If Left(tmpmdl,1)=Chr(0) then tmpmdl=Right(tmpmdl,Len(tmpmdl)-1)
-
-
Else
-
-
tmpmdl="Model Descriptor Not Found in EDID data"
-
-
End If
-
-
tmpmfgweek=Asc(mid(oRawEDID(i),&H10+1,1))
-
-
-
tmpmfgyear=(Asc(mid(oRawEDID(i),&H11+1,1)))+1990
-
-
-
tmpmdt=month(dateadd("ww",tmpmfgweek,DateValue("1/1/" & tmpmfgyear))) & "/" & tmpmfgyear
-
-
-
tmpEDIDMajorVer=Asc(mid(oRawEDID(i),&H12+1,1))
-
-
tmpEDIDRev=Asc(mid(oRawEDID(i),&H13+1,1))
-
-
-
If tmpEDIDMajorVer < 255-48 and tmpEDIDRev < 255-48 Then
-
-
tmpver=Chr(48+tmpEDIDMajorVer) & "." & Chr(48+tmpEDIDRev)
-
-
Else
-
tmpver="Not available"
-
-
End If
-
-
-
tmpEDIDMfg=mid(oRawEDID(i),&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)
-
-
tmpEDIDDev1=hex(Asc(mid(oRawEDID(i),&H0a+1,1)))
-
tmpEDIDDev2=hex(Asc(mid(oRawEDID(i),&H0b+1,1)))
-
-
If Len(tmpEDIDDev1)=1 then tmpEDIDDev1="0" & tmpEDIDDev1
-
If Len(tmpEDIDDev2)=1 then tmpEDIDDev2="0" & tmpEDIDDev2
-
-
tmpdev=tmpEDIDDev2 & tmpEDIDDev1
-
-
-
arrMonitorInfo(i,0)=tmpmfg
-
arrMonitorInfo(i,1)=tmpdev
-
arrMonitorInfo(i,2)=tmpmdt
-
arrMonitorInfo(i,3)=tmpser
-
arrMonitorInfo(i,4)=tmpmdl
-
arrMonitorInfo(i,5)=tmpver
-
End If
-
-
wscript.echo "Monitor " & Chr(i+65) & ")" & VbCrLF & _
-
"VESA Manufacturer ID= " & arrMonitorInfo(i,0) & VbCrLF & _
-
"Manufacture Date= " & arrMonitorInfo(i,2) & VbCrLF & _
-
"Serial Number= " & arrMonitorInfo(i,3) & VbCrLF & _
-
"Model Name= " & arrMonitorInfo(i,4)
-
-
Next
-
-
-
-
Function ErrorCheck(strErrorNumber)
-
Select Case strErrorNumber
-
Case "-2147024843"
-
ErrorCheck = strError_ComputerNotFound
-
Case "-2147023518"
-
ErrorCheck = strError_AlreadyAdmin
-
Case "-2147023509"
-
ErrorCheck = strError_UserNotFound
-
End Select
-
End Function
-
-
Function Pingable(strComputer)
-
Dim objShell
-
Dim strTemp
-
Dim objFSO
-
Dim iReturn
-
Dim objTextFile
-
Pingable = False
-
Set objShell = CreateObject("WScript.Shell")
-
strTemp = objShell.ExpandEnvironmentStrings("%temp%") & _
-
"/tempping.txt"
-
iReturn = objShell.Run("%comspec% /C ping " & strComputer & _
-
" -n 1 > " & strTemp, 0, True)
-
Set objFSO = CreateObject("Scripting.FileSystemObject")
-
Set objTextFile = objFSO.OpenTextFile(strTemp, 1)
-
While Not objTextFile.AtEndOfStream
-
If InStr(objTextFile.ReadLine, "Reply") Then Pingable = True
-
Wend
-
objTextFile.Close
-
objFSO.DeleteFile (strTemp)
-
End Function
-
1 1832
Hi Guys
Finally I have figured it out so, pls don't bother.
Thanks
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Toby A Inkster |
last post by:
www.authoring.stylesheets]
For ages I have provided links to alternate stylesheets from my pages as
per W3C recommendations:
<link rel="stylesheet" href="baz" type="text/css" title="Baz"
media="screen,projection" />
<link rel="alternate stylesheet" href="foo" type="text/css" title="Foo"
media="screen,projection" />
<link rel="alternate stylesheet" href="bar" type="text/css" title="Bar"
|
by: User |
last post by:
If I want to provide alternate stylesheets (eg red.css, green.css), is
it better to put all the stuff that is common to both sheets in a
separate css file (eg basic.css) and use @import at the top of each
alternative?
Does basic.css get downloaded each time the style is changed, or just
once (with the first view)?
Does it matter? - Is there another way? -
--
tenxng@ban.arg.nh
Email addy ROT13'd
|
by: Carl Draus |
last post by:
I was reading the FixPackReadme.txt file in preparation for installing v8.1
Alternate FP7. The prerequisites section says that all DB2 processes must be
stopped and doesn't differentiate between regular an alternate fixpacks. I
was hoping the alternate fixpack would help to avoid downtime. Do you really
need to stop all DB2 process for alternate fixpack installations?
--
Carl Draus
|
by: Jean-Marc Blaise |
last post by:
Hi,
From version 8.1.2 one can install alternate fixpacks on Unix/Linux. What is
the IBM policy on alternate fixpack; is it for temporary testing or can it
be permanent in Production ?
If I open a PMR about an alternate fixpack problem, do I have the same
service than on the GA+Fixpack code ? Can I get a special build, in case ...
?
|
by: Mark A |
last post by:
Trying to upgrade alternate FP9 to alternate FP9a on Red Hat Linux. After
running the following command:
../installAltFixPak -y
it says it was successful, but no new directory is created in /opt/IBM/db2
Assuming that maybe fixpack 9a updates the existing /opt/IBM/db2/V8.FP9
directory, I ran db2iupdt on the instance (using root), but db2level still
shows the signature for fixpack 9 (not 9a). "DB2 v8.1.0.88", "s050422"
| |
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: Michael R |
last post by:
Searching the net I've found a simple technique to add row numbers and alternate colors (for the even and the uneven row) to a continuous form.
1st step: Create a textbox, send it to background and select the first color.
.ControlSouce =fRowNum(False)
.Name = RowNum
2nd step: Add the following function to the form module: (for row numbers)
Public Function fRowNum(Reset As Boolean) As Long
Static I As Integer
|
by: johkar |
last post by:
I need some browser implementation clarification.
In the below example, the alternate stylesheet could be invoked by
user agents that support alternate stylesheets or by script. Are
there any browsers that don't recognize "alternate stylesheet" as a
value of the rel attribute and just implement it automatically thus
overriding sheet2.css? Just need to know what I need to worry about.
<link href="sheet1.css" rel="stylesheet"...
|
by: zgh1970 |
last post by:
Hi, All,
I have some question on the alternate server for the DB connection on
db2 connect server.
There is one db2 connection to one host database on the server with
the following cfg:
Database 13 entry:
Database alias = DBG0
Database name = DBG0
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |