system
April 10, 2008, 6:20pm
1
(imported topic written by Sharonbi691)
Hi,
I’m trying to run an installation with a flag,
but for some reason it ignores the flag…
this one doesn’t work at all:
waithidden c:\filename.exe -oid 1.2.840.113741.1.54 > c:\filename.txt
waithidden “c:\filename.exe -oid 1.2.840.113741.1.54 > c:\filename.txt”
this one ignores the flag:
waithidden cmd.exe /C c:\filename.exe -oid 1.2.840.113741.1.54 > c:\filename.txt
waithidden cmd.exe /C “c:\filename.exe -oid 1.2.840.113741.1.54 > c:\filename.txt”
created a batch file which runs the same command.
when running it locally it works, when running it from the fixlet, it does nothing…
waithidden filename.bat
waithidden cmd.exe /C filename.bat
I also tried adding the runascurrentuser.exe script to all of the above commands, but the results are pretty much the same…
any ideas?
BenKus
April 11, 2008, 4:59am
2
(imported comment written by BenKus)
Hey Sharonbi,
How about this:
waithidden cmd.exe /C “c:\filename.exe” -oid 1.2.840.113741.1.54 > “c:\filename.txt”
The name of the exe should be enclosed in double quotes (especially if it has a space in it) and also the filename at the end should be enclosed in double-quotes.
Ben
system
April 14, 2008, 1:42pm
3
(imported comment written by Sharonbi691)
didn’t work.
It didn’t even create the output file that way…
system
April 14, 2008, 3:23pm
4
(imported comment written by Sharonbi691)
OK, I found the problem.
It is indeed permission problem.
the cmd that opens is opened with the “system” user
however when i add Runascurrentuser to the command in the following formats,
it gives me empty output…
waithidden RunAsCurrentUser.exe cmd.exe /C “c:\filename.exe -oid 1.2.840.113741.1.54 > c:\filename.txt”
waithidden cmd.exe /C RunAsCurrentUser.exe “c:\filename.exe -oid 1.2.840.113741.1.54 > c:\filename.txt”
tried running it locally with RunAsCurrentUser.exe and also i got nothing…
in general I narrowed it down to simpler commands.
If you can help me make it work for them, I guess it will be good for the original commands too.
cmd.exe /K ipconfig /all>c:\x.txt - works fine (locally)
however,
c:\RunAsCurrentUser.exe cmd.exe /K ipconfig /all>c:\x.txt - don’t work…
(also with “…”)
system
April 14, 2008, 5:16pm
5
(imported comment written by Sharonbi691)
After many trials & errors, I found how to do it:
Apparently it takes 2 cmd’s to bypass that problem:
waithidden “{pathname of client folder of site “SecurityProd” & “\RunAsCurrentUser.exe”}” --w cmd.exe /C cmd.exe /C “c:\XX.exe -oid 1.2.840.113741.1.54 > c:\x.txt”
Thanks!