Find Jobs
Hire Freelancers

Convert VB script to Powerhsell

$30-250 USD

Κλειστή
Αναρτήθηκε πάνω από 13 χρόνια πριν

$30-250 USD

Πληρωμή κατά την παράδοση
I just need the VB script to be converted to Powerhsell. It's just a script that pull the Monitors info...i.e. Serial #, Manufacture, etc Code below: '[login to view URL] 'this code is based on the EEDID spec found at [login to view URL] 'and by my hacking around in the windows registry 'the code was tested on WINXP,WIN2K and WIN2K3 'it should work on WINME and WIN98SE 'It should work with multiple monitors, but that hasn't been tested either. '***************************************************************************************** ' '***************************************************************************************** 'It should be noted that this is not 100% reliable 'I have witnessed occasions where for one reason or another windows 'can't or doesn't read the EDID info at boot (example would be someone 'booting with the monitor turned off) and so windows changes the active 'monitor to "Default_Monitor" 'Another reason for reliability problems is that there is no 'requirement in the EDID spec that a manufacture include the 'serial number in the EDID data AND only EDIDv1.2 and beyond 'have a requirement that the EDID contain a descriptive 'model name 'That being said, here goes.... '***************************************************************************************** ' '***************************************************************************************** 'Monitors are stored in HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY\ ' 'Unfortunately, not only monitors are stored here Video Chipsets and maybe some other stuff 'is also here. ' 'Monitors in "HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY" are organized like this: ' HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY\<VESA_Monitor_ID>\<PNP_ID>\ 'Since not only monitors will be found under DISPLAY sub key you need to find out which 'devices are monitors. 'This can be deterimined by looking at the value "HardwareID" located 'at HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY\<VESA_Monitor_ID\<PNP_ID>\ 'If the device is a monitor then the "HardwareID" value will contain the data "Monitor\<VESA_Monitor_ID>" ' 'The Next difficulty is that all monitors are stored here not just the one curently plugged in. 'So, If you ever switched monitors the old one(s) will still be in the registry. 'You can tell which monitor(s) are active because they will have a sub-key named "Control" '***************************************************************************************** ' Option Explicit Dim WshShell Set WshShell = [login to view URL]("[login to view URL]") Dim strComputer, message Dim intMonitorCount Dim oRegistry, sBaseKey, sBaseKey2, sBaseKey3, skey, skey2, skey3 Dim sValue dim i, iRC, iRC2, iRC3 Dim arSubKeys, arSubKeys2, arSubKeys3, arrintEDID Dim strRawEDID Dim ByteValue, strSerFind, strMdlFind Dim intSerFoundAt, intMdlFoundAt, findit Dim tmp, tmpser, tmpmdl, tmpctr Dim batch, bHeader batch = False If [login to view URL] = 1 Then strComputer = [login to view URL](0) batch = True Else strComputer = [login to view URL]("%COMPUTERNAME%") strComputer = InputBox("Check Monitor info for what PC","PC Name?",strComputer) End If If strcomputer = "" Then [login to view URL] strComputer = UCase(strComputer) If batch Then Dim fso,logfile, appendout logfile = [login to view URL]("%userprofile%") & "\desktop\[login to view URL]" 'setup Log Const ForAppend = 8 Set fso = CreateObject("[login to view URL]") If Not [login to view URL](logfile) Then bHeader = True set appendout = [login to view URL](logfile, ForAppend, True) If bHeader Then [login to view URL] "Computer,Model,Serial #,Vendor ID,Manufacture Date,Messages" End If End If Dim strarrRawEDID() intMonitorCount=0 Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE 'get a handle to the WMI registry object On Error Resume Next Set oRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}!\" & strComputer & "/root/default:StdRegProv") If Err <> 0 Then I
Ταυτότητα εργασίας: 761155

Σχετικά με την εργασία

3 προτάσεις
Απομακρυσμένη Εργασία
Ενεργός/ή 14 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
3 freelancers δίνουν μια μέση προσφορά $153 USD για αυτή τη δουλειά
Avatar Χρήστη
vbscript/php/mysql professional, ready to start
$200 USD σε 2 ημέρες
4,5 (2 αξιολογήσεις)
4,0
4,0
Avatar Χρήστη
Please see PM
$125 USD σε 3 ημέρες
5,0 (2 αξιολογήσεις)
2,2
2,2
Avatar Χρήστη
Hi there, I am a system programmer with an experience of over 10+ years in application and system programming. I am very keen to deliver you the solution. regards
$135 USD σε 2 ημέρες
0,0 (0 αξιολογήσεις)
0,0
0,0

Σχετικά με τον πελάτη

Σημαία της UNITED STATES
Coal City, United States
5,0
7
Επαληθευμένη μέθοδος πληρωμής
Μέλος από Ιουλ 31, 2010

Επαλήθευση Πελάτη

Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.