- Local time
- 5:51 PM
- Posts
- 79
- OS
- Windows 11 Home 23H2
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
both of the commands @TairikuOkami shared are for normal .bat files. you ran start "" in ise, which is powershell. run that command by itself in a command prompt and see if it worksI don't understand what is your solution. I'm so sorry
but still doesn't work if you put the 'move /y' lines in your original .bat?
::::::::::::::::::::::::::::::::::::::::::::
:: Automatically check & get admin rights V2
::::::::::::::::::::::::::::::::::::::::::::
@echo off
CLS
ECHO.
ECHO =============================
ECHO Running Admin shell
ECHO =============================
:init
setlocal DisableDelayedExpansion
set "batchPath=%~0"
for %%k in (%0) do set batchName=%%~nk
set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs"
setlocal EnableDelayedExpansion
:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
:getPrivileges
if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges)
ECHO.
ECHO **************************************
ECHO Invoking UAC for Privilege Escalation
ECHO **************************************
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%"
ECHO args = "ELEV " >> "%vbsGetPrivileges%"
ECHO For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%"
ECHO args = args ^& strArg ^& " " >> "%vbsGetPrivileges%"
ECHO Next >> "%vbsGetPrivileges%"
ECHO UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%"
"%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %*
exit /B
:gotPrivileges
setlocal & pushd .
cd /d %~dp0
if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1)
::::::::::::::::::::::::::::
::START
::::::::::::::::::::::::::::
REM Run shell as admin (example) - put here code as you like
ECHO %batchName% Arguments: %1 %2 %3 %4 %5 %6 %7 %8 %9
move /y "D:\SOURCE\*.*" "D:\DESTINATION"
chcp 65001 > nul
dir /b "C:\Users\GARLIN\Downloads\DIEGO\Bandeja de entrada"
dir /b "C:\Users\GARLIN\Downloads\DIEGO\Bandeja de entrada\000 Móvil\Vídeos"
move /y "C:\Users\GARLIN\Downloads\DIEGO\Bandeja de entrada\000 Móvil\Vídeos\*.*" "C:\Users\GARLIN\Downloads\DIEGO\Bandeja de entrada\Videos"
chcp 1252 > nul
dir /b "C:\Users\GARLIN\Downloads\DIEGO\Bandeja de entrada"
dir /b "C:\Users\GARLIN\Downloads\DIEGO\Bandeja de entrada\000 Móvil\Vídeos"
move /y "C:\Users\GARLIN\Downloads\DIEGO\Bandeja de entrada\000 Móvil\Vídeos\*.*" "C:\Users\GARLIN\Downloads\DIEGO\Bandeja de entrada\Videos"