Trilogy 4.2

Discussion in 'MDL Projects and Applications' started by timesurfer, Feb 11, 2011.

Thread Status:
Not open for further replies.
  1. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,112
    270
    I put code in .cmd file and run. I alternate entries installed/uninstalled...lol
     
  2. flare4000

    flare4000 MDL Senior Member

    Apr 23, 2010
    414
    114
    10
    I was using x64 ultimate windows 7 D: was the default drive
     
  3. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    355
    10
    #64 tomah, Feb 20, 2011
    Last edited by a moderator: Apr 20, 2017
    I'm not sure exactly what you mean by "I alternate entries installed/uninstalled" but try this in your install section:

    Code:
    :InstallACS5T
    CLS
    SET hosts=%windir%\system32\drivers\etc\hosts
    findstr /i "3dns-2.adobe.com" hosts >nul
    IF %ERRORLEVEL% EQU 0 (
    echo Asc5T is already installed...
    pause
    goto ACS5T
    )
    attrib -r %hosts%
    echo. >>%hosts%
    FOR %%A IN (
    3dns-2.adobe.com
    ...
    And try this in your uninstall section:

    Code:
    :UninstallACS5T
    CLS
    SET hosts=%windir%\system32\drivers\etc\hosts
    findstr /i "3dns-2.adobe.com" hosts >nul
    IF %ERRORLEVEL% NEQ 0 (
    echo Asc5T is already uninstalled...
    pause
    goto ACS5T
    )
    attrib -r %hosts%
    FOR %%A IN (
    3dns-2.adobe.com
    ...
    Let me know what happens. Make sure you make backups, just in case ;)
     
  4. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,112
    270
    #65 timesurfer, Feb 20, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
  5. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    355
    10
    #66 tomah, Feb 20, 2011
    Last edited: Feb 20, 2011
    My bad. Change the line:

    findstr /i "3dns-2.adobe.com" hosts >nul

    to:

    findstr /i "3dns-2.adobe.com" %hosts% >nul

    for both instances (install and uninstall).

    Also, these lines must be put after the line:

    SET hosts=%windir%\system32\drivers\etc\hosts
     
  6. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,112
    270
    Nope still no go. It just sits there like it's pausing

    It's in the IF/ELSE and EQU stuff I believe. Thank you for your time though. I appreciate it
     
  7. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    355
    10
    #68 tomah, Feb 20, 2011
    Last edited: Feb 20, 2011
    It looks like you might have missed my edit, above, regarding where the line goes. Also, when it does work, the 2>nul displays the found entry which is why I only use >nul.
     
  8. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,112
    270
    #69 timesurfer, Feb 20, 2011
    Last edited: Feb 20, 2011
    (OP)
    returns to ACS5T menu but isn't giving msg or doing anything...lol

    We tried for today thanks
     
  9. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    355
    10
    That's odd that the pause, doesn't pause. Anyways, we're almost there.
     
  10. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,112
    270
    #71 timesurfer, Feb 20, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
  11. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    355
    10
    #72 tomah, Feb 20, 2011
    Last edited by a moderator: Apr 20, 2017
  12. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,112
    270
    #73 timesurfer, Feb 20, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
  13. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    355
    10
    #74 tomah, Feb 20, 2011
    Last edited: Feb 20, 2011
    Sorry, I thought there would be no need to include a message if you are trying to install and it wasn't installed (or trying to uninstall when it was already installed). Do you think any extra messages are needed? There will be a message upon the successful install/uninstall indicating so.
     
  14. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,112
    270
    It's real simple dude. If installed when someone clicks install give already installed msg! If uninstalled when someone clicks uninstall it gives msg already uninstalled

    :shisha:
     
  15. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    355
    10
    I think we're on the same page. Doesn't the code, now, work in this manner?
     
  16. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,112
    270
    Just for uninstall

    Install doesn't give already installed msg's when already installed but does install when not already isntalled...lol
     
  17. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    355
    10
    Not sure if I mislead you somewhere but the line within the install section should be minus the quotes (around the 0) in RED.

    IF %ERRORLEVEL% EQU '0' (
     
  18. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,112
    270
    #79 timesurfer, Feb 20, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
  19. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    355
    10
    I'm glad this all lead somewhere. Anyways, good to see you're still finding new projects to spend your time on. Can't wait to see what's up next. Until then :shisha: