C
C
Clooney2014-10-23 18:27:41
cmd/bat
Clooney, 2014-10-23 18:27:41

How to tell a cmd file where to run the program from?

Through Kaspesky Security Center 10 I create an installation package, in this cmd package there is a file with the text:

start /wait Windows6.1-KB2998527-%PROCESSOR_ARCHITECTURE%.msu /quiet

And 2 update files:
Windows6.1-KB2998527-AMD64.msu
Windows6.1-KB2998527-x86.msu
When installing this package, via KSC, the start command does not find the file Windows6.1-KB2998527-%PROCESSOR_ARCHITECTURE%.msu
When running the file cmd from under the user, the file is located, a prompt is issued to enter the administrator account and the update file is launched.
If you run the cmd file as an administrator, it will give an error "Cannot find the file Windows6.1-KB2998527-AMD64.msu.".
The address string in cmd, when run as admin C:\Windows\system32>
When run as a user, the address in the console is the folder where the cmd file is run from.
The problem is that KSC runs cmd as an administrator, and as a result, the update file is not installed.
How can this problem be solved? How to tell the start command the path to the update file, where the cmd file itself is located?
Copying files to a specific location and then launching from there is not appropriate.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
oia, 2014-10-23
@oia

START [/Dpath] Windows6.1-KB2998527-%PROCESSOR_ARCHITECTURE%.msu /quiet

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question