Sure, here is the code I'm using to start the FixWelch.exe. The FixWelch.tqc file contains the command, the arguments, the user account to impersonate, and the password.
code:
If Exist("%WINDIR%\@WKSTA_FixWelch.log") AND Not Exist("%WINDIR%\@WKSTA_FixWelch.txt")
Copy "%WINDIR%\@WKSTA_FixWelch.log" "%WINDIR%\@WKSTA_FixWelch.txt"
Copy "%WINDIR%\@WKSTA_FixWelch.log" "\\SERVER\WELCHIA_LOGS"
EndIf
If Not Exist("%WINDIR%\@WKSTA_FixWelch.log")
$=MessageBox("Running Welchia Scanning Tool. Please allow this scanning tool to "+
"complete. We are monitoring the progress of this utility.","Welchia Scanning Tool")
Copy '\\$sServer\Update\Welchia\FixWelch.exe' '%TEMP%'
If InGroup('@WKSTA\Administrators')
Run '%TEMP%\FixWelch.exe /start /log=%WINDIR%\@WKSTA_FixWelch.log'
Else
$objAdminGrp = GetObject("WinNT://@WKSTA/Administrators")
If @ERROR
$=MessageBox("Unable to verify administrative account.","Welchia Scanning Tool")
Exit 1
EndIf
If $objAdminGrp.IsMember("WinNT://@DOMAIN/Domain Admins")
Run '@SCRIPTDIR\TQCRunas\TQCRunas.exe -f @SCRIPTDIR\TQCRunas\FixWelch.tqc'
Else
$=MessageBox("Unable to install under administrative account.","Welchia Scanning Tool")
EndIf
EndIf
EndIf
[ 04. September 2003, 17:41: Message edited by: Chris S. ]