G
G
Gas12342022-01-11 17:59:09
cmd/bat
Gas1234, 2022-01-11 17:59:09

I need to fix the line in the batch file, because the executable file does not start, how to do this?

Help fix.
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run /v cyl /t REG_EXPAND_SZ /d C:\Users\%AllUsersProfile%\AppData\cyl.exe I

suspect %AllUsersProfile% is the problem
but I don't I know what else to replace it with, so that there is a right path for any user.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kisaa, 2022-01-12
@kisaa

https://www.computerhope.com/issues/ch000088.htm
Perhaps you should just have %AllUsersProfile%\cyl.exe?

E
Eugene, 2022-01-15
@yellowmew

for starters: in bat files %AllUsersProfile%it should look like %%AllUsersProfile%%
Secondly, check if this variable exists at all and where it leads: on the command line
echo %AllUsersProfile%
And, of course, C:\Users in the original batch file is superfluous, because in modern Windows AllUsersProfile leads to C: \ProgramData
At the same time, check if your executable file exists at the path specified in AllUsersProfile

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question