Jump to content

Registering a OCX on first run?

Recommended Posts

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>

$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")


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



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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...