run (gpo) setup (.exe) files @ startup/logon

Home Forums Scripting DOS Command Shell run (gpo) setup (.exe) files @ startup/logon

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    APOC
    Member
    #161883

    I’d like to run the next script @ logon/startup:


    @ECHO
    OFF
    SETLOCAL ENABLEEXTENSIONS

    IF NOT EXIST “%systemroot%LOGSLKSVDDTimIrfanView-436_Deploy.txt” (GOTO IrfanView_Setup) ELSE GOTO:EOF

    :IrfanView_Setup

    if defined ProgramFiles(x86) (SET “PrgFiles=%ProgramFiles(x86)%”) ELSE (SET “PrgFiles=%ProgramFiles%”)
    REM SET “PrgFiles=”
    IF “%PrgFiles%”==”” (GOTO ERROR)

    rem *import* SetUp elevation…
    Reg.exe IMPORT “\dc01.lksvdd.localnetlogonFixIrfanviewirfanview_elevation.reg” > NUL 2>&1

    rem *SetUp* IrfanView…
    Start “SetUp IrfanView” /D”\lksvddnetlogonFixIrfanview” /MIN /WAIT /B “iview436_setup.exe” /silent /folder=”%PrgFiles%irfanview” /desktop=1 /thumbs=0 /group=1 /allusers=1 /assoc=1 /assocallusers /ini=”%PrgFiles%irfanview”

    rem *SetUp* IrfanView Plugins…
    Start “SetUp IrfanView Plugins” /D”\lksvddnetlogonFixIrfanview” /MIN /WAIT /B “irfanview_plugins_436_setup.exe” /silent

    rem *Copy* IrfanView Dutch Language .ini settings…
    Start “Copy_Custom-NL-Language files” /D”%WinDir%system32″ /MIN /B xcopy.exe “\lksvddnetlogonFixIrfanviewLanguages*.*” “%PrgFiles%irfanviewLanguages” /s /e /c /Q /h /r /y > NUL 2>&1
    Start “Copy_Custom-NL-Language .ini” /D”%WinDir%system32″ /MIN /B xcopy.exe “\lksvddnetlogonFixIrfanviewi_view32.ini” “%PrgFiles%irfanview” /c /Q /h /r /y >nul 2>&1

    REM echo.
    ECHO %DATE% %TIME%: FiNiSHED IrfanView 4.36 install +Plugins +Dutch_Language… >> “%systemroot%LOGSLKSVDDTimIrfanView-436_Deploy.txt” 2>&1
    REM echo.
    GOTO EXIT

    :EXIT
    REM echo.
    rem ECHO.script date: 09-07-2013
    REM echo.
    rem PAUSE
    GOTO:EOF

    :ERROR
    CLS
    echo.
    echo.
    ECHO ERROR:
    ECHO No “Program Files (x86)” and/or No “Program Files” path found?
    echo.
    ECHO “PrgFiles”==”%PrgFiles%”
    echo.
    ECHO variables should be: %ProgramFiles(x86)% or %ProgramFiles%
    echo.
    echo.
    PAUSE
    GOTO:EOF
    [/CODE]But my problem is that when the workstations logon, and this script run’s I get a security warning asking if I wan’t to run “iview436_setup.exe” and “irfanview_plugins_436_setup.exe” and that’s something I really don’t want to happen.

    I start/run this script with GPO: comp.conf.->policies->admin.templ.->system->logon->run these programs at user logon
    Can I elevate these setup files or what ever? I probably need an exception for these 2 files some way or another, I’m kinda stuck…

    With kind regards, Tim[CODE]

    @ECHO
    OFF
    SETLOCAL ENABLEEXTENSIONS

    IF NOT EXIST “%systemroot%LOGSLKSVDDTimIrfanView-436_Deploy.txt” (GOTO IrfanView_Setup) ELSE GOTO:EOF

    :IrfanView_Setup

    if defined ProgramFiles(x86) (SET “PrgFiles=%ProgramFiles(x86)%”) ELSE (SET “PrgFiles=%ProgramFiles%”)
    REM SET “PrgFiles=”
    IF “%PrgFiles%”==”” (GOTO ERROR)

    rem *import* SetUp elevation…
    Reg.exe IMPORT “\dc01.lksvdd.localnetlogonFixIrfanviewirfanview_elevation.reg” > NUL 2>&1

    rem *SetUp* IrfanView…
    Start “SetUp IrfanView” /D”\lksvddnetlogonFixIrfanview” /MIN /WAIT /B “iview436_setup.exe” /silent /folder=”%PrgFiles%irfanview” /desktop=1 /thumbs=0 /group=1 /allusers=1 /assoc=1 /assocallusers /ini=”%PrgFiles%irfanview”

    rem *SetUp* IrfanView Plugins…
    Start “SetUp IrfanView Plugins” /D”\lksvddnetlogonFixIrfanview” /MIN /WAIT /B “irfanview_plugins_436_setup.exe” /silent

    rem *Copy* IrfanView Dutch Language .ini settings…
    Start “Copy_Custom-NL-Language files” /D”%WinDir%system32″ /MIN /B xcopy.exe “\lksvddnetlogonFixIrfanviewLanguages*.*” “%PrgFiles%irfanviewLanguages” /s /e /c /Q /h /r /y > NUL 2>&1
    Start “Copy_Custom-NL-Language .ini” /D”%WinDir%system32″ /MIN /B xcopy.exe “\lksvddnetlogonFixIrfanviewi_view32.ini” “%PrgFiles%irfanview” /c /Q /h /r /y >nul 2>&1

    REM echo.
    ECHO %DATE% %TIME%: FiNiSHED IrfanView 4.36 install +Plugins +Dutch_Language… >> “%systemroot%LOGSLKSVDDTimIrfanView-436_Deploy.txt” 2>&1
    REM echo.
    GOTO EXIT

    :EXIT
    REM echo.
    rem ECHO.script date: 09-07-2013
    REM echo.
    rem PAUSE
    GOTO:EOF

    :ERROR
    CLS
    echo.
    echo.
    ECHO ERROR:
    ECHO No “Program Files (x86)” and/or No “Program Files” path found?
    echo.
    ECHO “PrgFiles”==”%PrgFiles%”
    echo.
    ECHO variables should be: %ProgramFiles(x86)% or %ProgramFiles%
    echo.
    echo.
    PAUSE
    GOTO:EOF
    [/CODE]But my problem is that when the workstations logon, and this script run’s I get a security warning asking if I wan’t to run “iview436_setup.exe” and “irfanview_plugins_436_setup.exe” and that’s something I really don’t want to happen.

    I start/run this script with GPO: comp.conf.->policies->admin.templ.->system->logon->run these programs at user logon
    Can I elevate these setup files or what ever? I probably need an exception for these 2 files some way or another, I’m kinda stuck…

    With kind regards, Tim

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.