RBrown1375 Posted April 2, 2012 Share Posted April 2, 2012 Is there anything special you have to do to make an AutoIT .exe run with SCCM? The package works fine if I right click and run it as Admin from the SCCM cache folder. I can get SCCM to deleiver the package to the system, but it just won't run the app. I have the AutoIT .exe in the "command line" of SCCM package settings and I selected "Run as Admin" in the setup portion of the package in SCCM and I made sure there are no spaces in the name of the app, but it just won't run when it hit the desktop from the SCCM cache folder. It's happening the same on Windows XP and 7. Thank You for any ideas! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 2, 2012 Moderators Share Posted April 2, 2012 RBrown1375, This question had nothing at all to do with the one in your previous thread where you initially posted it. Much better to start a new thread in that case rather than add it to the old thread. I have done it for you this time - please do it yourself in future. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 2, 2012 Moderators Share Posted April 2, 2012 Hi, RBrown1375. I am working with a customer right now that is on SCCM2007, and have no problem running a couple dozen different AutoIT packages. If you would like to post your code, or a reproducer, we can take a look to see if we can assist "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
RBrown1375 Posted April 2, 2012 Author Share Posted April 2, 2012 #include <Array.au3> #include "RecFileListToArray.au3" PST() Func PST() Local $aArray, $aDrives = DriveGetDrive("FIXED") ; Read the Help file about DriveGetDrive. If @error = 0 Then For $i = 1 To $aDrives[0] $aArray = _RecFileListToArray($aDrives[$i] & "", "*.pst", 1, 1, 0, 2) If @error Then ContinueLoop EndIf For $j = 1 To $aArray[0] ;ConsoleWrite("FileDelete(" & $aArray[$j] & ")" & @CRLF) FileDelete($aArray[$j]) Next Next EndIf EndFunc ;==>PST Here is my code. I can get the package to the machine, but it just won't execute? I does need to run in Admin mode and I have that set as well in the SCCM package settings. I have looked over JLogan3o13 posts on the same topic and made a change to give the users access but nothing changed. Thank You! Also, Melba23, thanks for starting a new thread. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 2, 2012 Moderators Share Posted April 2, 2012 (edited) To begin with, can you let me know your SCCM settings: Mandatory collection? Pushing to XP/Win7 or both? etc.? I'll try to duplicate the package and let you know what I find. Edit: I implemented your code, unchanged, and it seems to work as expected. I have it set up as a Mandatory assignment, configured to run only when the user is logged in, with Admin Rights, allow Users to interact with the program. It works for me on both XP and Win 7. Edited April 2, 2012 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
RBrown1375 Posted April 2, 2012 Author Share Posted April 2, 2012 I built a test group of three systems. 1 Windows XP, 1 Windows 7x32 and 1 Windows 7 x64 and all three are a VM running with VM player on a Windows 7x64 desktop. My Settings are:Access Accounts have full controlI have my main server as the distribution pointIn my source folder on my distribution point, I have the AutoIT package in a folder called "Source Files".The command line is the DeleteTWPst.exe fileRun hiddenRequirements are any platformEnvironment is When user is logged on, run as admin, allow users to interact and Runs with UNC NameAdvanced Run once for every user who logs and I just saw this......Disable this program on computers where it is advertised is checked - Smoking gun?Under AdvertisementsProgram is my PST removal program from above and collection is my test collectionSchedule: has been as soon as possible and I set a start and stop.Distribution points Download content run locally, allow clients to fall back.....I'm going to run a test with that one setting above removed and I'll let you know what happens.Thanks Link to comment Share on other sites More sharing options...
RBrown1375 Posted April 2, 2012 Author Share Posted April 2, 2012 (edited) Maybe I'm doing some thing wrong. How do you set it to mandatory assignment? I have the program set to priority high. Edited April 2, 2012 by RBrown1375 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 2, 2012 Moderators Share Posted April 2, 2012 In the SCCM console, go to Software Distribution, then Advertisements, and find your Program. Right click and go to Properties, then the Schedule tab. In the middle of the tab is a box with the label Mandatory assignments, click the yellow "starburst" icon, and choose Assign immediately, and As soon as possible from the drop down menu. To answer your other question, if Disable on computers where it is advertised is checked, it will definitely not run. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
RBrown1375 Posted April 2, 2012 Author Share Posted April 2, 2012 I had the mandatory correct, but I did uncheck the Disable and am testing now. Thanks Again. I just can't figure out why it won't kick off. Take care. Link to comment Share on other sites More sharing options...
RBrown1375 Posted April 3, 2012 Author Share Posted April 3, 2012 One last question about this. I have been testing this all day and I can deliver the AutoIT.exe but it won't run. Have you ever heard of an AD or SCCM policy that might inhibit this from executing? I'm using Admin rights on everything and it won't kick off. If I run it by hand after SCCM delivers the package, it runs fine???? Thanks Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 3, 2012 Moderators Share Posted April 3, 2012 Hi, RBrown1375. As mentioned yesterday, your script works fine through SCCM for me, set to mandatory delivery. I know it is a pain, but you may want to delete the entire package, as well as the associated advertisement, and recreate it from scratch. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
RBrown1375 Posted April 5, 2012 Author Share Posted April 5, 2012 Trying that now. Cheers Link to comment Share on other sites More sharing options...
RBrown1375 Posted April 5, 2012 Author Share Posted April 5, 2012 (edited) How can I build in Administrative rights into my package? SCCM is not doing it and the package runs but not as the Admin and it fails to delete the files. I have had the same problem on XP and Win 7. I went into my script added #RequireAdmin, but that didn't help. I added the following code to my script: Local $sUserName = "Administrator" Local $sPassword = "SomePassword" RunAs($sUserName, @ComputerName, $sPassword, 0, @SystemDir) This did work on my machine without a right click and run as but the script wouldn't close and I got a flashing red X even though it worked? Edited April 5, 2012 by RBrown1375 Link to comment Share on other sites More sharing options...
RBrown1375 Posted November 2, 2012 Author Share Posted November 2, 2012 I can't beleive this but I'm running into the same issue with this AutoIT script, where the script runs fine if I right click and run as admin on the client Win 7 system, but if I install it with SCCM, the package gets deleiver and runs but doesn't work. It copies the 2 BMP's to the corect location but will not write to the registry like it does if I run it by hand. I have SCCM set to run as Admin, user is logged (tried it with user logged off) manditory, Access Accounts are the highest and as you'll see in the code I have it set to run with Admin rights. I also went in to the registry and killed the UAC. Any ideas would be helpfull Cheers #RequireAdmin ;Sleep(4000) ;Send("User Account Control{Enter}") ; Include a bitmap found in "C:\test.bmp" with the compiled program and put it in "D:\mydir\test.bmp" when it is run Local $a = True If $a = True Then FileInstall("E:\bg\bmp\Mit.bmp", "C:\Windows\Web\Wallpaper\Windows\mit.bmp") Local $b = True If $b = True Then FileInstall("E:\bg\bmp\Mit.theme", "C:\Windows\Web\Wallpaper\Windows\mit.theme") RegDelete("HKEY_CURRENT_USER\Control Panel\Desktop", "wallpaper") RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\General", "wallpaperSource") Sleep(3000) $wallpaper = FileOpenDialog(@WindowsDir & "\", "C:\Windows\Web\Wallpaper\Windows(MIT.bmp)", 1) WallpaperChange($wallpaper) Func WallpaperChange($image) ;Desktop Position: Stretch RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "Wallpaper", "REG_SZ", "C:\Windows\Web\Wallpaper\Windows\Mit.bmp") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\General", "WallpaperSource", "REG_SZ", "C:\Windows\Web\Wallpaper\Windows\Mit.bmp") RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "WallpaperStyle", "REG_SZ", 2) RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "TileWallpaper", "REG_SZ", 0) EndFunc ;==> WallpaperChange Link to comment Share on other sites More sharing options...
Developers Jos Posted November 2, 2012 Developers Share Posted November 2, 2012 The regwrite's will do that for the UserHive of the credentials you run the script with, not the regular users hive. Have you checked the other user hives under HKey_USERS in regedit? 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 More sharing options...
RBrown1375 Posted November 2, 2012 Author Share Posted November 2, 2012 (edited) Your right it changed the HKEy_USERS settings but not the hive I was in. Is there a reg hack for the Current User Hive that will over write the registry? I'm surprised it ran OK by hand but acted differently under SCCM. Good catch!! Edited November 2, 2012 by RBrown1375 Link to comment Share on other sites More sharing options...
Developers Jos Posted November 2, 2012 Developers Share Posted November 2, 2012 Your right it changed the HKEy_USERS settings but not the hive I was in. Is there a reg hack for the Current User Hive that will over write?I do not understand your question. Your script does change the CurrentUser hive for the shelled script which running under some Admin or the System account.If you are looking for changing the Hive of all potential userid in the registry you will have to loop through all the KKEY_USERS hives and update them all.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 More sharing options...
Moderators JLogan3o13 Posted November 2, 2012 Moderators Share Posted November 2, 2012 (edited) Isn't this the same problem we were troubleshooting originally, RBrown1375? You cannot set HKCU items (or profile-specific items) if you're running the SCCM package as SYSTEM. Edited November 2, 2012 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
RBrown1375 Posted November 2, 2012 Author Share Posted November 2, 2012 (edited) No this is a completely different item. The other package work great. I don't understand what you mean by "system." The users will be logged on when this script runs. I logged in as a user and ran this by hand and it works fine, but SCCM 2007 is acting differently. I only need to change the background for the current user. Edited November 2, 2012 by RBrown1375 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 2, 2012 Moderators Share Posted November 2, 2012 But didn't you say you set the package up in SCCM to run with Administrative Privileges? The default is the SYSTEM account, which isn't going to know how to get to the user's HKCU in the registry. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now