Guest smteleco Posted January 21, 2009 Report Share Posted January 21, 2009 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? Quote Link to comment
VisionQuest Posted January 21, 2009 Report Share Posted January 21, 2009 Hi ! Have you tried running your script with "Run As" using Administrator account ? Quote Link to comment
Guest smteleco Posted January 21, 2009 Report Share Posted January 21, 2009 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? Quote Link to comment
VisionQuest Posted January 21, 2009 Report Share Posted January 21, 2009 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\"" Quote Link to comment
VisionQuest Posted January 21, 2009 Report Share Posted January 21, 2009 Check the site for more help on the login scripts. https://www.rlmueller.net/LogonScriptFAQ.htm Quote Link to comment
VisionQuest Posted January 21, 2009 Report Share Posted January 21, 2009 Onther thing you can try is a batch file with: @ECHO OFF XCOPY <SOURCE> <DESTINATION> /Y EXIT or go have a look at the Microsoft guides for Logon Scripts at https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc757263(v=ws.10)?redirectedfrom=MSDN Quote Link to comment
Guest smteleco Posted January 21, 2009 Report Share Posted January 21, 2009 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 Quote Link to comment
Support Posted January 22, 2009 Report Share Posted January 22, 2009 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. Quote Link to comment
Guest smteleco Posted January 22, 2009 Report Share Posted January 22, 2009 thanks! it'S working!!! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.