Quantcast
Viewing all articles
Browse latest Browse all 1056

Add_Shortcut (problem with parameters)

I need to send parameters to a CMD file, but can not find the proper way to do the shortcut.

This is the cmd SetRes.cmd (need 2 parameters eg. SetRes.cmd -r1280x720x32 -hide)
@ECHO OFF
SET SETRES="%windir%\system32\setresolution.exe"
SET BGINFO="%programfiles%\BGInfo\bginfo.exe"
SET BGINFOPARAM="%programfiles%\BGInfo\bginfo.bgi" /timer:0

TITLE Bypasser
color 0F
echo.

SET AllParams=%*
SET Param1=%1
SET Param2=%2

IF "%Param1%" == "" GOTO _ERR1
IF "%Param2%" == "" GOTO _ERR1

echo. Param: OK

IF NOT EXIST "%SETRES%" GOTO _exit

Start "" /B %SETRES% %AllParams%
Sleep.vbs 3000
Start "" /B Taskkill.exe /IM setresolution.exe

IF NOT EXIST "%BGINFO%" GOTO _exit

Start "" /B %BGINFO% %BGINFOPARAM%

EXIT


:_ERR1
	echo. Param: ERROR
	echo.
	echo. Required Param: "2" Your params: [%AllParams%]
	echo.
	pause.

:_exit

I've tried with

Add_Shortcut,StartMenu,%SMProgramDir%,#$pSystemroot#$p\system32\SetRes.cmd,"%ProgramTitle% 1280x720x32",#$pSystemRoot#$p\System32,"-r1280x720x32 -hide","#$pSystemroot#$p\system32\SetResolution.exe",2,"SetRes 1280x720x32"
or
Add_Shortcut,StartMenu,%SMProgramDir%,#$pSystemroot#$p\system32\SetRes.cmd,"%ProgramTitle% 1280x720x32",#$pSystemRoot#$p\System32,"#$q-r1280x720x32#$s-hide#$q","#$pSystemroot#$p\system32\SetResolution.exe",2,"SetRes 1280x720x32"

I tried other ways and does not work...

What am I doing wrong?

Viewing all articles
Browse latest Browse all 1056

Trending Articles