Jump to content

Recommended Posts

  • Replies 82
  • Created
  • Last Reply

Top Posters In This Topic

Posted

My script above does everything within your batch, if you want to just run the batch you can use ShellExecute(@ScriptDir & '\mybat.bat') or you could use RunWait(@Comspec & ' /c "' & @ScriptDir & '\mybat.bat"', '', @SW_HIDE)

Posted
#RequireAdmin
RunWait(@ComSpec & ' /c regsvr32 "' & @ScriptDir & '\iDocsDll.dll" /s', '', @SW_HIDE)
RunWait(@ComSpec & ' /c regsvr32 "' & @ScriptDir & '\KalkanCryptCOM.dll" /s', '', @SW_HIDE)
Local $DotNetFx = @WindowsDir & '\Microsoft.NET\Framework\v4.0.30319\regasm.exe'
If FileExists($DotNetFx) Then
    RunWait(@ComSpec & ' /c "' & $DotNetFx & '" /codebase /tlb "' & @ScriptDir & '\NC.dll" /silent', '', @SW_HIDE)
Else
    MsgBox(64, 'Error', 'Unable to detect: ' & $DotNetFx)
EndIf
;Message Box about finishing
MsgBox(0, 'done')

it does not work, no msgbox

Posted (edited)

Run it from within Scite and look at the console which should give you what errors if any it returns.

Actually that won't work since you're using #RequireAdmin, remove #RequireAdmin and try running it from Scite to see if there any errors.

Edited by Subz
Posted

You can merge them, the only reason I said switch off #RequireAdmin is so you can see whats happening in the console ie. debugging purposes.  You can re-add it again or merge your scripts with other scripts.

Posted

If you hard code the location then you always need to use that location, however by using @ScriptDir it always points at the folder your script is in.  So if you copied all your files to \\Server\Share\ the script will resolve @ScriptDir to \\Server\Share.

Posted

Nursultan, you need to do some investigation yourself, what I suggest is setup a VM for testing and test, you will find that the dll needs to be copied to the local machine probably into an area like C:\Program Files (x86)\Your Program and registered from there.  If you want to do a complete setup package then you should probably look at InnoSetup using the QuickStart Pack  its extremely simple to understand and will allow you to register the dlls, setup an uninstaller for your program etc... (AutoIt Setup uses InnoSetup for its installer)

http://www.jrsoftware.org/isdl.php

  • 2 weeks later...
Posted

@Nursultan  Its generally very rare for switches to change for an application, so backup your current script folder, overwrite the old exe with the new exe (make sure the name of the file hasn't changed, if it has you need to update that in the script, then test the installation again.

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...