Logged in user

(imported topic written by SystemAdmin)

Greetings all,

I have read other posts on how to RunAsCurrentUser, but what is the syntax for current user? As an example, I know the System32 folder can be targeted as “(system folder)” or to target the Windows directory wether it is “Windows” or “WINNT” i can use “(Windows folder)”. Would the current user be “(current user)”? Basically I am looking for the BigFix equivalent of the DOS command “%currentuser%”. I need to copy two files, one to the “All Users” desktop and the other to the current user’s profile.

copy __Download\NXG Reconciliation.lnk “C:\Documents and Settings\All Users\Desktop\NXG Reconciliation.lnk”

copy __Download\nxg.dat “C:\Documents and Settings{name of current user as string}\nxg.dat”

Any ideas? Thank you

(imported comment written by jessewk)

Hi Alfred,

It looks to me like your syntax should work, except you will need quotes around the first path because the filename has a space in it.

The only property of ‘current user’ is name. So you can just substitute {name of current user} wherever you’d like the name to appear. However, make sure you add ‘exists current user’ to the relevance of you action or you will get failures.

-Jesse