Sign in to follow this  
Followers 0
shornw

Registering .dll files

7 posts in this topic

We are currently testing an updated version of a piece of software. Test users have a need to use the existing, live version as well as the upgraded version. To achieve this I need to overwrite some files and register some dll's. I am currently using the following:

#include <process.au3>

_RunDOS(@SystemDir & "REGSVR32 'c:\program files\software\hsserver.dll'")

which doesn't appear to work If I register the dll manually it works fine.

Any ideas, suggestions gratefully received.

Thank you


[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Share this post


Link to post
Share on other sites



Try this:

#include <process.au3>
_RunDOS(@SystemDir & '\REGSVR32 "c:\program files\software\hsserver.dll"')

Share this post


Link to post
Share on other sites

I will have to wait for users to arrive before I can test it properly, but if this is all it was then I am one VERY ashamed idiot. Sorry!!!!!! :)


[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I will have to wait for users to arrive before I can test it properly, but if this is all it was then I am one VERY ashamed idiot. Sorry!!!!!! :)

Hi m8,

Keep in mind as the script will run in the computers and if the user that will run the script will have permissions to register the dll file.

RunAs will be your best friend o:):)

Cheers

Edited by November

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Share this post


Link to post
Share on other sites

I dont feel as bad as I did...

I tried several variations

$file = @ProgramFilesDir & "\program\hsserver.dll"
_RunDOS(@SystemDir & "\REGSVR32 /s /c" & $file)

thanks for help, it always amazes me how quick and willing everyone on the site is.


[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

This is what I have in my script and works perfect:

RunWait('regsvr32 /s "C:\Program Files\Somedir\File.ocx"')oÝ÷ Øò¢êÜjÇ¢·
.ÖÞjëh×6RunWait('regsvr32 /s ' & $file)
(note the space after the /s switch)

Directories with spaces in between are tricky, you always have to be careful with " and '.

Note that possible switches with regsvr32 are /u /s /i /n. /s goes for silent :)

What is /c switch?

Edited by skysel

Share this post


Link to post
Share on other sites

To be honest I couldn't find out what the /c option was, but the code was taken from an existing .bat file which worked, albeit in a simplified fashion. I copied and pasted the txt, and as I was having such problems getting the registration to work I left it in. I suspect I can remove it without issue, however this is part of a software rollout to about 4000 PC's so it's gonna have to take it's place -quite low down the queue.


[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

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
Sign in to follow this  
Followers 0