Champak

FIleInstall stopped working

12 posts in this topic

I did a system restore and all of a sudden FileInstall stopped working into my System32 folder. I didn't make any changes to my script and it was working for years...even through other restore events. And I verified my UAC is off. Any ideas?

Share this post


Link to post
Share on other sites



If AniiVir actually meant Antivirus, no I don't have any of those on this computer. What about the EventLog...where is it and what should I be looking for? And what about the Process Monitor?

Share this post


Link to post
Share on other sites

did you check architecture?

Saludos

 

Share this post


Link to post
Share on other sites

Event Log (eventvwr.msc)
Look for any failure events any of the "Windows Logs" (Application, Security, System).

Process Monitor (from Sysinternals) can be used to identify file system errors for a given process or set of processes.  

These are just "tools" to try and find more information on what failure(s) is(are) occurring and hopefully lead to a source cause.
 

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Maybe it would be useful to define "not working", and tell us what the returncode and @error values are for FileInstall() ?

Also show some code and tell us whether you are running autoit3 or compiled x86 or x64.

Jos

  

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

@ Danyfirex I don't know what you mean by check architecture.

@ spudw2k Nothing in the logs as far as errors...or within the time range of when I activate the function.

@ Jos FileInstall not working when trying to install a file into System32 folder (no changes have been made to the script). Return value is 0, it happens compiled x86 and script form. What do you mean error values? Nothing is set if error from what I read in the helpfile, but I put an If condition for @errors and didn't get anything.

$DCDC_dll = "C:\WINDOWS\system32\DCDCUsbLib.dll"
    If Not (FileExists($DCDC_dll)) Then
        $check = FileInstall("C:\Users\Lab1\Desktop\INavMedia Development\Install\Install Dlls\DCDCUsbLib.dll", $DCDC_dll, 1)
        If @error Then MsgBox(0,0,@error)
        ConsoleWrite($check & @CRLF)
    EndIf

 

Share this post


Link to post
Share on other sites

If you are not running the script as ADMIN then C:\WINDOWS\system32\ is normally read only. Have you tried temporarily changing the install path to somewhere else just to check that FileInstall() is working on a none protected directory?


"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

You didn't answer all my questions. :)
IF the returncode is zero I would  guess it is failing, so are you sure you have admin rights and are running in Admin mode? 

Another thing to check is directory: C:\Windows\SysWOW64 for the file depending which mode (x86/x64) you run in.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

@Bowmore I can install in all other directories I've tried.

@jos I do have admin rights, logged in to windows as an administrator. I dont have those folders. I'll go ahead and check the admin rights of the script when I get home, but I didn't have it before, and I have another computer where everything is installing in the system32 folder with no issue.

Do I have to have dlls registered in the system32 folder to work? If I dont, then I can just put them somewhere else and not worry about this. These dlls I'm working with are com objects.

Share this post


Link to post
Share on other sites

Well, you can register dlls in any directory AFAIK, so I don't see what it would "have" to reside in sys32/syswow64 (if you are planning on using objget/create funcs).  I could see the simplicity in maintaining the dlls in sys32 dirs, but it's I don't think it's a dependency.  Just don't forget about cleanup later (regsvr32 /u).

Share this post


Link to post
Share on other sites

Hello,

 

1.) As Jos already pointed out: c:\windows\system32 c:\windows\sysWOW64 do not permit to write files to, *EVEN* if you are logged on as "the Administrator", that's *NOT* sufficient. The script needs to be run "UAC elevated".

1.) does your script have a line telling ....

#RequireAdmin

??

2.) download process monitor, run it, add a filter to display only...

category = write

result "is not" success

 

see, what's going on.

 

 

Regards, Rudi.

 


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

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