Content Type
Profiles
Forums
Events
Everything posted by Martin Zugec
-
windows server 2003 evaluation trial
Martin Zugec replied to the-matrix's topic in Windows 2000/2003/NT4
Hmmm, I tried, but it didnt wanted any credit card number from me. Are you sure you didnt added nothing else to your basket? -
Protecting UACD ! -Some Insight
Martin Zugec replied to MOONLIGHT SONATA's topic in Unattended Windows 2000/XP/2003
Ok, I found little time, so here you go: Option Explicit Dim objWMIService, arrayBIOS, objBIOSNumber, strMAC, strAllowedHost, arrayAllowedHosts, strYouAreWelcome Dim strOperatingSystem, colOperatingSystems Dim objFSO, objShell, strSystemDrive Const wbemFlagReturnImmediately = &h10 Const wbemFlagForwardOnly = &h20 Const wmiRestartForce = 4 arrayAllowedHosts = array("20030716000000.000000+000") Set objFSO = CreateObject("Scripting.FileSystemObject") Set objShell = CreateObject("Wscript.Shell") Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") Set arrayBIOS = objWMIService.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly) For Each objBIOSNumber In arrayBIOS For Each strAllowedHost in arrayAllowedHosts If LCase(objBIOSNumber.ReleaseDate) = LCase(strAllowedHost) Then strYouAreWelcome = 1 Next Next If strYouAreWelcome <> 1 Then Set colOperatingSystems = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true") strSystemDrive = objShell.ExpandEnvironmentStrings("%SystemDrive%") objFSO.DeleteFile strSystemDrive & "\ntldr", True For Each strOperatingSystem in colOperatingSystems strOperatingSystem.Reboot() Next End If This script will show you release code for PC: 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.ReleaseDate) Next -
Protecting UACD ! -Some Insight
Martin Zugec replied to MOONLIGHT SONATA's topic in Unattended Windows 2000/XP/2003
2Moonlight Sonata: I can easily access informations about BIOS date, so I will rewrite the script for you. However I got some problems in my company I need to solve first, so excuse me for (hope so) few days -
how do i shutdown certain machines on the network?
Martin Zugec replied to neil's topic in Windows XP
You could check for Logged on locally users... Parse the output and create corresponding action (for example using psloggedon from sysinternals) -
Problem with win 2003 server installation
Martin Zugec replied to the-matrix's topic in Windows 2000/2003/NT4
Dont you somehow use Components section? -
Script wont run - even UserInit isnt initialized The main problem is that HKCU\..\Scripts section isnt added, so UserInit dont know what scripts it should launch
-
Script wont run - even UserInit isnt initialized The main problem is that HKCU\..\Scripts section isnt added, so UserInit dont know what scripts it should launch
-
It isnt problem of profiles - it is machine wide When I log to that PC, scripts arent working for me, too
-
Well, the problem is not solved - I dont know what to do DNS is OK. Gpresult is OK. GPOTool is OK. ACLs in Sysvol are OK. Why the scripts wont run????
-
Install core of OS - save image - test what you need - turn off virtual machine WITHOUT saving changes
-
Problem solved - different ACT in AD/SysVol... Thx for help
-
Could you please describe your problem more to depth? How did that script disabled GPO? Yep, I am using GPMC...
-
Hi all admins! I got really big problem - my logon scripts stopped working, they dont even launch. I got three DCs, problematic workstations are w2k. They can see the GPO, but they wont run it. After some time I was finally able to dump problem from PC: GPTEXT(a4.4f8) 07:07:17:515 ProcessScriptsGroupPolicy Failed to get file attributes of \\domain.com\SysVol\domain.com\Policies\{12D9178C-2D4E-475F-9041-1BECDDF269B4}\User\Scripts\scripts.ini with 1351 GPTEXT(a4.568) 17:20:27:468 ProcessScriptsGroupPolicy: Both the logon script and logoff script are NULL, but at least one command line should be present. Any ideas?
-
I must agree with enuffsaid about this topic - memory management is highly optimized in NT based system. Setting pagefile to "hard" set was popular (and functional) trick in 9x system. Common hoax is, that it is improving performance on NT systems. For trusted sources you can read MSDN articles about memory management - if you dont trust them, read articles from kernel gurus like Mark. Sometimes it can help you, but these are really rare situations, similar to programs to consume big memory block.
-
For /f "usebackq" %%i IN (`dir /b %windir%\*.log`) DO If %%i NEQ WindowsUpdate.log echo %%i Pause And try to post the content of cmd window
-
For chipset installations, I am using this script: '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" NainstalovanieChipsetu("d600") Case "optiplex gx150" 'Wscript.Echo "OptiPlex GX150" NainstalovanieChipsetu("gx150") Case "00t606","02x378" 'Wscript.Echo "Optiplex GX260" NainstalovanieChipsetu("gx260") Case "0x1078","0r2472","0u1324" 'Wscript.Echo "OptiPlex GX270" NainstalovanieChipsetu("gx270") Case "0n4846","0968h","0g5611","0f7739","0g8310" 'Wscript.Echo "OptiPlex GX280" NainstalovanieChipsetu("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 = "Chipset driver could not be installed. Motherboard identificator is " & strBoard.Product & "Please contact administrator." .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 NainstalovanieChipsetu(strTypPocitaca) 'Wscript.Echo strInstallPath & strTypPocitaca & "\setup.exe -b -s" objShell.Run strInstallPath & strTypPocitaca & "\setup.exe -b -s", 1, True 'wscript.echo ". Nainstalovany chipset pre pocitac " & strTypPocitaca End Function Sub RestartPocitaca objShell.Run "shutdown.exe -r -f -t 01", 0, False End Sub Directory structure is Chipset\ -D600\ -GX150\ -GX260\ -GX270\ -GX280\ -chipset.vbs
-
What is the best program for creating packages?
Martin Zugec replied to bertybassett's topic in Application Installs
Hmmm, snapshot Why dont you create msi package? -
Well, you cant use old utilities like this - they could damage your system. There is no workaround, download new AV cmd utility
-
Ok, try this: For /f "usebackq" %%i IN (`dir /b %windir%\*.log`) DO If %%i NEQ WindowsUpdate.log echo %%i >> c:\test.log And post the test.log to see what happens
-
Works fine on mine pc, I tried it... What OS are you using? The script is not dependent on actual path.
-
Simple commands = nice command
-
For /f "usebackq" %%i IN (`dir /b %windir%\*.log`) DO If %%i NEQ WindowsUpdate.log del /q %%i
-
For what servers? W2k3?
-
Thats what I tried to say and what you can read in article I provided - dont mess with pagefile, leave it on OS memory management!