Skip to main content
added 44 characters in body
Source Link

scriptstrong textscript.bat placed on the sendTo folder(file setted running as admin from properties -> advanced -> run as admin)

@echo off

cd %~dp1

echo %~dp1

echo "%~1"

pause

if i pass a parameters to this file with right click-->sendto--> script.bat for example a file superuser acc.txt the script, works, but if i run the script as admin, a cmd windows showup for a second and dont work.

How can i run this script as admin? after this snippet of code, there is a command that require admin privilege.

edit #1 i think the problem is related to the filename or pathname with spacefilename or pathname with space inside like "c:\path to space" or "file with space.txt" and running the script as administrator.and running the script as administrator.

script.bat placed on the sendTo folder(file setted running as admin from properties -> advanced -> run as admin)

@echo off

cd %~dp1

echo %~dp1

echo "%~1"

pause

if i pass a parameters to this file with right click-->sendto--> script.bat for example a file superuser acc.txt the script, works, but if i run the script as admin, a cmd windows showup for a second and dont work.

How can i run this script as admin? after this snippet of code, there is a command that require admin privilege.

edit #1 i think the problem is related to the filename or pathname with space inside like "c:\path to space" or "file with space.txt" and running the script as administrator.

strong textscript.bat placed on the sendTo folder(file setted running as admin from properties -> advanced -> run as admin)

@echo off

cd %~dp1

echo %~dp1

echo "%~1"

pause

if i pass a parameters to this file with right click-->sendto--> script.bat for example a file superuser acc.txt the script, works, but if i run the script as admin, a cmd windows showup for a second and dont work.

How can i run this script as admin? after this snippet of code, there is a command that require admin privilege.

edit #1 i think the problem is related to the filename or pathname with space inside like "c:\path to space" or "file with space.txt" and running the script as administrator.

added 44 characters in body
Source Link

script.bat placed on the sendTo folder(file setted running as admin from properties -> advanced -> run as admin)

@echo off

cd %~dp1

echo %~dp1

echo "%~1"

pause

if i pass a parameters to this file with right click-->sendto--> script.bat for example a file superuser acc.txt the script, works, but if i run the script as admin, a cmd windows showup for a second and dont work.

How can i run this script as admin? after this snippet of code, there is a command that require admin privilege.

edit #1 i think the problem is related to the filename or pathname with space inside like "c:\path to space" or "file with space.txt" and running the script as administrator.

script.bat placed on the sendTo folder(file setted running as admin)

@echo off

cd %~dp1

echo %~dp1

echo "%~1"

pause

if i pass a parameters to this file with right click-->sendto--> script.bat for example a file superuser acc.txt the script, works, but if i run the script as admin, a cmd windows showup for a second and dont work.

How can i run this script as admin? after this snippet of code, there is a command that require admin privilege.

script.bat placed on the sendTo folder(file setted running as admin from properties -> advanced -> run as admin)

@echo off

cd %~dp1

echo %~dp1

echo "%~1"

pause

if i pass a parameters to this file with right click-->sendto--> script.bat for example a file superuser acc.txt the script, works, but if i run the script as admin, a cmd windows showup for a second and dont work.

How can i run this script as admin? after this snippet of code, there is a command that require admin privilege.

edit #1 i think the problem is related to the filename or pathname with space inside like "c:\path to space" or "file with space.txt" and running the script as administrator.

added 30 characters in body
Source Link

script.bat placed on the sendTo folder(file setted running as admin)

@echo off

cd %~dp1

echo %~dp1

echo "%~1"

pause

if i pass a parameters to this file with right click-->sendto--> script.bat for example a file superuser acc.txt the script, works, but if i run the script as admin, a cmd windows showup for a second and dont work.

How can i run this script as admin? after this snippet of code, there is a command that require admin privilege.

script.bat placed on the sendTo folder

@echo off

cd %~dp1

echo %~dp1

echo "%~1"

pause

if i pass a parameters to this file with right click-->sendto--> script.bat for example a file superuser acc.txt the script, works, but if i run the script as admin, a cmd windows showup for a second and dont work.

How can i run this script as admin? after this snippet of code, there is a command that require admin privilege.

script.bat placed on the sendTo folder(file setted running as admin)

@echo off

cd %~dp1

echo %~dp1

echo "%~1"

pause

if i pass a parameters to this file with right click-->sendto--> script.bat for example a file superuser acc.txt the script, works, but if i run the script as admin, a cmd windows showup for a second and dont work.

How can i run this script as admin? after this snippet of code, there is a command that require admin privilege.

Source Link
Loading