bigfix version 10.0.0
action uses wow64 redirection {not x64 of operating system}
delete __createfile
delete "c:\temp\service.bat"
createfile until eof1
net stop WSearch
net start WSearch
eof1
move __createfile "c:\temp\service.bat"
override wait
hidden=true
runas=currentuser
wait cmd.exe /c "c:\temp\service.bat"
STATUS: Running action...
Wow64 redirection disabled. action uses wow64 redirection {not x64 of operating system}
Command succeeded delete No 'C:\Program Files (x86)\BigFix Enterprise\BES Client\__BESData\__FixletDebugger\__createfile' exists to delete, no failure reported
Command succeeded delete "c:\temp\service.bat"
Command succeeded createfile until
Command succeeded move __createfile "c:\temp\service.bat"
Command succeeded override wait
Command succeeded override hidden=true
Command succeeded override runas=currentuser
Command failed (RunAsCurrentUser: No current user session) wait cmd.exe /c "c:\temp\service.bat"
--- Result ---
Evaluation failed!
trn
July 28, 2022, 9:06am
2
change
move __createfile "c:\temp\service.bat"
to
copy __createfile "c:\temp\service.bat"
The source file is not accessible to non-admins, and āmoveā just moves the file, complete with ACL. Copy creates a new file with permissions inherited from the new parent folder.
1 Like
it works for currentuser session but did not work for domain user
Command failed (Override value is unknown for this keyword.) override runas=domain\user1 (action:20353)
This post is an attempt to demystify some of the āaction overrideā parameters and to provide some useful examples.
General Considerations
When running a script as a user, the normal user account generally does not have access to the __BESData directory or subdirectories. After creating a script with ācreatefileā or āappendfileā, or after downloading a file through ādownloadā or āprefetchā commands, the content needs to be copied to a directory the user can access.
Avoid using the āmoveā comā¦
Sorry āsentā too soon.
Runas=currentuser only picks up āat the keyboardā users, not RDP sessions. Check the tip to find other methods for RunAs that will work with RDP sessions.
akira
July 28, 2022, 10:45pm
5
To run command with specified user, you need to specify
runas=localuser
user=domain\user1
password=required