0
0
0x0202013-12-23 17:14:40
cmd/bat
0x020, 2013-12-23 17:14:40

How to make .bat understand the %ProgramFiles% environment variable correctly on an x64 system?

Good afternoon.
I am preparing the installer in the Smart Install Maker program, after the main installation, the .bat should start, which copies the file

copy /y "%Temp%\MyProg\import.dll" "%ProgramFiles%\MyProg"

but when executing the batch file, the file is copied to \ProgramFiles (x86 )\MyProg, not \ProgramFiles\
MyProg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
catHD, 2013-12-23
@catHD

CMD -> set =)
And this is the materiel :)
www.sql.ru/blogs/x11/1429

0
0x020, 2013-12-23
@0x020

I am writing a batch file for the first time, so I apologize for the questions, but how will set help me if I don’t know what the user’s folder is called and on which disk it is, for example.
As far as I understand, this batch file is executed in the cmd interpreter, which lies in Windows \ SysWOW64 and for it the environment variable % ProgramFiles% is always equal to ProgramFiles (x86)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question