Sign in to follow this  
Followers 0
sheepdiver

Compiled script runs fine locally - not remotely

6 posts in this topic

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)

Share this post


Link to post
Share on other sites



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)

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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by KaFu

Share this post


Link to post
Share on other sites

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")

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 program

Run("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...

Share this post


Link to post
Share on other sites

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\"')

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  
Followers 0