Sign in to follow this  
Followers 0
RvdH

Registering a OCX on first run?

3 posts in this topic

Hi i'm working on a auto-it script that completes some actions before a program can run,

- it need a writable dir in %temp%

- it needs to start a service

- it needs to register a ocx

the script i currently have succesfully completes these tasks except for 1, the damn OCX isn't registred :P

#Include <Constants.au3>
#NoTrayIcon

$ramdisk = EnvGet("ramdrv")
$systemdrive = EnvGet("systemdrive")

RunWait(@ComSpec & " /c " & 'md "%temp%\{program}\temp"', "", @SW_HIDE)
RunWait(@SystemDir & "\program.exe /service")
RunWait(@ComSpec & " /c " & 'net start "Program"', "", @SW_HIDE)

; doesn't work
;RunWait(@SystemDir & "\regsvr32 /s /i %systemdrive%\Programs\{programdir}\{programsubdir}\file.ocx")
RunWait(@ComSpec & " /regsvr32 /s /i %systemdrive%\Programs\{programdir}\{programsubdir}\file.ocx", "", @SW_HIDE)

RunWait($systemdrive & "\Programs\{programdir}\program.exe")

Exit

I think i'm really close i just am not quite familiar with the commands auti-it uses, anyone can help me out?

TIA,

RvdH

Share this post


Link to post
Share on other sites



Yup, looks like that did the trick :P

Bedankt! :lmao:

RvdH

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