Jump to content

/\/\o\/\/

Member
  • Posts

    101
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Netherlands

Posts posted by /\/\o\/\/

  1. ls,

    below an example with redirection and parameters(arguments)

    the output streams are redirected to a string that you can use in your program.

    gr /\/\o\/\/

    PS. for a batch file the trick is to use the FOR command to get the uotput from a vbscript to a variable

    for /f %%i in ('cscript //nologo bin\GetFysicalNode.vbs %source%') do set Server=%%i

    ---------------------------------------------

    Dim objProcess As New Process()

    ' Start the Command and redirect the output

    objProcess.StartInfo.UseShellExecute = False

    objProcess.StartInfo.RedirectStandardOutput = True

    objProcess.StartInfo.CreateNoWindow = True

    objProcess.StartInfo.RedirectStandardError = True

    objProcess.StartInfo.FileName() = "Cluster"

    objProcess.StartInfo.Arguments() = "/Cluster:" & strMachineName & " res /priv"

    objProcess.Start()

    strOutput = objProcess.StandardOutput.ReadToEnd()

    strError = objProcess.StandardError.ReadToEnd()

    objProcess.WaitForExit()

  2. ls,

    actualy, even the bare framework contains the compiler(s)

    for VB its VBC.EXE

    e.g. for a batchfile where you can drop an .VB file onto use the following :

    C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc /r:System.dll /r:System.DirectoryServices.DLL /r:system.management.dll %1 /out:"%~dp0%~n1"

    pause

    handy if you need a quick .NET script.

    gr /\/\o\/\/

  3. Longhorn will more likely ship 2007-2008 ->

    (looking at the new msdn longhorn articles)

    so there will be 36 + Months,

    we are now at 2,4 Mainstream,

    so Moore (remember him 2 x every 18 Months) would say 9,6 Ghz would be mainstream

    Memory should not be the problem I think (would gladly double my gig now)

    and think i will already have at least 4 gig by that time.

    the Graph would be my problem (as a not gamer)

    avalon will be heavy.

    and the disksystems-speed and backup may be a problem (not the size).

    but all by all i think the specs are high but not unrealistic.

    bc if I go to count wat will take that resources ..

    winFS (SQL engine for the 1-terra DB) would like his GIG of memory.

    then Avalon (a 3D engine for normal work) will take his price

    the video specs looks needed for me to.

    and for a server serving XML services Indigo ASP.NET and SQL. ......I think more about 16+ gig and 8 X a 8 gig processor

    but by 2008 64 bit will be also mainstream i think, so memory adressing would not be the problem this time ;-) but than again ... :)

    Even Uncle bill got it 9 zero's wrong

    gr /\/\o\/\/

  4. I hav only Read permisions on the root of C: on my workstation (and 5000 others here at work 2 :) ), for the same reasons you did mention.

    and i can work fine.

    you should be able to remove those rights, without a lot of troubles.

    gr. /\/\o\/\/

  5. hhmm,

    looks like just starting with the biggest and then work your way down,

    so fist sort

    400

    300

    200

    100

    50

    50

    20

    hmm, could be something like this

    400 OK -> take of the list put on stack

    next

    300 (400 on stack + 300 = 700 ) 640 - 700 = negative so let it on list

    next

    200 (400 + 200 = Pos) put on stack

    etc.

    till 20

    then write the CD (400 + 200 + 20)

    list is now

    300

    100

    50

    50

    then start again till list is empty

    next part would be to get a level option (2 dirs deep)

    if your doing it in VB.net or vbscript i'v got the recursive folder size part

    maybe if i'v got time I will make one.

    gr /\/\o\/\/

  6. found it :

    the WM_SETTINGCHANGE message is used to to refresh the windowssettings,

    (as set in the registry e.g. system variables)

    Declare Auto Function SendMessageTimeout Lib "User32" ( _

    ByVal hWnd As Integer, _

    ByVal Msg As UInt32, _

    ByVal wParam As Integer, _

    ByVal lParam As Integer, _

    ByVal fuFlags As UInt32, _

    ByVal uTimeout As UInt32, _

    ByRef lpdwResult As IntPtr _

    ) As Long

    Private Const HWND_BROADCAST = &HFFFF&

    Private Const WM_SETTINGCHANGE = &H1A

    Private Const SMTO_ABORTIFHUNG = &H2

    Public Sub EnvRefresh ( )

    Dim dwResult As IntPtr '

    SendMessageTimeout(HWND_BROADCAST, _

    Convert.ToUInt32(WM_SETTINGCHANGE), _

    0, 0, _

    Convert.ToUInt32(SMTO_ABORTIFHUNG), _

    Convert.ToUInt32(5000), _

    dwResult)

    MsgBox(dwResult)

    gr /\/\o\/\/

  7. Does someone know how to force the QuickLaunch to load/save his settings ?

    b.t.w. its the 8th byte that has to be set

    I wrote a short vbscript in another QuickLaunch tread in this forum

    in there is the script and the possible settings.

    problem is how to force the QuickLaunch to load / save his settings

    I tried to send an settings changed broadcast but that does not work.(see other tread)

    maybe you can send a shutdown request only to QuickLaunch ?

    gr /\/\o\/\/

    (Edited : Oops the 8th byte not the 5th (corrected), added qoutes from onther tread

    0c,00,00,00,08,00,00,00,02 < --------------

    the setting we do want is at the 8th Byte -|

    (2 in my case)

    possible are (as far as i know) 1 = disabled 2 = Off 3 = On

    Dim MyReg As Microsoft.Win32.RegistryKey = Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.CurrentUser, "YourPuter")

    Dim MyRegKey As Microsoft.Win32.RegistryKey

    MyRegKey = MyReg.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop\", True)

    Dim a As Byte()

    a = MyRegKey.GetValue("TaskbarWinXP")

    a(8) = 3 ' <- value to make selectable (removed for readability)

    MyRegKey.SetValue("TaskbarWinXP", a)

  8. Ofcourse ineXPlicable is right about the homework

    and alanol bout the screaming

    so i won't give you the batchfile, but if you double the %-signs in the following onliner you can make it a batch-file :)

    for /f "tokens=2 delims== " %i in (test.txt) do echo %i > %i.txt

    or (if you have more lines with an =-sign in it)

    for /f "tokens=1,2 delims== " %i in (test.txt) do echo %i | findstr "PCNAME" && echo %j > %j.txt

    gr /\/\o\/\/

  9. another couple

    Windows XP automatically searches the network for shares and printers upon connecting to the network. This is probably useful in a SOHO or home network but not the enterprise. To disable XP automatic discovery:

    In Explorer, click Tools

    Click Folder Options

    Click the View tab,

    Uncheck Automatically Search for Network Folders and Printers in Advanced settings list.

    under xp services disable SSDP Discovery Service

    also networkneighbourhood seems to slow things down

    HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoRecentDocsNetHood to 1

  10. this workaround works in some cases :

    Disable searching for schuduled tasks :

    HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/Current Version/Explorer/RemoteComputer/NameSpace

    delete {D6277990-4C6A-11CF-8D87-00AA0060F5BF}

    there is also a KB about reading media file properties don't know the KB number.

    below some other interesting KB articles (none of them realy worked for me)

    greetings /\/\o\/\/

    319440 Logon Delays Over Slow Links if Oplock Is Not Granted for the Policy File

    306981 Level II Oplocks Are Not Granted After a File Is Locked

    324002 Searching Files Across a Network May Leave Open Files

    296264 Configuring Opportunistic Locking in Windows

    812513 File Takes an Unexpectedly Long Time to Open Through Server Message Block Protocol

  11. OK, I will try to explain.

    you can make a CD boot into DOS,

    so if you boot from the CD you get a DOS session (just like the normal boot disk)

    instead of starting the setup from there, you want to copy so files from the disk first.

    that is wat your batchfile is made to do, problem with this senario is that you can't read the disk because the disk is formatted as NTFS.

    that is why you need NTFS for DOS.

    when you load NTFS for Dos you can read the disk and copy the files to another location. (I don't know if you can use DVD-RW under DOS, but if you build in network support in your boot-image, you can use the network, or else eg a second partition)

    now the script can start the rest of the installation.

    so all actions are before she setup starts, but you can just boot from the CD and all gets running automatic.

    gr /\/\o\/\/

×
×
  • Create New...