yasano
November 13, 2017, 10:43pm
1
I want to run a bat on “C:\Program Files ^(x86^)”.
But bigfix didn’t work it.Please help me.
My create action script is below.
cd “C:\Program Files (x86)\xxx\bin” & xxxx.cmd
on 32bit OS, the following script can run.
cd “C:\Program Files\xxx\bin” & xxxx.cmd
So I think that “()” is a problem.
Thank you
The problem is likely 32-bit redirection.
Put
action uses wow64 redirection false
somewhere before the command.
But also, “cd” is not an actionscript command so I’m not sure how the other version is working either. It should be something like
action uses wow64 redirection false waithidden cmd.exe /c "{pathname of file "xxx.cmd" of folder "xxx\bin" of program files x32 folder}"
1 Like
yasano
November 14, 2017, 5:27am
3
Thank you for your reply.
I am sorry for the shortage of explanation.
Since this xxx.cmd file does not work unless it moves to the directory, it is necessary to move the interest rate at once.
So actions step is below
Change directory to “C:\Program Files (x86)\xxx\bin”.
Run a “xxxx.cmd”
So build a batch file that does that.
action uses wow64 redirection false Delete __appendfile Appendfile cd {pathname of program files x32 folder} Appendfile cd mydir Appendfile xxx.cmd Delete doit.cmd Move __appendfile doit.cmd Waithidden cmd.exe /c doit.cmd
yasano
November 14, 2017, 9:26am
5
Thank you for your reply.
Is the following setting correct?
action uses wow64 redirection false
Delete __appendfile
Appendfile cd {pathname of program files x32 folder}
Appendfile cd "\xxx\bin"
Appendfile xxx.cmd
Delete doit.cmd
Move __appendfile doit.cmd
Waithidden cmd.exe /c doit.cmd
You’ll need to test it on your own, but it looks correct to me.
yasano
November 16, 2017, 9:42am
7
I tested .But not working…
Jason_L
November 16, 2017, 9:52am
8
Not sure if this helps, but Relevance program files folder
gives you the path name of the desired folder.
Q: pathname of program files folder
A: C:\Program Files (x86)
T: 0.719 ms
FYI, program files x64 folder
gives you the x64 counterpart.
Q: pathname of program files x64 folder
A: C:\Program Files
T: 0.634 ms
Jason_L
November 16, 2017, 9:59am
9
Sorry, looks like similar advice has been given, how about checking the doit.cmd
you generated and see if anything is wrong there?
Oh, yeah, “Program Files (x86)” has spaces in it, try spaces on the ‘cd’ command
action uses wow64 redirection false
Delete __appendfile
Appendfile cd "{pathname of program files x32 folder}"
Appendfile cd "\xxx\bin"
Appendfile xxx.cmd
Delete doit.cmd
Move __appendfile doit.cmd
Waithidden cmd.exe /c doit.cmd
yasano
November 17, 2017, 1:20am
11
I tried the following script, but not working.
action uses wow64 redirection false
Delete __appendfile
Appendfile cd "{pathname of program files folder}"
Appendfile cd "\xxx\bin"
Appendfile xxx.cmd
Delete doit.cmd
Move __appendfile doit.cmd
Waithidden cmd.exe /c doit.cmd
Jason_L
November 17, 2017, 4:17am
13
Another thing you can try is to copy the content of that “doit.cmd” and paste it in command line to see if there’s any error.
For example, if that path name has a space that is causing issues, you should be able to see some error like “directory xxx not exists”.
Oh there’s a problem on the second “cd” statement. You lead it with a backslash - so it’s backing out of Program Files (x86) again and looking for c:\xxx\bin
Appendfile cd "\xxx\bin"
should be
Appendfile cd “xxx\bin”
Jason_L
November 17, 2017, 4:22am
15
Also you have probably noticed, simply saying “not working” can’t get you very far. Logs, exit codes or at least which line is problematic, on the other hand, will be more helpful (to yourself).
1 Like
I said something very similar in the post I withdrew.
Havilly
November 18, 2017, 11:18pm
17
oh wow i actually found the solution for my problem. thanks Jason Walker a lot for explaining, everything was exactly as you mentiond. could I ask you other questions if i would have some please?!
yasano
December 4, 2017, 10:43pm
18
I tried the following script and I could confirm working.
Thank you for your cooperation.
action uses wow64 redirection false
Delete __appendfile
Appendfile cd "{pathname of program files folder}\xxx\bin"
Appendfile xxx.cmd
Delete doit.cmd
Move __appendfile doit.cmd
Waithidden cmd.exe /c doit.cmd