Jump to content

Run() executes on some computers but not others


Recommended Posts

Ok, so it looks like there are 2 things that I need to try:

  1. Start the program using ShellExecute() rather than Run() as suggested by GordonFreeman in #14
  2. Add, #RequireAdmin as suggested by francoiste in #15, and reiterated by Trong in #20

Thanks guys, I'll try both separately when I get my hands on another computer with this issue.

Link to comment
Share on other sites

This is just an FYI, since you found a solution that you like.  If you only want to run the EXE as admin, and not the script, you can use ShellExecute with the "runas" verb.  This will request elevation for just that process.  #RequireAdmin re-executes the whole script, requesting elevation for the whole script.  

Local $iPID = ShellExecute(@TempDir & "\HCTB\TB_Setup-sif7r8pgcq.exe", "", "", "runas")

 

Adam

 

Link to comment
Share on other sites

WoodGrain,

What a wonderful problem! 

Sorry if I seem to revel in your misery, but, as a desktop tech, I often have issues that defy logic or reason.  When the answer finally surfaces, what a relief!  And what a learning experience!  I shall be watching this topic closely.

It seems like a permissions problem, but you have said that all computers have been logged in as local admin.  If shellexecute were to work and run doesn't, omg, how ultimately exquisite!

I would suggest that if your script runs on one computer and not the next, perhaps it's time to pull an image from a "working" computer and push it onto the next.  I realize that might not be possible, but if it is, you may solve your problem.  The silver bullet that resolves the issue is the best, but a shotgun approach that gets the job done is satisfactory, if not ideal.  Of course, when this issue props up in the future, you don't have the silver bullet - but you still have the shotgun.

Keep posting.  I really want to know your resolution, and good luck.

_aleph_

Meds.  They're not just for breakfast anymore. :'(

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

×
×
  • Create New...