Jump to content
Sign in to follow this  
KenL

Can't get file run

Recommended Posts

I need to remove old citrix receiver from 20+ machines in remote area. I tried ReceiverCleanupUtility.exe /silent from sccm that did not work so I tried AutoIT script using sccm like shown below but it still not doing at all. I need help correcting this script please. The purpose is to push that through sccm and have it run silently and reboot the machine.

FileInstall("ServerDataShareReceiverCleanupUtility.exe","C:WindowstempReceiverCleanupUtility.exe")
RunWait('"C:WindowstempReceiverCleanupUtility.exe" /S /restart', "", @SW_HIDE)

Share this post


Link to post
Share on other sites

I think your code is OK... under which permissions is the CleanupUtility started, cause iirc it cleans keys in HKCU Hive?

Also you can try it with correct working directory:

FileInstall("\\ServerDataShare\ReceiverCleanupUtility.exe",@TempDir & "\ReceiverCleanupUtility.exe")
RunWait(@TempDir & '\ReceiverCleanupUtility.exe /S /restart', @TempDir, @SW_HIDE)

Share this post


Link to post
Share on other sites

How would the filea script know where to file the exe?

You should supply the full path in the first parameter or set the workdir when you shell it.

Jos

Edited by Jos

Share this post


Link to post
Share on other sites

First of all, is the UAC enabled or disabled?

Cause #RequireAdmin has a bug with UAC disabled (iirc)

I would write a log to see whats going on:

$logfile = @ScriptFullPath & ".log"

If Not IsAdmin() Then
    _FileWriteLog($logfile, "Error: not started as Admin")
EndIf

And so on, to see if files are there with fileexists and also check which user is running the script:

_FileWriteLog($logfile, "Info: Script started with user " & @UserName)

Then you can see if its a permission problem, or else...

Share this post


Link to post
Share on other sites

?

RunAs

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...