cmdlines.txt + .reg files - installed into OEm folder..New to this,need help..

Discussion in 'Windows 7' started by tnx, Feb 9, 2011.

  1. urie

    urie Moderator
    Staff Member

    May 21, 2007
    9,039
    3,388
    300
    #81 urie, Feb 21, 2011
    Last edited by a moderator: Apr 20, 2017
  2. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    #82 tnx, Feb 21, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
  3. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Well

    I recon I am nearly there in achiving my goals.
    I have just installed W7 onto my test drive and there they are.All my fav web sites sat waiting for me. This makes me feel quite excited.

    Butttt....

    They are not where I want them as yet.I just did a test to see if I could make a new folder,where I wanted one. I chose C:\favorites.
    This I did and when I open C:\ there it is my new folder.
    In the OEM structure I did this
    In this folder I put all my favorite web sites copied from My Favorites.
    This folder is now sitting in C:\Windows

    I did infact just use the one RunOnce script in the OOBE.cmd and amended the Tweaks.cmd to this
    What I am going to try next is to have the files inside
    deleted and replace by my new ones.
    I recon I know what script to write,so I will get back with my results later...

    If your not bored of reading this thread by now...:biggrin:


    Cheers..


    Ohhh One thing. Do I need to put
    at the end of each line ?
     
  4. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Well it sort or worked but then again it didn' do exactly what I wanted.

    I have this tweaks.cmd
    It did copy all my fav's into the proper folder but it did not delete the other files,folders first.
    Just looking at it now should I have put

    Or has it someting to do with the
    Cheers...
     
  5. Alphawaves

    Alphawaves Super Moderator/Developer
    Staff Member

    Aug 11, 2008
    6,222
    22,280
    210
    Change this:
    To this:
     
  6. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    DAMN.....I missed an "E" off

    That just proofs I am not reading my scripts properly. This will teach me a lesson

    Cheers alphawaves.
     
  7. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    #88 tnx, Feb 21, 2011
    Last edited: Feb 21, 2011
    (OP)
    Hi guys.

    Well atill not quite there and I have pinned down the problem.
    Now running a seperate .cmd from within Windows. So I recon if I can make a .cmd work while sWindows is running I can add it to the mix for the install tweaks. If you know what I mean.
    Any way..

    For now I am forgetting about the copying of the new files into Favorites.

    Cause this script
    Is doing only half a job. It is deleting single website files from Favorites and it is deleteting files from within other folders in Favorites but it is NOT deleting ALL FOLDERS an ALL FILES...
    Does this make sence.

    I want Favorites to be totally empty of folders and files.
    I have tried many conitations of /f /s /q at the front,at the end but nothing works....

    Anybody got an idea of where I am going wrong.

    Cheers..


    Just been looking at the folders it wont delete and these are "read only" ....Is there a syntax letter i.e "/s" to delete read only folders ?
     
  8. Alphawaves

    Alphawaves Super Moderator/Developer
    Staff Member

    Aug 11, 2008
    6,222
    22,280
    210
    #89 Alphawaves, Feb 21, 2011
    Last edited by a moderator: Apr 20, 2017
    del /f /s /q will delete all files from sub directorys because /s switch is being used.

    Code:
    /P Prompts for confirmation before deleting each file. 
    /F Force deleting of read-only files. 
    /S Delete specified files from all subdirectories. 
    /Q Quiet mode, do not ask if ok to delete on global wildcard 
    /A Selects files to delete based on attributes 
    
    Edit:
    Try this, im not sure which directorys are in favourites on clean install, i think its these:

    Code:
    IF EXIST "%USERPROFILE%\Favorites" (
       TAKEOWN /a /f "%USERPROFILE%\Favorites"
       ICACLS "%USERPROFILE%\Favorites" /Grant Administrators:F
       DEL /S /F /Q %USERPROFILE%\Favorites >nul
    )
    
    IF EXIST "%USERPROFILE%\Favorites\Links" (
       RD /S /Q "%USERPROFILE%\Favorites\Links" >nul 
    )
    
    IF EXIST "%USERPROFILE%\Favorites\Microsoft Websites" (
       RD /S /Q "%USERPROFILE%\Favorites\Microsoft Websites" >nul 
    )
    
    IF EXIST "%USERPROFILE%\Favorites\MSN Websites" (
       RD /S /Q "%USERPROFILE%\Favorites\MSN Websites" >nul 
    )
    
    IF EXIST "%USERPROFILE%\Favorites\Windows Live" (
       RD /S /Q "%USERPROFILE%\Favorites\Windows Live" >nul 
    )
     
  9. ZaForD

    ZaForD MDL Expert

    Jan 26, 2008
    1,212
    200
    60
    #90 ZaForD, Feb 21, 2011
    Last edited by a moderator: Apr 20, 2017
    Hi tnx,

    Try 'RMDIR /S /Q "%USERPROFILE%\Favorites\'
    instead of 'DEL /S /F /Q %USERPROFILE%\Favorites\'

    <edit>
    Ooops,
    But alphawaves beat me to it.
    RD = RMDIR :)
    </edit>

    @Alphawaves, searchengine, or anyone else good at this stuff.

    I have this code in my 'SetupComplete.cmd'

    Code:
    IF %bios%==ACRSYS set man=Acer
    IF %bios%==HPQOEM set man=HPQ
    IF %bios%==DELL set man=Dell
    How can I make it defult to 'man=Base' if the PC isn't an Acer, HP or Dell ?

    Thanks guys.
     
  10. RickSteele

    RickSteele MDL Addicted

    Nov 12, 2009
    833
    483
    30
  11. RickSteele

    RickSteele MDL Addicted

    Nov 12, 2009
    833
    483
    30
  12. HALIKUS

    HALIKUS MDL Addicted

    Jul 29, 2009
    526
    371
    30
    To apply regedits in install i use

    @echo=off
    echo ** Apply reg extras
    FOR %%f IN (%~dp0Settings\TWEAKS\*.reg) DO regedit.exe /s %%f
    regedit /s %~dp0Settings\TWEAKS\*.reg
    SET KEY=HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce

    echo ** Apply exe extras (must be silent)
    IF EXIST "%~dp0Settings\TWEAKS\*.exe" (
    FOR /F "tokens=*" %%A IN ('DIR /B "%~dp0Settings\TWEAKS\*.exe"') DO (
    CALL "%~dp0Settings\TWEAKS\%%A"
    )
    )



    with \sources\$oem$\$$\Setup\FirstLogon.cmd and then the reg files in \sources\$oem$\$$\Setup\Settings\TWEAKS
     
  13. rasputinuk

    rasputinuk MDL Member

    May 21, 2007
    115
    7
    10
    I have been working on my own silent install and have had quite a bit of success with it. Feeling proud of myself I came to this post to find some new ideas...Seen the RunOnceEx commands, never thought of doing it that way. I will give it a go...

    However ATI drivers were giving me some stick....And apparently a few others around here and the WEB....I have came up with this soloution.....

    @echo off

    Rem : ATI Silent install

    Rem : silent install commands for Nullsoft ATI package installer
    %systemdrive%\setup /S /D=%systemdrive%\ati >NUL

    Rem : A one second delay needed here can be adjusted if needed
    CHOICE /c Y /n /T 1 /d Y >NUL

    Rem : Kill the ATI installer proper
    taskkill /f /im installmanagerapp.exe >NUL

    Rem : Re-run the ATI installer in silent mode
    %systemdrive%\ati\setup -install >NUL

    EXIT

    Just goto convert this to RunOnceEx

    Try and see:rolleyes:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Hi all...

    Firstly I aint forgot about this thread,sort of put my efforts on the back burner.
    I am still having bother with the Favorites side of my tweaks.

    I have all my other REG tweaks down and sorted out so I can easly add more if needed. What I can not do is install my favorites sites without having the original ones there as well.
    I have tried many many variations on the scripting,deleting the folders,files within "Favorites" then copying my favorites there.
    I have tried deleting "Favorites" all together then making a new folder called Favorites and copying mine into that one,same result.
    Which ever way I do it the original Favorites are still installed along side my own. I do NOT want this,I just want mine there.
    I have done it using RunOnce from the OOBE.cmd,same result.
    I have tried from a SetupComplete.cmd,same result.

    So I got to thinking that the Favorites must be populated at the very end of the install,not sure.

    This then lead me to think about where the files are stored within the actuall install disc,which .dll file.
    This info I have not found out but i did find out how to de-compile one of the .dll files which held the background images as W7 is installed. Cool to be able to change those I thought.
    But iwas unable to learn how to re-comiple files\folders back into a .dll file.
    So I have just left things alone for a while and concentraited on other projects I have running.

    Gunna have a right good read through this thread again. I have probely missed summet important.

    Ohhhh one tweak i have not pinned down which I would like to have is the speed of the mouse.I always speed it up from the default but I have not found which reg to edit. Does anybody know ?

    Any ways,cheers and catch ya laters....:biggrin:
     
  15. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Hi....What a lovely sunny day up here in Yorkshire...I may go out side soon....maybe...:cool:


    Been looking and reading and I have a little question.

    What is the difference between

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curentversion\Runonce

    and

    HKEY_CURRENT_USER\Software\Microsoft\Windows\zCurrentversion\Runonce


    I have only used the "LOCAL_MACHINE"

    Gunna try "CURRENT_USER"...
     
  16. Enigma256

    Enigma256 MDL Senior Member

    Jan 17, 2011
    357
    309
    10
    @tnx, I assume that the errant "z" is a typo? The names are very much self-explanatory. In HKLM, it'll run when anyone logs onto this machine. In HKCU, it'll run only when you (the currently-logged-on user) logs on again. And as you may infer from this, for computers that have only one user, HKLM-RunOnce and HKCU-RunOnce will have, in practice, the same effect.
     
  17. tnx

    tnx MDL Expert

    Sep 2, 2008
    1,695
    267
    60
    Yesss the "Z" is my typing....Sorry...

    Thanks for the reply....I tried the latter and it did nothing what so ever...