Jump to content

Can't get file run


KenL
 Share

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)
Link to comment
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)
Link to comment
Share on other sites

  • 3 weeks later...
  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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...

Link to comment
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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...