Content Type
Profiles
Forums
Events
Everything posted by Martin Zugec
-
Few questions about .NET
Martin Zugec replied to Martin Zugec's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
I am just trying to show critical box with OK button (or question with yesno etc.)... However even through IntelliSense will provide me with this options, they are not doing what they are supposed to do The middle section is ignored. About forms, I thought it is similar to VB6 (form.show), however as I can see it is working differently... From .NET logic I was thinking that I have to create form as form class (it is working), however I dont know how to manipulate with existing form -
Nice However it really means eXPerience
-
Hello there! Yesterday I decided to begin working with VB.NET (creating GUI in vbscript isnt comfortable)... But I encountered few problems, so I would like to ask few questions... 1.) How to use another form??? I was thinking something like Dim Form2 as Form Form2.Show() But it is creating new form, not using existing one 2.) How to find out who created the file? I mean Owner property 3.) How to simply access XML configuration file? I think I should use XPath, I was thinking about something like WMI convention (Where Name="Logs" get Path) Are you using XML files? 4.) Why isnt working MsgBoxStyle.Critical.OKOnly ? When I enter numerical value, it is working just fine
-
VB.NEt and .NET Framework
Martin Zugec replied to bobbert's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Well, dont think so this is good idea - you will miss all the great features like GCA that .NET Framework supports -
Dont think so this is final name... I think we will see final name somewhere around Beta 2
-
Possible Speedup Installing XP by Expanding I386
Martin Zugec replied to Araknis's topic in Unattended Windows 2000/XP/2003
For example for me the VMWare test was sufficient, because I am using VPCs at deployment presentations and every minute is worth Also I would like to test this method for installation over network -
It is worth the money - not just outlook configuration, it is awesome replacement of logon script... About USMT: Save-Auto.bat rem @echo off cls SetLocal EnableDelayedExpansion Set strLaunchDirectory=%~dp0 Set strIni2Include=usmt Set strServerIniPath=\\domain.cz\Netlogon\ServersIni For /f "usebackq delims== tokens=1,2" %%a IN (`Type %strServerIniPath%\%strIni2Include%.ini`) DO (Set %%a=%%b) Set strBeginTime=%time:~0,5% Title Zmazanie logu z predchadzajucej instalacie If exist %strLogStore%\%ComputerName% rmdir /s /q %strLogStore%\%ComputerName% If exist %strDateStore%\%ComputerName% rmdir /s /q %strDateStore%\%ComputerName% rem Konverzia + ulozenie datumu 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 Nacitanie suborov 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 Vytvorenie uzivatelskeho profilu :Save mkdir %strLogStore%\%ComputerName% Title Ukladanie uzivatelskeho profilu %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 Echo %date:~3,10%,%ComputerName%,%strBeginTime%,%time:~0,5% >> %strLogStore%\Summary.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 If %strProfile% NEQ %computername%\All If %strProfile% NEQ PRE\sdo_autoon If %strProfile% NEQ PRE\usdklient set UsmtProfile=%UsmtProfile% /user:%strProfile% Echo %strProfile% - Posledna aktivacia pred %strRozdielDatumov% dnami goto:eof Load-Auto.bat @echo off Set strLaunchDirectory=%~dp0 Set strIni2Include=usmt Set strServerIniPath=\\domain.cz\Netlogon\ServersIni For /f "usebackq delims== tokens=1,2" %%a IN (`Type %strServerIniPath%\%strIni2Include%.ini`) DO (Set %%a=%%b) If not exist %strDataStore%\%ComputerName% Goto :EOF %strBinStore%\loadstate /c /l:%strLogStore%\%ComputerName%\LoadDetails.log /v:1 /progress:%strLogStore%\%ComputerName%\LoadSummary.log %strDataStore%\%ComputerName% rem If %errorlevel% EQU 0 rmdir /q /s %strDateStore%\%ComputerName% if %errorlevel% NEQ 0 echo Nahranie profilu sa nepodarilo! > c:\ProfileError.log Usmt.ini strDataStore=\\server2\datastore\usmt strLogStore=\\server1\logs\migration\usmt strBinStore=\\server1\instal\scripty\Usmt It is code using my dynamic variables way - have a look at my blog
-
Maybe you should think about using Profile Maker (www.autoprof.com), it is one of my favourites tools for managing desktops
-
Go on...
-
Yep, USMT is GREAT product, I am really sorry only few companies are using them I got fully automated profile migration and I really love it
-
Remind me next week, ok?
-
Hehe, I received three invites 1.) From local MS 2.) MVP 3.) MSDN
-
UI in USMT is not working quite well If you want to be sure your script will work as expected, I could give you script I wrote sometime for USMT - it is converting date to julian calendar and comparing them and it is working quite well... I give up /ui method long time ago, I was talking about this with guys from MS and they know about this problem and will solve it in next version... BTW Finally someone using USMT
-
You CAN shutdown workstations with command I provided. You only need to have this command on SERVER station, I mean station from which you will launch the mass shutdown. You dont need to have this command on every workstation you are trying to shut down. Similar like accessing WMI from console - only master (server) have to contain ability, clients dont need it...
-
1.) I am using Microsoft mouse & keyboard, so I am installing specific SW for them. 2.) Yep, it is 3.) Hmmm, it should be able to work that way, Go for it and try it! 4.) Yes, look at bottom. Ok, here is not one-word answer First you must run PnPBased.bat. The result will be web page, where your pnp devices are listed. The important stuff is on right side - it is PnP identifier associated with device. Next you need to add this identifier to script: Case Trim(Lcase("pci\ven_8086&dev_4223&subsys_10218086&rev_05\4&39a85202&0&18f0")) where pci\ven...f0 is the identifier taken from PnPBased.bat And under command Case you will just include what you want to do when this PnP identifier is encountered! Really simple I think...
-
distribution/packaging
Martin Zugec replied to spiritpyre's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
IMHO if you are using Visual Studio, it is one of the feature -
It is not MS We (MVPs) have access to KB and we can write our own articles... So this is not MS activity. However it is great (and truth)
-
What is the best way to deploy PCs
Martin Zugec replied to fly's topic in Unattended Windows 2000/XP/2003
Hard to say, you must try I am using tftpd32 at home and Unicenter PXE at work -
Nope, after reboot it continues from HDD... I am using this method in few companies...
-
PS2 and Xbox only Isnt bad but it also isnt really cool Few nice ideas, but not really great gameplay (its getting boring soon)
-
or use wmic nteventlog class if you dont want to create vbs...
-
For setting ACL: commands cacls, xcacls or (professional) subinacl For creating shares: net share For clearing event log: sTarget = WScript.Arguments(0) 'First command-line arg to script. sLog = WScript.Arguments(1) 'Second command-line arg to script. If ClearEventLog(sTarget, sLog) Then 'Function returns true if operation successful. WScript.Echo sLog & " log cleared on " & sTarget Else WScript.Echo sLog & " log NOT cleared on " & sTarget End If Function ClearEventLog(sComputer, sLogName) On Error Resume Next Set oWMI = GetObject("WinMgmts:{(Security)}!//" & sComputer & "/root/cimv2") Set cLogFile = oWMI.ExecQuery("SELECT * FROM Win32_NTEventLogFile WHERE LogFileName = " & "'" & sLogName & "'") For Each oLog In cLogFile iError = oLog.ClearEventlog() Next If iError = 0 And Err.Number = 0 Then ClearEventLog = True Else ClearEventLog = False End Function
-
Use unattend.txt directly... [Identification] DomainAdmin="domain_account" DomainAdminPassword="domain_password" JoinDomain = "domain_name"
-
What is the best way to deploy PCs
Martin Zugec replied to fly's topic in Unattended Windows 2000/XP/2003
2fly: Nope, dont have paypal... When did I help you? It have simple advantage - you dont need to configure it from GUI, so your projects cant be absolutely unattended - e.g. technician will have one web page, he will just fill the name of pc and click proceed and the server will automatically assign FDD image to that PC and restart/wol that machine... -
Domain related unattended questions
Martin Zugec replied to ^eMpTy^'s topic in Unattended Windows 2000/XP/2003
You just need to include NIC drivers in OEMDriversPath... It is working without problems then