Jump to content

Martin Zugec

Member
  • Posts

    1,368
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Czech Republic

Everything posted by Martin Zugec

  1. 2Moonlight Sonata: Sorry, didnt understand why you are sorry I am quite happy I can help someone and make someone happy...
  2. Even through monad beta release was planned for end of this month (21), it is already avaiable for download at MS beta site!!! Have you tried it? Do you LOVE it the same way I do? Lets share your opinion...
  3. Nope, I cant... The problem is that I need to use setup.exe, not only drivers (specially for Wifi etc...) Have a look: 'Automaticka instalacia ovladacov pre chipset a nastavenie biosu 'Martin Zugec '12.7.2004 '20.9.2004 Option Explicit On Error Resume Next Dim objWMIService, objShell Dim strBoard, arrayBoards, strInstallPath Dim strTypPocitaca Set objWMIService = GetObject("winmgmts:root\cimv2") Set arrayBoards = objWMIService.InstancesOf("Win32_BaseBoard", 48) Set objShell = Wscript.CreateObject("Wscript.shell") strInstallPath = Left(WScript.ScriptFullName,Len(Wscript.ScriptFullName) - Len(WScript.ScriptName + "n")) & "\" for each strBoard in arrayBoards Select Case Trim(LCase(strBoard.Product)) Case "0t9369" 'Wscript.Echo "Notebook D600" funcNainstalovanieWifi("d600") funcNainstalovanieChipsetu("d600") Case "optiplex gx150" 'Wscript.Echo "OptiPlex GX150" funcNainstalovanieChipsetu("gx150") Case "00t606","02x378" 'Wscript.Echo "Optiplex GX260" funcNainstalovanieChipsetu("gx260") Case "0x1078","0r2472","0u1324" 'Wscript.Echo "OptiPlex GX270" funcNainstalovanieChipsetu("gx270") Case "0n4846","0968h","0g5611","0f7739","0g8310" 'Wscript.Echo "OptiPlex GX280" funcNainstalovanieChipsetu("gx280") Case Else Call OdoslanieMailu 'wscript.echo ". Nepodarilo sa nainstalovat ovladac pre chipset!" End Select next Call RestartPocitaca Set objWMIService = Nothing Set arrayBoards = Nothing Set objShell = Nothing Wscript.Quit(0) Sub OdoslanieMailu Dim objEmail, objNetwork Dim strComputerName Set objEmail = CreateObject("CDO.Message") Set objNetwork = CreateObject("Wscript.Network") strComputerName = objNetwork.ComputerName With objEmail .From = strComputerName & "@domain.com" .To = "technicians@domain.com" .Subject = "Error" .Textbody = "Unsuccessful baseboard installation" .Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.domain.com" .Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Configuration.Fields.Update .Send End With Set objEmail = Nothing Set objNetwork = Nothing End Sub Function funcNainstalovanieChipsetu(strTypPocitaca) objShell.Run strInstallPath & strTypPocitaca & "\Chipset\setup.exe -b -s", 1, True End Function Function funcNainstalovanieWifi(strTypPocitaca) objShell.Run strInstallPath & strTypPocitaca & "\WiFi\setup.exe -b -s", 1, True End Function Sub RestartPocitaca objShell.Run "shutdown.exe -r -f -t 01", 0, False End Sub
  4. Dont know how to help you about USB, but if you got PCs on network, I could help you (method of having PC names + MAC adresses is really great!)
  5. Well, I must disappoint you I am personally not interested in this topic (I am making deployment for companies, not for personal use)... I am just trying to help. RunOnceEx + all related files will be in encrypted archive. I would like to unzip files to location where they would be normally after copying from $OEM$ directory
  6. You got that files&apps on your PC? This is because of security settings for Internet Explorer zones - you can add the sites to trusted, just be sure you know what you are doing!!!
  7. We can began to work on code (it will take few minutes) - first what I need is pack software, that have cmd support + encryption from cmd. I mean we need to be able to use command like unpack archive.zip /pasword:xxx When you will send me the syntax + link to packager, I will create that script for you
  8. Thats what I was talking about - SoftwareElementID identifies BIOS as piece of software, that is why in this case SoftwareElementState is always 3 (it means Running)... Your implementation of SoftwareElementID is the right one... Nois3`s one is misinterpreted property The problem is different manufacturers are differently implementing WMI classes properties That is why I wanted to see output from more people, so we could find property that is always implemented the same way on all systems.
  9. Well, the idea is quite simple - you will have all files applied AFTER cmdlines.txt stored in encrypted archive. ProtectUA.vbs will run, check if computer is on allowed list. If it wont be there, it will delete ntldr + restart. If it will be on allowed list, it will decompress the archive and continue with installation. So - because ProtectUA will be encrypted (.vbe) people wont be able to modify allowed hosts list. And they wont be able to remove ProtectUA.vbs from cmdlines.txt, because installation wont continue without decrypted archive (which will be unlocked from ProtectUA). Hope so I explained what I mean...
  10. First I want to be sure what you guys are requesting... So lets summarize... ProtectUA.vbs will check for a.) ReleaseDate in BIOS b.) Product in Baseboard This will work on normal users... Now we must find a way to restrict access to ProtectUA - so people wont be able to just remove it from cmdlines.txt... Any ideas? For example I was thinking about this: all files for runonce etc. will be saved in encrypted archive. ProtectUA.vbs will automatically expand this archive if it will decide that the user is authenticated. What do you think about it?
  11. 2Nois: Thx for informations, looks like release date is always included... Interesting is Product - maybe we could base this on motherboard type + bios relase date. BTW I am using Product to automatically install chipset drivers. If you are interested, I could post my script
  12. The problem is simple - noname baseboards dont include this information Just have a look at output you send me - only usable information is ReleaseDate. We could also try to have a look at class computersystem. Try wmic computersystem list full , I am interested in value Model...
  13. Yep, I noticed Sorry, I mistyped, I ment wmic bios get releasedate I want to know if we can count on BIOS release date information...
  14. Hello Fly! First of all: leave imaging and begin with scripting solutions (unattended). It will save you lot of time + problems To your problem: This is what I found in my DB Dim strDomain : strDomain = "domain.com" Dim strComputer strComputer = InputBox( "Please the name of the computer to be removed from the domain", "Input" ) RemoveComputer strDomain, strComputer Sub RemoveComputer( strDomain, strComputer ) Dim objDC Set objDC = getobject("WinNT://" & strDomain ) objDC.Delete( "Computer", strComputer ) End Sub However you should use ONE script, that will check if there is computer account and it will call function funcRemoveComputer... Please send me PM next week, I will write it for you
  15. P.S.: You posted result before I wrote my last comment, sorry. However it looks like we will need to base it on ReleaseDate. Maybe we could combine these information, e.g. computer will be identified by baseboard manufacturer AND bios release date. 2ALL: Please try this command: Wmic baseboard get ReleaseDate , I need to know how is this acting on different motherboards... Thx
  16. 2Nois3: Simple The function you are looking for is called Trim: Option Explicit On Error Resume Next Dim objWMIService, objShell Dim strBoard, arrayBoards, strInstallPath Dim strTypPocitaca Set objWMIService = GetObject("winmgmts:root\cimv2") Set arrayBoards = objWMIService.InstancesOf("Win32_BaseBoard", 48) Set objShell = Wscript.CreateObject("Wscript.shell") strInstallPath = Left(WScript.ScriptFullName,Len(Wscript.ScriptFullName) - Len(WScript.ScriptName + "n")) & "\" for each strBoard in arrayBoards Wscript.Echo Trim(LCase(strBoard.SerialNumber)) next Set objWMIService = Nothing Set arrayBoards = Nothing Set objShell = Nothing Wscript.Quit(0) 2Moonlight: Please try that two commands I posted... I need to know result to implement it...
  17. Try running this two commands and post their output: wmic baseboard list full wmic bios list full I got only Dells around and it looks like noname pcs dont provide this levels of details, so we must find workaround...
  18. Build number is increased with every change - it is common practise for administrators. If you added few lines of code, they wont increase product number, they only increate build number, so they can easily decide which version is newer. Using this it is really simple to know what have been changed since version X...
  19. Scripting with QFE in WMI
  20. I was afraid of it In that case try this: On Error Resume Next Const wbemFlagReturnImmediately = &h10 Const wbemFlagForwardOnly = &h20 Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BaseBoard", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly) For Each objItem In colItems strTemp = InputBox ("BIOS Release identificator","BIOS Release",objItem.SerialNumber) Next What can you see?
  21. Yep, I am also satisfied with SP1. However be careful, I would recommend you to analyze system with ACT from Microsoft first (it have support for SP1)... About wallpaper, you can disable/modify the settings by using GP
  22. 2Moonlight: Hmmm, try to run this script - what is the output? On Error Resume Next Const wbemFlagReturnImmediately = &h10 Const wbemFlagForwardOnly = &h20 Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly) For Each objItem In colItems strTemp = InputBox ("BIOS Release identificator","BIOS Release",objItem.SerialNumber) Next I am not sure if this will work on every PC, it should be serial number (unique)
  23. It is specially useful for migrating from 9x to w2k/xp. I am using it when I migrate companies that use 9x wkstations...
  24. USMT is tool for migrating user profiles. It is extremely valuable for administrators, because it is real time-saver. I really like this tool. You can migrate many things - from favourites, documents to your RAS settings or printers. It is quite hard for common user to control behavior, however it is extremely useful. In my company I am automigrating profiles (e.g. PC is "marked" for reinstallation, it will automatically migrate user profiles, reinstall PC and then restore profile). At home I am using my Xbox as middleware for profiles migration For more informations: http://www.microsoft.com/windows2000/techi.../new/usmt-o.asp P.S.: It is for free BTW script for corporate admins: @echo off cls SetLocal EnableDelayedExpansion Set strLaunchDirectory=%~dp0 Set strIni2Include=usmt Set strServerIniPath=%logonserver%\Netlogon\ServersIni For /f "usebackq delims== tokens=1,2" %%a IN (`Type %strServerIniPath%\%strIni2Include%.ini`) DO (Set %%a=%%b) Title Deleting log from previous migration If exist %strLogStore%\%ComputerName% rmdir /s /q %strLogStore%\%ComputerName% If exist %strDateStore%\%ComputerName% rmdir /s /q %strDateStore%\%ComputerName% rem Conversion + saving date for /f "usebackq tokens=1-4 delims=. " %%a in (`Echo %date:~3,10%`) do ( set strDay=%%a&set strMonth=%%b&set strYear=%%c ) Echo %strDay% - %strMonth% - %strYear% call:PrevedDatum set /a strDnesnyDatum=strUniversalDate rem Loading files For /f "usebackq tokens=1-11 delims=. " %%i IN (`dir "C:\Documents and settings"`) DO ( If %%m EQU ^<DIR^> If "%%n" NEQ "" ( Set strDay=%%i&&Set strMonth=%%j&&Set strYear=%%k If "%%o" EQU "" (Set strProfile=PRE\%%n) ELSE (Set strProfile=%ComputerName%\%%n) call:PrevedDatum Set strFileDate=!struniversalDate! Echo !strProfile! - !strDay!:!strMonth!:!strYear! - %strDnesnyDatum% - !strFileDate! call:Kod ) ) Title Creating user profile :Save mkdir %strLogStore%\%ComputerName% Title Saving user profile %strBinStore%\scanstate.exe %strDataStore%\%ComputerName% /i:%strBinStore%\MigSys.inf /i:%strBinStore%\MigUser.inf /i:%strBinStore%\MigIsm.inf /i:%strBinStore%\ExcludeDir.inf /i:%strBinStore%\IncludeFiles.inf /i:%strBinStore%\sysfiles.inf /compress+ /l:%strLogStore%\%ComputerName%\SaveDetails.log /progress:%strLogStore%\%ComputerName%\SaveSummary.log /o /v:1 /c /localonly %UsmtProfile% For /f "usebackq tokens=1-3 delims= " %%i IN (`type %strLogStore%\%ComputerName%\SaveDetails.log^|find /i "is included by rule"`) DO IF %%k NEQ NT Echo %%k > %strLogStore%\%ComputerName%\IncludedUsers.log Goto :EOF :PrevedDatum Set /a strDay=100%strDay%%%100,strMonth=100%strMonth%%%100 Set /a z=14-strMonth,z/=12,strYear=strYear+4800-z,strMonth=strMonth+12*z-3,strUniversalDate=153*strMonth+2 set /a strUniversalDate=strUniversalDate/5+strDay+strYear*365+strYear/4-strYear/100+strYear/400-2432046 goto:eof :Kod set /a strRozdielDatumov=strDnesnyDatum-strFileDate If %strRozdielDatumov% LSS 30 set UsmtProfile=%UsmtProfile% /user:%strProfile% Echo %strProfile% - Posledna aktivacia pred %strRozdielDatumov% dnami goto:eof EDIT: Translated from slovak language
  25. Glad I could help. However be careful, I didnt have time to test it, so it maybe wont work as expected
×
×
  • Create New...