batchfile: Logging and international settings..

Discussion in 'Windows 7' started by tcntad, May 21, 2010.

  1. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,116
    1,309
    150
    Afternoon guys:)!


    I got a cmdscript i made, now im whondering two things

    1. How can i get the script to a logfile ?
    Im using the "dism <command> >> workfolder\logs\lp.log" to write to a logfile which works fine but then the process wont show in the cmdwindow, nothing but a blinking cursor. How can i get the process to show in the cmdwindow and write to logfile?


    2. In this script, i added international settings, to change keyboardlayout, standard and format, more specifically these: (hope the commands are correct here)
    "/set-userlocale"
    "/set-inputlocale"


    They both work just fine, it says language been set to whatever i want, but in setup i still get the window where i choose keyboardlayout etc. I get the strong feeling those commands doesnt change it for setup part, right ? but im sure its both? hm confused..

    How can i make setup skip that part?

    For those of you who dont know, im working on a script using dism to mount and make changes to a mounted 7 version, such as drivers, langpacks etc and now this international part..
     
  2. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,116
    1,309
    150
    Absolutely no one?
     
  3. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,116
    1,309
    150
    Absolutely no one?
     
  4. urie

    urie Moderator
    Staff Member

    May 21, 2007
    8,772
    3,121
    300
    What wim file are you editing it should be boot.wim 2 and also what ever install.wim you are mounting. say install.wim 5 for ultimate x86.
     
  5. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,116
    1,309
    150

    So for the international settings i should mount boot.wim #2 ? oke thanks.
    and then ofcourse whatever version i want for install.wim.

    Thanks alot!:)

    How about the logging part ? Thats not a big problem or so, i just feel like logging the whole thing to a file..
     
  6. urie

    urie Moderator
    Staff Member

    May 21, 2007
    8,772
    3,121
    300
    Dism log is automaticaly saved to C:\Windows\Logs\DISM

    you check there i would just read old one first then delete it let it create a fresh one so you know what you have done.

    DISM.exe [dism_options] {WIM_command} [<WIM_arguments>]
    DISM.exe {/Image:<path_to_offline_image> | /Online} [dism_options]
    {servicing_command} [<servicing_arguments>]

    /LogPath - Specifies the logfile path.
    /LogLevel - Specifies the output level shown in the log (1-4).
     
  7. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,116
    1,309
    150
    I know i can use the logpath command but i really dont want to do that :p

    I want to use ">> *.logs" if i can do that and still see the whole process in commandwindow if thats possible.
     
  8. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,116
    1,309
    150
    Edit: im little confused here what commands to use and where to place them..

    These are already figured out what they do:)
    /Set-UILang: Obviously sets language for windows
    /Set-SetupUILang: Sets language for setup
    /Set-TimeZone: Sets time zone

    But what does these commands do: ??
    /Set-UserLocale
    /Set-SysLocale
    /Set-InputLocale

    To skip the first window at setup where you pick language, keyboard and whatever more it is.. what do i need to do?

    I understand uilang goes to install.wim and setupuilang to boot.wim (#2?), and all the rest to Install.wim and/or boot.wim ?

    I need to clear this out :p
     
  9. juzz

    juzz MDL Member

    Jun 28, 2008
    132
    5
    10
    /Set-UserLocale
    "The user locale, implemented in Windows 9x, Windows NT 4.x, Windows 2000, and Windows XP, is a per-user setting that determines the formats used by default to display dates, times, currency, and numbers, and the sorting order of text. A user locale is specified for each and every account created on a computer.

    Although available user locales are often listed as a language (sometimes in combination with a country), a user locale is NOT a language setting, and has nothing to do with input languages, keyboard layouts, codepages or user interface languages. The Hebrew user locale, for example, only contains data related to the standard regional settings of Israel, not to the Hebrew language.

    Note, however, that changing the user locale will change the language used to display the names of days and months. If the long date format is used to display "November 25, 1998," the language used in the "November" string is dependent on the selected user locale.

    Changing the user locale has an immediate effect (a reboot is not required), and all running processes are notified of the change via a WININI change message.

    An English user using English Windows 2000 works in Rome, Italy. The user selects Italian (Italy) as the user locale, because he wants to use the formatting standards for Italy in his day-to-day work."



    /Set-SysLocale
    "The system locale (sometimes referred to as the system default locale), determines which ANSI, OEM and MAC codepages and associated bitmap font files are used as defaults for the system. These codepages and fonts enable non-Unicode applications to run as they would on a system localized to the language of the system locale.

    These codepages and fonts are used by non-Unicode applications to emulate operation on a system localized to the language selected as the system locale. Note that only non-Unicode applications are affected by this setting.

    The system locale is implemented in Windows 95/98, Windows NT 4.x, Windows 2000, and Windows XP. (Under Windows 95/98, the system locale is fixed based on the language version and cannot be changed. Under Windows NT 4.x, the system locale is pre-selected by the language version, but can later be modified in the Regional Settings Control Panel.)

    Windows 2000 supports system locales for any supported locale on all language versions. As the name "system locale" implies, this is a system-wide setting that affects all users, and therefore requires administrator privileges to change.

    Changing the system locale requires a reboot. Note that only those system locales for which appropriate language groups have been installed will be available to choose from.

    Examples of system locale usage:

    1.

    A German user wants to run a non-Unicode Japanese application that was designed for Japanese Windows 95. The user has to select Japanese as the system locale to do this. Note: Non-Unicode German applications will not run flawlessly anymore. German umlauts will not be displayed correctly.
    2.

    The same German user wants to type Japanese text in a non-Unicode German application. The user selects Japanese as the system locale. Note: Non-Unicode German applications will not run flawlessly anymore. German umlauts will not be displayed correctly.
    3.

    An Arabic user wants to type Arabic, French, and English in a non-Unicode Arabic application. The user should choose one of the Arabic system locales."


    /Set-InputLocale
    Specifies the input language and keyboard layout for a Windows installation.

    Input_locale can be one of two values:

    * To use the default input locale for a language, you can specify the language identifier. For example, to use the default keyboard for English (United States) that corresponds with the QWERTY keyboard, you can specify the value en-US.
    * Specify the locale ID and keyboard layout hexadecimal values. For example, for en-US, use 0409:00000409. The first value (0409) is the locale ID that represents the input language and the second value (00000409) is the keyboard layout value.

    If you want to specify more than one input locale to add support for more than one keyboard type, you can specify multiple values separated by semicolons. For example, you can specify <InputLocale>en-US; fr-FR; es-ES</InputLocale> to add support for English (US), French (France) and Spanish (Spain) keyboards. The first value listed is used as the default keyboard.
     
  10. FreeStyler

    FreeStyler MDL Guru

    Jun 23, 2007
    3,504
    3,621
    120
    #10 FreeStyler, May 24, 2010
    Last edited: May 24, 2010
    Why not set these settings using unattended.xml? much easier ;)
    So in case you ever need to change this settings you do not have to integrate these with DISM (rebuilding the whole ISO image)
     
  11. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,116
    1,309
    150
    Thanks, ill read it and see if makes more sense to me :p
    Sure i can, but i want to keep it down to minimum if i can, besides my batchscript cant create the xml file:p
    if you can make or find a program that can do this easily then let me know and ill see what can be don hehe.
     
  12. urie

    urie Moderator
    Staff Member

    May 21, 2007
    8,772
    3,121
    300
    #12 urie, May 24, 2010
    Last edited by a moderator: Apr 20, 2017
  13. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,116
    1,309
    150
    #13 tcntad, May 24, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
  14. urie

    urie Moderator
    Staff Member

    May 21, 2007
    8,772
    3,121
    300
  15. FreeStyler

    FreeStyler MDL Guru

    Jun 23, 2007
    3,504
    3,621
    120
    Everything here is written in English as well :confused:

    Anyway, like urie said, the real unattended experts are @MSFN, maybe try there?
     
  16. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,116
    1,309
    150
    yea it is but, i find it easier to read in forums where i can have things better explained, i understand alot of the text on that page you gave me but not everything,
    and its alittle to much for me to read so i loose concentration and motivation (whonder if thats the right word).

    Yep i know theyre at msfn, i could try there, altho i let 7Customizer or another smaller app create the unattended file but i feel like i want to integrate it to the image instead..
    Ive had the explanations for the commands above but where to "put them" ?
     
  17. FreeStyler

    FreeStyler MDL Guru

    Jun 23, 2007
    3,504
    3,621
    120
    You can Log every DISM command to a individual logfile, just add "/LogPath:C:\DismLogs\{filename}.log" to every command specifying the filename, eg:{filename}.log