sheepdiver Posted February 2, 2010 Share Posted February 2, 2010 I'm of course a noob who feels like an idiot for asking but I couldn't find an answer. I'm trying to install Foxit Reader with an msi. I got the installation completed but it doesn't register itself as the default PDF reader. That's normal with the msi. I can make it the default reader with a "foxit reader.exe -install" command. I've tried both the Run (commented below) and RunAs. These work fine on the local workstation, both as an au3 and an exe. I'm trying to push this out to 600 workstations with a Kace box. The install always works. It's just the registration as the default reader that's failing. Programs pushed by the Kace box run as "system" so I tried the RunAs domainadmin. I tried the RunAs with single and double quotes. Again, both work if I run them locally but not across the network. The local user is an admin on the PC which is an XP SP# workstation. What am I missing here? TIA, kirk (software install not shown because it works) ; Register Foxit as default PDF reader MsgBox(0, "Kbox software install","Registering software.", 5) ; Run("C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe -register") RunAs("domainadmin", "domain", "pw", 2, '"C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe -register"') ;Let user know it's done MsgBox(0, "Kbox software install","Installation complete.", 5) Link to comment Share on other sites More sharing options...
martin Posted February 2, 2010 Share Posted February 2, 2010 I'm of course a noob who feels like an idiot for asking but I couldn't find an answer. I'm trying to install Foxit Reader with an msi. I got the installation completed but it doesn't register itself as the default PDF reader. That's normal with the msi. I can make it the default reader with a "foxit reader.exe -install" command. I've tried both the Run (commented below) and RunAs. These work fine on the local workstation, both as an au3 and an exe. I'm trying to push this out to 600 workstations with a Kace box. The install always works. It's just the registration as the default reader that's failing.Programs pushed by the Kace box run as "system" so I tried the RunAs domainadmin. I tried the RunAs with single and double quotes. Again, both work if I run them locally but not across the network. The local user is an admin on the PC which is an XP SP# workstation. What am I missing here?TIA,kirk(software install not shown because it works); Register Foxit as default PDF readerMsgBox(0, "Kbox software install","Registering software.", 5); Run("C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe -register")RunAs("domainadmin", "domain", "pw", 2, '"C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe -register"');Let user know it's doneMsgBox(0, "Kbox software install","Installation complete.", 5)Maybe you should be using @ProgramFilesDir because not all PCs use "C:\Program Files". Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
KaFu Posted February 2, 2010 Share Posted February 2, 2010 (edited) Try RunAs("domainadmin", "domain", "pw", 2, '"C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe" -register') or RunAs("domainadmin", "domain", "pw", 2, FileGetShortName(@ProgramFilesDir & "\Foxit Software\Foxit Reader\Foxit Reader.exe") & " -register") Edited February 2, 2010 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
sheepdiver Posted February 3, 2010 Author Share Posted February 3, 2010 TryRunAs("domainadmin", "domain", "pw", 2, '"C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe" -register')orRunAs("domainadmin", "domain", "pw", 2, FileGetShortName(@ProgramFilesDir & "\Foxit Software\Foxit Reader\Foxit Reader.exe") & " -register")I tried both of these - still no bueno. I don't think it's the path because the path is absolute and if it was wrong it would be wrong both locally and when pushed out from the Kbox. This part works fine in either case>;Install the programRun("msiexec /i c:\utility\foxit31.msi")That's what made me think it was a permissions issue not a path issue. Back to the salt mines... Link to comment Share on other sites More sharing options...
KaFu Posted February 3, 2010 Share Posted February 3, 2010 Looking in the helpfile says "Paths with spaces need to be enclosed in quotation marks." You have a path with spaces AND want to add a command line parameter, I guess the parameter's more the issue. Searching google I found this syntax: "notepad \"my file.txt\"" Maybe try this: RunAs("domainadmin", "domain", "pw", 2, FileGetShortName(@ProgramFilesDir & "\Foxit Software\Foxit Reader\Foxit Reader.exe") & '" -register"') or this RunAs("domainadmin", "domain", "pw", 2, FileGetShortName(@ProgramFilesDir & "\Foxit Software\Foxit Reader\Foxit Reader.exe") & '\" -register\"') OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Bert Posted February 3, 2010 Share Posted February 3, 2010 Can this be done with a Reg fix? The Vollatran project My blog: http://www.vollysinterestingshit.com/ 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