Jump to content

fileinstall


Recommended Posts

Here is my script:

FileInstall("C:\Documents and Settings\a4mh3\Desktop\autoit scrips\argis tool\AME\tabctl32.ocx",@ScriptDir & "tabctl32.ocx")
FileInstall("C:\Documents and Settings\a4mh3\Desktop\autoit scrips\argis tool\AME\Argis Made Easy.exe",@ScriptDir & "Argis Made Easy.exe")
$file="tabctl32.ocx"
$main="Argis Made Easy.exe"
if FileExists(@SystemDir & $file) then 
 RunWait('Regsvr32 /s "' & @SystemDir & '\' & $file & '"')
 run($main)
else
 FileCopy($file, @SystemDir)
 RunWait('Regsvr32 /s "' & @SystemDir & '\' & $file & '"')
 run($main)
endif

My problem is this: I need to have the 2 files extracted in the same folder as the exe I compiled. I do not know the location this folder will be, for it will depend on the user. Is this possible?

Link to comment
Share on other sites

Here is my script:

FileInstall("C:\Documents and Settings\a4mh3\Desktop\autoit scrips\argis tool\AME\tabctl32.ocx",@ScriptDir & "tabctl32.ocx")
FileInstall("C:\Documents and Settings\a4mh3\Desktop\autoit scrips\argis tool\AME\Argis Made Easy.exe",@ScriptDir & "Argis Made Easy.exe")
$file="tabctl32.ocx"
$main="Argis Made Easy.exe"
if FileExists(@SystemDir & $file) then 
 RunWait('Regsvr32 /s "' & @SystemDir & '\' & $file & '"')
 run($main)
else
 FileCopy($file, @SystemDir)
 RunWait('Regsvr32 /s "' & @SystemDir & '\' & $file & '"')
 run($main)
endif

My problem is this: I need to have the 2 files extracted in the same folder as the exe I compiled. I do not know the location this folder will be, for it will depend on the user. Is this possible?

@ScriptDir
Link to comment
Share on other sites

and

@ScriptDir & "\Argis Made Easy.exe"

also.. maybe...

If FileExists(@SystemDir & '\' & $file) Then
    RunWait('Regsvr32 /s "' & @SystemDir & '\' & $file & '"')
    Run($main)
Else
    FileCopy($file, @SystemDir & '\' & $file)
    RunWait('Regsvr32 /s "' & @SystemDir & '\' & $file & '"')
    Run($main)
EndIf

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

and

@ScriptDir & "\Argis Made Easy.exe"

also.. maybe...

If FileExists(@SystemDir & '\' & $file) Then
    RunWait('Regsvr32 /s "' & @SystemDir & '\' & $file & '"')
    Run($main)
Else
    FileCopy($file, @SystemDir & '\' & $file)
    RunWait('Regsvr32 /s "' & @SystemDir & '\' & $file & '"')
    Run($main)
EndIf

8)

If Not FileExists(@SystemDir & '\' & $file) Then FileCopy($file, @SystemDir & '\' & $file)
RunWait('Regsvr32 /s "' & @SystemDir & '\' & $file & '"')
Run($main)
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...