Jump to content

tniaudit.exe error on logon script


Guest smteleco

Recommended Posts

Guest smteleco
Posted

Hi

 

I've put in the logon script on my domain for auditing my pc's.

 

Some users obtain an "c:\tniaudit.exe" error.

 

It'S like the file cannot be copied on the c drive of some users.

 

Is it possible to force the copy? or run the tniaudit with administrative privil?ge?

Guest smteleco
Posted
Hi !

 

Have you tried running your script with "Run As" using Administrator account ?

 

What do yo mean?

 

How can I run a script with administrative privilege?

Posted

Try the following

 

RUNAS USAGE:

 

RUNAS [/profile] [/env] [/netonly] /user:<UserName> program

 

/profile if the user's profile needs to be loaded

/env to use current environment instead of user's.

/netonly use if the credentials specified are for remote access only.

/user <UserName> should be in form USER@DOMAIN or DOMAIN\USER

program command line for EXE. See below for examples

 

Examples:

> runas /profile /user:mymachine\administrator cmd

> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"

> runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""

Guest smteleco
Posted

I'm not sure to understand exactly the command runas!

 

I use this script:

 

@ECHO OFF

SET COPYCMD=/Y

xcopy \\my_Server\netlogon\tni*.* c:\ /D

start c:\tniaudit.exe /scripted

 

Should I replace the last line with:

 

RUNAS /env /user:administrator@My_domain.com "c:\tniaudit.exe /scripted"

 

???

 

Thanks for your help

Posted

RUNAS command will ask for the administrator's password, so that's not a very good solution for login script.

Some users may have no rights to write to the root of disk "C:". I would recommend to change the script as the following:

@ECHO OFF
SET COPYCMD=/Y
xcopy \\my_Server\netlogon\tni*.* %TEMP% /D
start %TEMP%\tniaudit.exe /scripted

I suppose that "savepath" parameter in the file tniaudit.ini points to some shared folder so you will not have to look for the result files in %TEMP% directories instead of C: roots.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...