Log in

View Full Version : Avisynth Installation Problem: Could not write to Registry error


rkk44
16th July 2005, 09:45
I have a Desktop WIN2000 Computer on which I cannot install any version of Avisynth using the autoinstallation program. I get the following error message during the *.exe file installation stage (right after "color_rgb.avsi"):

Avisynth!\r\n\r\n Could not write to registry
Administration rights required

I am the adminstrator so I do not lack adminstrative privileges. I also turned off Norton Antivirus 2005 and Sybot Teatime (Registry Guard) for the installation. Avisynth is the only self-installing program that I have tried to install on this computer that does not work.

I do have a laptop running WINXP on which Avisynth successfully has been installed. I copied the installed program to a CD (along with Avisynth.dll) which I then used for a dirty installation by copying it directly to the WIN2000 Computer's Program file (Avisynth.dll went to the System32 directory). I then tried to manually register Avisynth.dll with regsvr32.exe and got the following message:

Avisynth.dll was loaded but DLLRegisterServer entry point was not found
DLLRegisterServer may not be exported or a corrupt version of Avisynth.dll may be in memory.

I have RegistryFix on my computer so I ran it but to no avail. The same error message still comes up. The only good news is that this dirty installation seems to have worked as I can successfully open an Avisynth Script with VDMod.

As a matter of principle, I hate having to rely on a dirty installation. Is there someplace where I can get a non-self-installing version of Avisynth 2.56 (along with installation instructions) to replace this jury-rigged solution?

IanB
18th July 2005, 05:05
Please quote error messages EXACTLY it should have been "You need administrator rights to install AviSynth!\r\n\r\n(Could not write to registry)", any other message is coming from somewhere else.

If Avisynth is working after a "dirty" install them most of the registry keys must have been written (at some stage previously). On a normal registry Administrators should have write access to the areas the installer needs to access BUT various well meaning products and some noxious viruses change the default registry protection. The former to stop the the latter, the latter to hinder their removal.

The installer product we use does not have the ability to change registry protection and even if it did I would not use it to circumvent this issue.

The registry keys and values written are as followsWriteRegStr HKLM "SOFTWARE\AviSynth" "plugindir2_5" "$0"
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AviSynth" "DisplayName" "AviSynth 2.5"
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AviSynth" "UninstallString" '"$INSTDIR\Uninstall.exe"'
WriteRegStr HKLM "SOFTWARE\Classes\.avs" "" "avsfile"
WriteRegStr HKCR ".avs" "" "avs_auto_file"
WriteRegStr HKCR "CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}" "" "AviSynth"
WriteRegStr HKCR "CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}\InProcServer32" "" AviSynth.dll
WriteRegStr HKCR "avifile\Extensions\avs" "" "{E6D6B700-124D-11D4-86F3-DB80AFD98778}"
WriteRegStr HKCR "Media Type\Extensions\.avs" "" ""
WriteRegStr HKCR "Media Type\Extensions\.avs" "Source Filter" "{D3588AB0-0781-11CE-B03A-0020AF0BA770}"
WriteRegStr HKCR "CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}\InProcServer32" "ThreadingModel" "Apartment"
WriteRegStr HKCR ".avs" "" "avsfile"
WriteRegStr HKCR "avsfile" "" "AviSynth Script"
WriteRegStr HKCR "avsfile\DefaultIcon" "" $SYSDIR\AviSynth.dll,0Have somebody skilled in registry maintainance check these areas, and correct the the protection.

IanB

woah!
14th February 2006, 07:21
i just installed a fresh WinXP SP2 on a new amd opterton 165 and mobo and am now getting this exact same issue :(

i cant install avisynth but i am the admin?

everything else i had installed with no issues and this really screws me now as i bought this dual core for video-encoding heh..

damn..

Nomake Wan
14th February 2006, 19:13
Interesting thing happened. Now, I have a Toshiba laptop which AVIsynth installed on no problem. My new HP Pavillion desktop machine originally tossed up this error:

http://forum.doom9.org/showthread.php?t=97406

...so I set the WINDOWS folder to un-read-only everything it could. Now I'm getting the registry message that this thread is about. Argh, this is why new computers suck!

So does anybody have a concrete workaround? I'm also not one who likes dirty installs...

Morac
26th March 2006, 23:10
I found that the "You need administrator rights to install AviSynth!\r\n\r\n(Could not write to registry)" is sometimes incorrectly displayed if the installation procedure can't write to the installation directory.

I got this error and no amount of register cleaning would get rid of it. Finally I noticed there was an existing "C:\Program Files\AviSynth 2.5" directory left over from an old install. Once I deleted this directory, AviSynth installed without any issues.

So even though the error message mentions the registry, check to see if the directory exists already and if it does, delete it.

slk001
27th March 2006, 22:24
This has been an issue since 2.55. I recently had to do a complete system reinstall, and I also found that I couldn't write to the registry. And yes, I have FULL admin rights. I got it to install by installing 2.54 (I actually tried 2.56, which gave me this problem, 2.55, which also gave probs, then 2.54, which installed correctly), then I was able to install 2.56. A VERSION() correctly shows 2.56.

Apparently, this issue doesn't show up unless you have no previous Avisynth keys in the registry. Once I got Avisynth keys in the registry (with 2.54), it installed correctly (really not sure about the "correctly" part). I have also lost my PLUGIN directory advantage (even though the reg key points to it correctly), since I now have to use the LOADPLUGIN command for every plugin in every script.

Perhaps we can now get the developers to look at the installation program?

tin3tin
30th March 2006, 21:34
What Morac wrote helped me out. Thanks!

Tin3tin

bxfy
2nd April 2006, 12:22
meble ...

stax76
2nd April 2006, 12:43
This looks like the problem occurs when installing on top of another install, due to the nature of AviSynth a side by side setup is not intended, the installer should not allow to install before uninstalling previous versions.

As a rule of thumb, if you install something before uninstalling an old version you have a higher chance to run into problems (AviSynth seem to prove this) and you bloat your system so unless you got a good reason always uninstal a old version before installing a new version.

IanB
2nd April 2006, 23:11
Please download and install 2.5.7 Alpha 2 it won't solve the problem but it should allow you to harvest enough information to allow me to resolve this problem.

shae
25th September 2006, 20:30
It also happened to me with the latest AviSynth 2.5.x and Win98. It's a first install of AviSynth, but perhaps some other tool has previously copied AviSynth.dll into the system dir, which confused the installer script?

I deleted the AviSynth dir in %progfiles% and it worked.

Could be nice if all the files were put into the directory I specified at install time. Right now it puts stuff in %sysdir%, %progfiles%\AviSynth, and in the designated target dir.

foxyshadis
25th September 2006, 21:09
SUPER likes to copy avisynth.dll into %sysdir% and give it read only, hidden, and system attributes, which confuses the poor avisynth installer, as well as the files in the progfiles folder. I emailed them about it but never had a reply back.

(Since the whole system has to be able to use it, it either has to go in %sysdir% or add the folder to the path. For devs a further polluted path isn't a great option, though it's not the end of the world, I guess.)

uroscar
4th January 2007, 21:41
I did what Morac said and it helped. Just delete the folder and reinstall.

bye

smeghead2
26th October 2009, 18:02
I'm getting exactly the same problem. It won't get past the installation stage (when it gets about a third of the way there).

I get the "You need administrator rights" error. I'm using Windows 7 64-bit and yes, have made sure of the following :

1. I have only 1 user account and it does have admin rights.
2. I can manually add to the registry with regedit without problems.
3. I don't have any software protecting the registry.
4. I haven't installed AVIsynth before on this computer, and I have tried deleting the directory folder and trying again.
5. I'm using 2.5.8, though I have tried all the others, such as 2.5.4 etc... Same problem though.

Any help would be appreciated as I need my Staxrip to work, and AVIsynth is a part of it!

Thank you!!

stax76
26th October 2009, 18:26
I haven't installed AVIsynth before on this computer

Are you sure there isn't or wasn't a silent install done by a application like SUPER?

smeghead2
26th October 2009, 21:40
Are you sure there isn't or wasn't a silent install done by a application like SUPER?

Yes, because I've only installed Windows 7 a couple of days ago and just got around to installing my video editing programs.

stax76
26th October 2009, 22:00
Try AviSynth 32bit and start the setup explicitly as admin using right-click choosing 'Run as administrator'.

smeghead2
26th October 2009, 22:05
Try AviSynth 32bit and start the setup explicitly as admin using right-click choosing 'Run as administrator'.

I've tried that. All sorts of different versions, and they all bring up the same error.

I'm tearing my hair out!!!

stax76
26th October 2009, 22:42
Check your registry to find at which key the installer fails to write to.


WriteRegStr HKLM "SOFTWARE\AviSynth" "plugindir2_5" "$0"
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AviSynth" "DisplayName" "AviSynth 2.5"
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AviSynth" "UninstallString" '"$INSTDIR\Uninstall.exe"'
WriteRegStr HKLM "SOFTWARE\Classes\.avs" "" "avsfile"
WriteRegStr HKCR ".avs" "" "avs_auto_file"
WriteRegStr HKCR "CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}" "" "AviSynth"
WriteRegStr HKCR "CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}\InProcServer32" "" AviSynth.dll
WriteRegStr HKCR "avifile\Extensions\avs" "" "{E6D6B700-124D-11D4-86F3-DB80AFD98778}"
WriteRegStr HKCR "Media Type\Extensions\.avs" "" ""
WriteRegStr HKCR "Media Type\Extensions\.avs" "Source Filter" "{D3588AB0-0781-11CE-B03A-0020AF0BA770}"
WriteRegStr HKCR "CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}\InProcServer32" "ThreadingModel" "Apartment"
WriteRegStr HKCR ".avs" "" "avsfile"
WriteRegStr HKCR "avsfile" "" "AviSynth Script"
WriteRegStr HKCR "avsfile\DefaultIcon" "" $SYSDIR\AviSynth.dll,0

smeghead2
26th October 2009, 23:11
There are no entries in the registry for AviSynth. The error comes up saying :

"You need administrator rights to install Avisynth. (could not write to registry HKCR)"

It fails at the "extract colors_rgb.avsi" part of the installer.

stax76
26th October 2009, 23:29
Do you know this from the log displayed? If so please post the log.

smeghead2
26th October 2009, 23:59
Do you know this from the log displayed? If so please post the log.

No, I only know this from the installation window, where it tells you which files have extracted etc...

stax76
27th October 2009, 00:02
Can the content of the window be copied? If so please post it.

smeghead2
27th October 2009, 00:34
I cannot copy and paste, but it keeps the installation window on screen, so here is a manual copy of what it says (excuse me if there's a typo, but I'm being as accurate as I can):

Output folder : C:\Windows\system32
Extract : Avisynth.dll
Extract : devil.dll
Output folder : F:\Program Files2\Avisynth2.5
Extract : gpl.txt
Extract : lgpl_for_used_libs.txt
Output folder : F:\Program Files2\Avisynth2.5\License Translations
Extract : gpl-cs.txt
Extract : gpl-el.txt
Extract : gpl-de.txt
Extract : gpl-fr.txt
Extract : gpl-it.txt
Extract : gpl-ja.txt
Extract : gpl-pl.txt
Extract : gpl-pt.txt
Extract : gpl-pt_br.txt
Extract : gpl-ru.txt
Output folder : C:\Program Files(x86)\Avisynth2.5\plugins
Extract : DirectShowSource.dll
Extract : TCPDeliver.dll
Extract : colors_rgb.avsi

Then I get the error message.

stax76
27th October 2009, 01:16
It's possible to copy, you just have to right-click and there will be a context menu to copy. I just ran the setup and checked what's after your last entry, it's:

Extract: colors_rgb.avsi
Create folder: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\AviSynth 2.5
Create shortcut: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\AviSynth 2.5\License.lnk
Create shortcut: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\AviSynth 2.5\Plugin Directory.lnk
Output folder: C:\Program Files\AviSynth 2.5\Examples
Extract: Audio.avs
Extract: Authors.avs
Extract: Editing.avs

Looks like it fails to create the start menu folder even though it runs as admin, looks like a permission issue with your system, I don't know how this can happen and how it can be solved, you could ask at www.sevenforums.com

smeghead2
27th October 2009, 01:27
Thanks for your help. I'll post over on the Seven Forums, but if anyone else has any ideas it would help a lot!

IanB
27th October 2009, 05:53
Unfortunately NSIS does not log registry commands, but here is the relevant part of the install script :-...
File "..\src\plugins\DirectShowSource\Release\DirectShowSource.dll"
File "..\src\plugins\TCPDeliver\Release\TCPDeliver.dll"
File "color_presets\colors_rgb.avsi"

IfErrors 0 plug_ok
MessageBox MB_OK $(PlugDir_Text)
Abort

plug_ok:
ClearErrors
WriteRegStr HKLM "SOFTWARE\AviSynth" "" "$INSTDIR"
WriteRegStr HKLM "SOFTWARE\AviSynth" "plugindir2_5" "$0"

WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AviSynth" "DisplayName" "AviSynth 2.5"
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AviSynth" "UninstallString" '"$INSTDIR\Uninstall.exe"'

WriteRegStr HKLM "SOFTWARE\Classes\.avs" "" "avsfile"

IfErrors 0 mreg_ok
MessageBox MB_OK $(AdminRightsHKLM_Text) ;; "You need administrator rights to install AviSynth!$\n(Could not write to registry HKLM)"
Abort

mreg_ok:
ClearErrors
WriteRegStr HKCR "CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}" "" "AviSynth"
WriteRegStr HKCR "CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}\InProcServer32" "" "AviSynth.dll"
WriteRegStr HKCR "CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}\InProcServer32" "ThreadingModel" "Apartment"

WriteRegStr HKCR "Media Type\Extensions\.avs" "" ""
WriteRegStr HKCR "Media Type\Extensions\.avs" "Source Filter" "{D3588AB0-0781-11CE-B03A-0020AF0BA770}"

WriteRegStr HKCR ".avs" "" "avsfile"
WriteRegStr HKCR "avsfile" "" "AviSynth Script"
WriteRegStr HKCR "avsfile\DefaultIcon" "" "$SYSDIR\AviSynth.dll,0"

WriteRegStr HKCR ".avsi" "" "avs_auto_file"
WriteRegStr HKCR "avs_auto_file" "" "AviSynth Autoload Script"
WriteRegStr HKCR "avs_auto_file\DefaultIcon" "" "$SYSDIR\AviSynth.dll,0"

WriteRegStr HKCR "avifile\Extensions\AVS" "" "{E6D6B700-124D-11D4-86F3-DB80AFD98778}"

IfErrors 0 creg_ok
MessageBox MB_OK $(AdminRightsHKCR_Text) ;; "You need administrator rights to install AviSynth!$\n(Could not write to registry HKCR)"
Abort

creg_ok:
; These bits are for everybody
SetShellVarContext All
CreateDirectory "$SMPROGRAMS\AviSynth 2.5"

CreateShortCut "$SMPROGRAMS\AviSynth 2.5\$(Start_License).lnk" "$INSTDIR\${AVS_DefaultLicenceFile}"
...
You need to carefully check the error message, there are 2 very similar messages possible, 1 with HKLM and 1 with HKCR, this will define which part of the registry you are having trouble with. You then need to check the 5 or 12 actual registry entries to see at which point it is failing.

Also have you changed the default UAC settings?

I am no NSIS expert and I could not find any similar issues with 7 and NSIS in a brief google. Please keep us informed if you stumble over anything.

smeghead2
28th October 2009, 00:48
It's the HKCR error I'm getting. I have turned off UAC completely.

I've searched the registry for anything with "AviSynth" in it and come up with these entries :

WriteRegStr HKCR "CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}" "" "AviSynth"
WriteRegStr HKCR "CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}\InProcServer32" "ThreadingModel" "Apartment"
WriteRegStr HKCR "avsfile" "" "AviSynth Script"
WriteRegStr HKCR "avsfile\DefaultIcon" "" "$SYSDIR\AviSynth.dll,0"
WriteRegStr HKCR "avs_auto_file" "" "AviSynth Autoload Script"

Plus the odd one in TypedURLs, which I'm disregarding.

Is this any help? I was wondering if it was possible to manually add the registry entries and copy the files into the install folder. Would that work?

stax76
28th October 2009, 00:59
If you have the HKCR keys you should also have the HKLM keys because the HKLM keys are written before the HKCR keys. Doesn't make sense sorry.

smeghead2
28th October 2009, 01:41
If you have the HKCR keys you should also have the HKLM keys because the HKLM keys are written before the HKCR keys. Doesn't make sense sorry.

Oh yes, I must have missed some. I've got :

WriteRegStr HKLM "SOFTWARE\Classes\.avs" "" "avsfile"

and also something under HKLM\SOFTWARE\Classes\avs_aito_file\Defaulticon

but there's definitely no HKLM\Software\AviSynth entry.

Is this causing the error do you think?

stax76
28th October 2009, 02:30
Did you make a search or did you browse, since you are using a 32bit app on a 64bit system there is some redirection going on, path would contain Wow6432Node.

laserfan
28th October 2009, 15:18
I had a similar problem once (quite a long time ago). IIRC it involved the inability of the new install to overwrite the old registry values. Can you manually delete the old registry entries?

smeghead2
29th October 2009, 14:21
Did you make a search or did you browse, since you are using a 32bit app on a 64bit system there is some redirection going on, path would contain Wow6432Node.

I've searched the registry using the Find option and this time I've looked under the Wow6432 Node. For "Avisynth" I've found :

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778} with an entry for AviSynth

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}\InProcServer32 - with an entry for Avisynth and Threading modal apartment

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\AviSynth

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}

There's also an entry in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers - with the pathname of AviSynth where I installed it and WinXPSP2 as the data

Should I try deleting all the entries for AviSynth in the registry? Would that help do you think? So far no-one at Avisynth has any suggestions.

Thanks

I'm going to try installing Windows 7 32 bit on my old computer and installing Avisynth on that over the weekend - will let you know how I get on.

*** Last Update : Well, I did a repair install on my Windows 7 64-bit computer and now it works perfectly! I must have borked up my initial install somehow, probably when I was turning off some services, anyway, I'm happy now that it's working! Thanks for all your help!! ***