Jump to content

MHz

Member
  • Posts

    1,691
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Australia

Posts posted by MHz

  1. AFAIK, W2K does not execute the RunOnceEx key at startup so you may need to invoke the action from the RunOnce key.

    Add the below commands to the end of your RunOnceEx.cmd and test it.

    SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
    REG ADD %KEY% /V "_RunOnceEx" /D "rundll32.exe iernonce.dll,RunOnceExProcess" /f

    :)

  2. Hello, I would like to include support for every complex script (language), in my XP Installation Disk and was wondering if including the newest Microsoft Uniscribe Unicode Script Processor would satisfy my requirements.

    Thank you in advance for any advice for or to the contrary.

    Windows XP already includes support for the "Microsoft Uniscribe Unicode Script Processor". As of SP2, the version is 1.420.2600.2180 taken from usp10.dll. If you want a later version, then look here for some advice.

    :)

  3. @jaclaz

    Yeah, I agree that seek times could be a problem under certain conditions. And probably being a FAT filesystem could hinder performance some. For NTFS, seeking is affected by having to read the MFT each time and returning to the location of where the file is, so seek maybe not much of a performance hit.

    @maxXPsoft

    I am not sure how much you can do with DOS 6.22 since long ago that I used. But you do have some other options available with switches to enhance the usage of CD or other commands. And if long filename support is available then using quotes may help.

    An example of using the /D switch with CD allows you to change the current working directory to another drive.

    @echo off
    CD /D "D:\"
    For %%A in ("*.*") Do (
    Echo Main gets "D:\%%A"
    Echo Sheets gets "D:\%%A"
    )
    CD /D "C:\"
    For %%A in ("*.*") Do (
    Echo Main gets "C:\%%A"
    Echo Sheets gets "C:\%%A"
    )
    pause

    You may even look at using PushD and PopD if suitable.

    And this may work for you though I am getting some what lost with understanding your paths now.

    CD /D "H:\SHOPMFG\SECOND~1\COOPER~1"
    For %%A in ("Main\*.*") Do (
    Copy /Y "Main\%%A" "C:\Data1\"
    Copy /Y "Sheets\%%A" "C:\Data2\"
    )
    CD /D "C:\"

  4. For the purpose of identification of variables in cmd scripts, using all caps helps you to know that you are using a valid variable within your script. A small script is easy to manage but as they get bigger, then stricter control of variables is needed to save mistakes. It also helps with in programming editors that can invoke an autocomplete box with a selection of items and so if you choose an item with all caps then you know that it is a variable.

    @echo off

    set VARIABLE=string

    echo Contents of the variable is %VARIABLE%

    pause

    As shown above, I can identify the variable clearly used so confusion is avoided. The lower case use of variable is just a string. It is not a concept from the book of cmd scripting (if the book even exists) but it is simply a concept that I choose to use.

    :)

  5. why would they support a rival commercial codec anyway while they have their own codecs in competition.
    What are you mean?!!

    If WMP does not play the real file format, then it is like saying to the webmasters that the format is not suitable for the average user so it influences them to use formats that WMP uses. History tells us about 10 years ago that you had to use the ad ridden/or buy it player called RealPlayer. There was a lot more use of the real format on websites everywhere so you needed RealPlayer to play them. When another player added support for the real format, RealNetworks made an issue over it and not sure whether it went to court or what happened. The last I remember about the RealPlayer, it became the RealOnePlayer and I have refused to use it since. Over the years, the real format has declined as I assume that webmasters noticed that supporting the format is not in the interest of those average users with basic windows apps like WMP.

    This is getting drawn out so hopefully you have some information to acknowledge why things are not always easy and straight forward.

  6. but Why don't Winamp support don't support real format?

    may be as you say that they need a License for that !!

    I am going to guess that because WinAmp is commercial, that they are a target for compensation if they use the codec. Same as Microsoft are commercial and would be a target for doing the same. You cannot make much money to sue freeware media players so they are maybe safe. As far as Microsoft would go, why would they support a rival commercial codec anyway while they have their own codecs in competition. What I have said are assumptions on knowledge without absolute proof so hopefully I am not misleading anyone.

  7. ...open it's secrets to the world without compensation.

    Compensation? For what? for being able to interact with other PCs and vice versa no matter the OS. My belief is Microsoft will recreate themselves to be more transparent else they will perish (but that is just my opinion as I see open source will continue to rise in end users confidence).

  8. NO

    I post this topic as i don't know why Microsoft don't support real formats?

    Perhaps because Microsoft do not have permission to support real formats.

    as there are a lot of player that do this job.

    They would have permission or they are liable to be sued.

    i don't wanna to make any software patents

    And no one is asking you to, nor was it ever mentioned that you needed to.

    By any chance, if you consider creating your own media player to distribute, then I would suggest seeking legal advice before doing so as I consider that you do have not enough knowledge to understand what you would be getting yourself into. Microsoft would be aware of such legal implications with patented codecs so I guess they choose not to support RealNetworks codecs.

  9. I use AutoIt for just about everything. I use silent install if switches if available for ease and automate when needed.

    Here are some links for you to browse

    AutoIt3

    Scite4AutoIt3

    CMenu

    SendToA3X

    If you want to record an AutoIt script then look at AutoItMacroGenerator in Scite4AutoIt3. While using AutoItMacroGenerator, click on the window title to record to WinWait and then click the button or other control to add the function to continue. Just that easy. Good luck.

    :)

  10. also is there a preferably free utility to disable ALT-F4?.

    This is application-specific behavior, and each application can choose whether to process or ignore a WM_CLOSE request. Thus it is up to Firefox to ignore the message sent when Alt+F4 is pressed. One way is to disable some keys on the keyboard to prevent the global use to these key/s. You could try this application here but take care with committing changes. There maybe a option in the Group Policy within the OS to disable Alt+F4, so check that 1st. I seem to remember that a gui tool exist in the MS resource tools to change scancodes but cannot be certain of it's worth.

  11. I just didnt want to create a new topic for this question of mine but in Diskkeeper there was an option to optimize and increase the size of your MFT tables. Does PerfectDisk have a similar feature? I did notice a bit more zippiness after doing the Diskkeeper MFT size optimization thats why I ask. Maybe it could be a placebo effect but it would be good to know. Thanks!

    To increase the MFT size reservation, even if you consider that you need to which I do not then use the below registry file.

    Windows Registry Editor Version 5.00

    ;MasterFileTable Sizing - 1=Default 12.5% 2=Medium 25% 3=Larger 37.5% 4=Maximun 50%
    ;======================
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
    "NtfsMftZoneReservation"=dword:00000002

  12. I've also tried using the sleep command with different timings to delay the sendkey function within the vbs with inconsistant mixed results.

    Sendkeys is somewhat primative in operation. You could make use of AutoItX.dll (used from your VBScipt) or AutoIt3 to help automate it much more reliably. AutoItX.dll can be found in the AutoIt3 installation.

    This is a way to wait for the window to activate if you still want to use SendKeys. The function will wait for up to 5 seconds when called.


    Dim WshSHell
    Set WshShell = CreateObject("WScript.Shell")
    On Error Resume Next
    WshShell.Run("Royale.msstyles")
    If WinWaitActive("Display Properties", 5) Then
    WshShell.SendKeys("~")
    End If

    Function WinWaitActive(text, timeout)
    Dim timediff, timestart, timestop
    timestart = Timer
    Do
    timestop = Timer
    timediff = timestop - timestart
    If timeout And timediff > timeout Then
    Exit Function
    End If
    WScript.Sleep 250
    Loop Until WshShell.AppActivate(text)
    WinWaitActive = True
    End Function

    :)

  13. Perhaps the script could check of the existence of the WIN51 file?


    Dim ws, fs, windir, colDrives, objDrive, strCD, checkfile
    Set ws = WScript.CreateObject("WScript.Shell")
    Set fs = CreateObject("Scripting.FileSystemObject")
    windir = ws.ExpandEnvironmentStrings ("%SYSTEMROOT%")
    Set colDrives = fs.Drives
    checkfile = False
    For Each objDrive in colDrives
    If fs.FileExists(objDrive.DriveLetter & ":\WIN51") Then
    strCD = objDrive.DriveLetter & ":"
    checkfile = True
    Exit For
    End If
    Next

    '**********************************************************************
    '** Subroutine; Copy the i386 folder from the source media and make **
    '** the appropriate registry entries. **
    '**********************************************************************
    Sub CopySource
    Dim strKeyPath
    strKeyPath = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\"
    fs.CopyFolder (strCD & "\i386"), (windir & "\i386"),True
    If fs.FolderExists(windir & "\i386\svcpack") Then fs.DeleteFolder(windir & "\i386\svcpack"),True
    ws.RegWrite strKeyPath & "SourcePath", "%systemroot%\\i386\\", "REG_SZ"
    ws.RegWrite strKeyPath & "ServicePackSourcePath", "%systemroot%\\i386\\", "REG_SZ"
    End Sub

    '**********************************************************************
    '** Run Tasks **
    '**********************************************************************
    If checkfile Then
    CopySource
    Else
    MsgBox "No Win51 file found in the root of any drive"
    End If

  14. I know which way I will be doing it... :thumbup

    Different needs for different folks and glad you see something good for yours.

    When you mention installing direct from CD/DVD (silent install has conditions with this read only media concept)

    Usually InstallShield installers make a log file within the setup directory when using silent installation so you can may need to use the /f2"PathToFile.log" switch if supported by that version/type of InstallShield installer. If the InstallShield installer cannot make a log on the read only medium, then it may abort with a error without using the /F2 switch mentioned.

    :)

  15. On the RunOnceEx.cmd page is a link for $OEM$ Distribution Folders. The explanation mentioned in the link is very good.

    I modified the guides example to make install from "$OEM$\Install" on CD/DVD media. I also used Call to make the Labels act like subroutines to generate the registry key/value numbers for ease. Perhaps good if you stick with basics to learn but it does show how to set the path to your installation files if you want to install from CD/DVD media. Just the Call commands should need alteration in the :Main labeled area for use


    cmdow @ /HID
    @Echo Off
    Goto :Main

    :: Install programs from subfolder of $OEM$ named "Install".
    :: %~dp0 is the path to this cmd script (including trailing backslash as tested on WinXP).
    :: %INSTALLROOT% is the path to this cmd script with the "Install" folder concatenated to it.
    :: %~nx0 is the name of this cmd script with extension.
    :: If "%INSTALLROOT%\" does not exist, then it will be logged to %SYSTEMDRIVE%\SetupError.log.
    :: Call :WindowTitle uses the parameter as a window title to add to registry.
    :: Call :ProgramTitle uses the parameter as program title, increases %PROGRAM_NUMBER% by 1,
    :: sets %COMMAND_NUMBER% to 0 and then adds to registry.
    :: Call :Command uses the parameter as a command, increases %COMMAND_NUMBER% by 1 and then
    :: adds to registry.
    :: Call :RunOnceExProcess to immediately execute RunOnceEx entries with the registry.

    :Main
    SetLocal
    Set KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
    Set PROGRAM_NUMBER=1000
    Set COMMAND_NUMBER=0
    Set INSTALLROOT=%~dp0Install
    If Not Exist "%INSTALLROOT%\" (
    Echo %~nx0 : INSTALLROOT "%INSTALLROOT%\" not found>>%SYSTEMDRIVE%\SetupError.log
    Goto :EOF
    )

    Call :WindowTitle "Installing Applications"

    Call :ProgramTitle "Adobe Reader 6"
    Call :Command "%INSTALLROOT%\AdobeReader6\AR6.msi /qn"

    Call :ProgramTitle "Alcohol 120"
    Call :Command "%INSTALLROOT%\alcohol\setup.exe /qn"
    Call :Command "REGEDIT /S %INSTALLROOT%\alcohol\register.reg"

    Call :ProgramTitle "Diskeeper 8"
    Call :Command "%INSTALLROOT%\DiskeeperPro_8.0.459.exe /s /v/qn /f2%TEMP%\DiskeeperPro.log"

    Call :ProgramTitle "Importing Registry Tweaks"
    Call :Command "REGEDIT /S %INSTALLROOT%\regtweaks.reg"

    Call :ProgramTitle "Cleaning Up and Rebooting"
    Call :Command "%INSTALLROOT%\cleanup.cmd"

    EndLocal
    Goto :EOF

    :WindowTitle
    REG ADD %KEY% /V TITLE /D %1 /f
    Goto :EOF

    :ProgramTitle
    Set /a PROGRAM_NUMBER+=1
    Set COMMAND_NUMBER=0
    REG ADD %KEY%\%PROGRAM_NUMBER% /VE /D %1 /f
    Goto :EOF

    :Command
    Set /a COMMAND_NUMBER+=1
    REG ADD %KEY%\%PROGRAM_NUMBER% /V %COMMAND_NUMBER% /D %1 /f
    Goto :EOF

    :RunOnceExProcess
    Start /Wait rundll32.exe iernonce.dll,RunOnceExProcess
    Goto :EOF

    :)

×
×
  • Create New...