andys_50 Posted August 12, 2009 Posted August 12, 2009 I have a .dll which i am trying to register, it works using GuiRunOnce:[GuiRunOnce] Command0="regsvr32 /s %SYSTEMDRIVE%\file.dll"But i want to use RunOnceEx to install this and other stuff so can the above be done RunOnceEx?I have tried various ways of putting the above command in RunOnceEx but it will not register.If it cant be done are there other methods to register the .dll?Thanks.
krose Posted August 12, 2009 Posted August 12, 2009 You could save the command in a cmd file and execute it from RunOnceEx.
HØLLØW Posted August 12, 2009 Posted August 12, 2009 (edited) Use this code and it works:REG ADD %KEY%\001 /V 1 /D "regsvr32 /s file.dll" /fI must say, that my .dll file is in the system32 folder, but you can try to register it from your location of the .dll. Edited August 12, 2009 by HØLLØW
andys_50 Posted August 13, 2009 Author Posted August 13, 2009 (edited) Hi, Krose, thanks, i tried it and it worked. Edited August 13, 2009 by andys_50
andys_50 Posted August 13, 2009 Author Posted August 13, 2009 (edited) Hi, HØLLØW, i was trying something similar, but i had it the wrong way round, the file/location before the command.As for the location it says to place it in %systemdrive%, i have tried it directly in system 32 and it didnt register (this was from GuiRunOnce - which i know works, from putting the file in %systemdrive%) but it might using what you suggested.If i have it to copy over to system32, and use the command you gave, does it automatically look in the system32 folder, as the command you gave doesn't specify the file location?I'll give it a go, thanks. Edited August 13, 2009 by andys_50
Martin H Posted August 13, 2009 Posted August 13, 2009 [...]i have tried it directly in system 32 and it didnt register[...]Then you used the wrong command syntax; it dosen't matter where the file is placed for registering it...If i have it to copy over to system32, and use the command you gave, does it automatically look in the system32 folder, as the command you gave doesn't specify the file location?If the file to register/unregister is in a location defined in your %path% environment variable(google it, if you don't know what that means), then you don't need to add a path to the regsvr32 command(or any others for that matter). By default, then '%windir%\system' and '%windir%\system32' is defined in the %path% environment variable...
andys_50 Posted August 13, 2009 Author Posted August 13, 2009 Thanks for the help, it works perfectly now, from RunOnceEx and with the file in system32.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now