Jump to content

Compiling scripts in non admin Windows 8


Go to solution Solved by Graeme,

Recommended Posts

I have a new Windows 8 computer and it won't compile scripts in my non admin account but it will in the admin account which is fine except that I want to use the non admin account.

I have a simple script

MsgBox(0,"Test","This is running")

and this is the output I get when I try to compile it.

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /ShowGui /in "C:UsersGraeme_2DocumentsTestNon.au3"
+>10:58:14 Starting AutoIt3Wrapper v.2.2.0.3 SciTE v.3.4.1.0   Keyboard:00000809  OS:WIN_81/  CPU:X64 OS:X64    Environment(Language:0809)
+>         SciTEDir => C:Program Files (x86)AutoIt3SciTE   UserDir => C:Program Files (x86)AutoIt3SciTEAutoIt3Wrapper
-> No changes made..
>Running AU3Check (1.54.22.0)  from:C:Program Files (x86)AutoIt3  input:C:UsersGraeme_2DocumentsTestNon.au3
+>10:58:21 AU3Check ended.rc:0
>Running:(3.3.8.1):C:\Program Files (x86)\AutoIt3\Aut2Exe\aut2exe.exe  /in "C:UsersGraeme_2DocumentsTestNon.au3" /out "C:UsersGraeme_2AppDataLocalAutoIt v3Aut2exe~AU3yjbyxti.exe" /nopack /comp 2
!>10:58:21 Aut2exe.exe ended errors because the target exe wasn't created, abandon build. (C:UsersGraeme_2AppDataLocalAutoIt v3Aut2exe~AU3yjbyxti.exe)rc:9999
+>10:58:21 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 7.94
 

Any ideas about how I can compile programs in this account welcome.

Blessings

Link to post
Share on other sites

Thanks for the suggestion, computergroove, I tried running aut2exe directly and I didn't need to run it as administrator but it worked! That's a step in the right direction.

Thanks Jokky, unfortunately I looked at the permissions and changed what I could see to give me full permission but that didn't work. Actually, the non admin account already had full access. Is it possible that when I run Aut2exe from within SciTE that this is seen as someone else?

I still can't compile from within SciTE but being able to compile with Aut2exe directly is a big help.

Any other thoughts on what might be blocking the compilation would be gratefully received.

Blessings

Link to post
Share on other sites

try to create the compiled script on the user desktop and see if that works. This is a  security issue with the user type and Windows 8. Sometimes you can copy / make files on your own desktop,

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Link to post
Share on other sites
  • Developers

There is no need to run SciTE in Admin.

Did you get any error from AUT2EXE when you run from SciTE?

What are the #AutoIt3Wrapper_ Directives in this script?

Give the current Beta a try to see if that contains any fixes that could be the root cause.

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 post
Share on other sites
  • Solution

Thanks everyone. I got it sussed. :thumbsup: Actually it was something you said long ago Joss, that got me on the 'right' track. :thumbsup: You said, in another thread, to take out UPX and I think I tried that or found that it wasn't checked. Then as I watched the Aut2exe compiling I saw that it called UPX. So I tried compiling with UPX and everything works fine.

By the way I'd tried the AV earlier - that seems to be a common problem but it wasn't my problem. I don't know why I need UPX in my non admin account and I don't in the admin one... at least maybe I'll go there next and see if it was in fact checked..

Oh by the way - I'm still stuck using AutoIT 3.3.8.1 as all the new versions that I've tried can't handle running scripts that have #requireadmin. I struck another yesterday that I had to recompile with 3.3.8.1 in order for it to run at all. So using the latest beta wouldn't help me. :

Have a good day.

Blessings all

Graeme

Edited by Graeme
Link to post
Share on other sites
  • Developers
Oh by the way - I'm still stuck using AutoIT 3.3.8.1 as all the new versions that I've tried can't handle running scripts that have #requireadmin. I struck another yesterday that I had to recompile with 3.3.8.1 in order for it to run at all. So using the latest beta wouldn't help me. :

 

What is the problem with #requireadmin and the new version?

Show a snippet that demonstrates the issue and explain what the issue is.

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 post
Share on other sites
  • 2 weeks later...

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Doniel
      Hi there! 😃
      I've 2 simple scripts:
      Script 1 starts script 2 Script 1 gets executed with normal user rights (un-elevated) Script 2 contains an #RequireAdmin and therefor can only start elevated I want to read the output of script 2 with script 1 AND have the UAC of script 2 being activated as fullscreen Script 1 (Scripts location is the same as script 2 that I'm running with Run()
      Local $iPID, $sOutput $iPID = Run(@ComSpec & " /c " & "C:\Entwicklung\Autoit\Test\Temp.exe", @ScriptDir, @SW_HIDE, 0x2) ProcessWaitClose($iPID) $sOutput = StdoutRead($iPID) StdioClose($iPID) ConsoleWrite($sOutput) MsgBox(1, 1, 1) Script 2 (compiled as Temp.exe)
      #RequireAdmin ConsoleWrite("Return") MsgBox(1,1,"ADMIN") Now my problems are the following:
      Without the #RequireAdmin I can read the output with no problem, but not with the #RequireAdmin ($sOutput is empty) Using @SW_HIDE in the Run() command makes the UAC always start minimized (see attached picture) and the admin has to always manually click on the icon to enter his credentials since the UAC doesn't start in fullscreen. Here and on a few other sites they explain that the program launching the elevated program NEEDS to be activated in order to directly show the UAC fullscreen and not minimized. Using @SW_SHOW would get rid of the problem, BUT that leaves me with an ugly cmd.exe floating the whole time while the elevated script ist running. And my questions to that I'm seeking an answer for are:
      Problem 1: Is it just not possible to read from an elevated program with an un-elevated user/script? I also get the Access Denied if I press No on the UAC as an Output in $sOutput (Guess since its's still un-elevated) Problem 2: Is there a way to either make the floating black and blank cmd.exe being moved to the background and be non visible to the user OR to somehow bring the minimized UAC to the foreground/fullscreen? What I already tried and what didn't help me:
      $iPID = Run(@ComSpec & " /c " & "C:\Entwicklung\Autoit\Test\Temp.exe", @ScriptDir, @SW_HIDE, 0x2) While Not WinExists("Temp.exe erfordert Ihre Berechtigung") ConsoleWrite(1) WEnd WinActivate("Temp.exe erfordert Ihre Berechtigung") WinSetState("Temp.exe erfordert Ihre Berechtigung", WinGetText("Temp.exe erfordert Ihre Berechtigung"), @SW_SHOW) WinSetState("Temp.exe erfordert Ihre Berechtigung", WinGetText("Temp.exe erfordert Ihre Berechtigung"), @SW_MAXIMIZE) WinSetState("Temp.exe erfordert Ihre Berechtigung", WinGetText("Temp.exe erfordert Ihre Berechtigung"), @SW_ENABLE) The While-Loops helps a lot and also stops after a second or so (► Stops to write ones (1)). That means that the actual "window" of the UAC is found, but all the WinXXX functions don't do anything and the UAC stays minimized. I also tried to minimized/move the cmd.exe to the background with WinActivate() and WinSetState() with no success.
      $iPID = ShellExecute("C:\Entwicklung\Autoit\Test\Temp.exe", "", @ScriptDir, "open", @SW_HIDE) Using ShellExecute() instead of Run() completely solves the UAC to fullscreen problem BUT I haven't found a consistent way to read the output of ShellExecute(). Neither here on the forum nor somewhere else. If I'd be possible to read the output from ShellExecute() then all my problems would be solved at once!
      Also tried a few more things and playing with some parameters but everything with no success.
      I'd really love some help and support here from you.
      Thanks in advance!
       

    • By AutoJohn
      Hi,
      Part of my standard template for a new project is including the lines:
          #AutoIt3Wrapper_Run_Au3Stripper=y ;Run Au3Stripper before compilation (Default=n)
          #Au3Stripper_Parameters=/mo ;     Use the parameters as listed above
      I extensively use bookmarks to jump back and forth between sections of code while debugging and I am experiencing an annoyance that I'm hoping someone could steer me towards a "better" solution.
      The problem is when I go to compile code, all of my bookmarks get deleted.
      I have determined that if I comment out the line    #AutoIt3Wrapper_Run_Au3Stripper then the issue no longer happens and my bookmarks remain.
      Are there some other properties I could be setting somewhere to keep the line in place yet not destroy my bookmarks on every compile?
      Thanks
      SciTE Version 3.7.3     Feb 16 2017 21:41:17
      AutoIT 3.3.14.5
    • By DrLarch
      Is there a quick/easy way to differentiate if a script is running as local admin vs. domain admin? IsAdmin() doesn't do this... hence the question. I need a script to behave differently depending on this.
    • By rudi
      Hi,
      When a non compiled AU3 script is run with #RequireAdmin, then if the UAC prompt can be authorized due to the fact, that the currently loggedon user has local admin rights, then the macro @UserProfileDir correctly reflects the profile dir of the user of the windows logon session.
       
      When the script with #RequireAdmin is started by a "normal user" without local admin rights, and I use a domain admin account to authorize the UAC prompt, then @UserProfileDir reflects the profile dir belonging to the AD-Admin account.
      As the script originally was started using the "regular user" I'm wondering, if there is a chance to "pass" the original user's @UserProfileDir to the UAC elevated script?
       
      As playing around with this feature I realize, that I basically don't know the exact mechanism of the UAC elevation authorization process:
      The script is started by right mouse click, execute script This is invoking e.g. "C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "C:\Users\Rudi\Desktop\test.au3" as by this registy value: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Run\Command] @="\"C:\\Program Files (x86)\\AutoIt3\\AutoIt3.exe\" \"%1\" %*" But what I honestly don't know is, how does the UAC propt interact in the program startup? I guess, that Autoit3.exe is parsing the AU3 source, is seeing the #RequireAdmin and then "relaunches itself with the AU3 as %1" requesting UAC elevated rights "from windows"??? With Process Explorer I can see, that The commandline then is this one with a "!" before "%1"
      "C:\Program Files (x86)\AutoIt3\AutoIt3.exe" !"C:\Users\Rudi\Desktop\test.au3"  It it should be something like this, then it might be possible to pass the original @UserProfileDir to the second, UAC elevated "Startup"??? <edit>
      I just noticed:
      When I use "WIN+R" and then directly use the command line, I see in Process Explorer, ...
      "C:\Program Files (x86)\AutoIt3\AutoIt3.exe" !"C:\Users\Rudi\Desktop\test.au3"
      ... then this script with #RequireAdmin is started *WITHOUT* UAC elevation.
      Guessing, that this ! is just reverting #RequireAdmin I tried the "opposite" one as well:
      AU3 script without #RequireAdmin Starting with "C:\Program Files (x86)\AutoIt3\AutoIt3.exe" !"C:\Users\Rudi\Desktop\test.au3" does not invoke UAC elevation prompt. So to me it looks like, this ! is a "status flag from Autoit3.exe to Autoit3.exe", that the elevation process was done already? amazing...
      the topic Autoit on Windows Vista is telling no details of  this UAC process...
      </edit>
       
      Regards, Rudi.
    • By SgtHugoStiglitz
      HI people,
                        I got a questions, I maintain code in autoIT and every time I compile a new version or modification, Scite generate 2 folders. One folder is finish by released and the other is tentative. I try to make some google search, but never find answer would satisfied myself. The dev who was maintain it before were using AutoIt3Wrapper_GUI, and I don't know if it's related. I look both folder, but they seem pretty identical, but I would like to know what it's the difference between those to folder. Anyone have a clue?
×
×
  • Create New...