[Batch] root

Discussion in 'Scripting' started by thethingy, Feb 21, 2011.

  1. thethingy

    thethingy MDL Senior Member

    Sep 7, 2010
    301
    41
    10
    #41 thethingy, Mar 1, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
    oh yes;

    Code:
    @echo off  
      
    IF ''%processor_architecture%'=='x86' (  
    Set File=32Test.txt  
    ) ELSE (  
    Set File=64Test.txt  
    ) 
    
    thanks again, what other cmds need the %%blah%% ?
     
  2. Alphawaves

    Alphawaves Super Moderator/Developer
    Staff Member

    Aug 11, 2008
    6,181
    21,957
    210
    #42 Alphawaves, Mar 1, 2011
    Last edited by a moderator: Apr 20, 2017
  3. thethingy

    thethingy MDL Senior Member

    Sep 7, 2010
    301
    41
    10
    ^ta, now for creating an xml file, you know how xml's are set out with spacing like this;


    [​IMG]


    is it really necessary to have the spacing set like that or can the script just start from the the start of the doc?, if not how do you get the line spacing in the cmd?
     
  4. Alphawaves

    Alphawaves Super Moderator/Developer
    Staff Member

    Aug 11, 2008
    6,181
    21,957
    210
    #44 Alphawaves, Mar 1, 2011
    Last edited by a moderator: Apr 20, 2017
    Example:

    Note the placements of ^

    Code:
    echo             ^<OOBE^> >>"%~dp0ai.xml"
    echo                 ^<HideEULAPage^>true^</HideEULAPage^> >>"%~dp0ai.xml"
    echo                ^<HideWirelessSetupInOOBE^>true^</HideWirelessSetupInOOBE^> >>"%~dp0ai.xml"
    echo                ^<ProtectYourPC^>1^</ProtectYourPC^> >>"%~dp0ai.xml"
    echo                ^<NetworkLocation^>Home^</NetworkLocation^> >>"%~dp0ai.xml"
    echo            ^</OOBE^> >>"%~dp0ai.xml"
    echo            ^<VisualEffects^> >>"%~dp0ai.xml"
    echo                ^<FontSmoothing^>Standard^</FontSmoothing^> >>"%~dp0ai.xml"
    echo            ^</VisualEffects^> >>"%~dp0ai.xml"