Problems registering OCX for Macroscheduler SDK
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 14
- Joined: Fri Aug 20, 2010 9:08 am
Problems registering OCX for Macroscheduler SDK
Hello,
i downloaded Macroscheduler SDK and unzipped into the installdir of MAchroscheduler 12
Following the macro_script.pdf i copied the mScript.dll and mScript.ocx
to teh windows sytem dir:
C:\Windows\System32>dir mScript*
Datenträger in Laufwerk C: ist ACER
Volumeseriennummer: 8A62-860C
Verzeichnis von C:\Windows\System32
25.08.2010 20:11 994.608 mscript.dll
25.08.2010 20:11 673.016 mscript.ocx
2 Datei(en), 1.667.624 Bytes
0 Verzeichnis(se), 353.923.112.960 Bytes frei
the i runned
C:\Windows\System32>regsvr32 mscript.ocx
i get the following error( i translated this because i get the error in german so it might be not be identical to the original english version)
error loading mscript.ocx
ensure the file is saved in the given path, or debug the file to exclude problems with the binary or depending dll files
The modul was not found
i checked also the path:
C:\Windows\System32>path
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x86;C:\Pro
gram Files (x86)\EgisTec\MyWinLocker 3\x64
and windows sytem is in there
i am driving version:
C:\Windows\System32>ver
Microsoft Windows [Version 6.1.7600]
do i miss something ?
Regards
dj
i downloaded Macroscheduler SDK and unzipped into the installdir of MAchroscheduler 12
Following the macro_script.pdf i copied the mScript.dll and mScript.ocx
to teh windows sytem dir:
C:\Windows\System32>dir mScript*
Datenträger in Laufwerk C: ist ACER
Volumeseriennummer: 8A62-860C
Verzeichnis von C:\Windows\System32
25.08.2010 20:11 994.608 mscript.dll
25.08.2010 20:11 673.016 mscript.ocx
2 Datei(en), 1.667.624 Bytes
0 Verzeichnis(se), 353.923.112.960 Bytes frei
the i runned
C:\Windows\System32>regsvr32 mscript.ocx
i get the following error( i translated this because i get the error in german so it might be not be identical to the original english version)
error loading mscript.ocx
ensure the file is saved in the given path, or debug the file to exclude problems with the binary or depending dll files
The modul was not found
i checked also the path:
C:\Windows\System32>path
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x86;C:\Pro
gram Files (x86)\EgisTec\MyWinLocker 3\x64
and windows sytem is in there
i am driving version:
C:\Windows\System32>ver
Microsoft Windows [Version 6.1.7600]
do i miss something ?
Regards
dj
-
- Newbie
- Posts: 14
- Joined: Fri Aug 20, 2010 9:08 am
Update: Problems registering OCX for Macroscheduler SDK
[quote="djDeeJay_dot_com"]Hello,
i downloaded Macroscheduler SDK and unzipped into the installdir of MAchroscheduler 12
Following the macro_script.pdf i copied the mScript.dll and mScript.ocx
to teh windows sytem dir:
C:\Windows\System32>dir mScript*
Datenträger in Laufwerk C: ist ACER
Volumeseriennummer: 8A62-860C
Verzeichnis von C:\Windows\System32
25.08.2010 20:11 994.608 mscript.dll
25.08.2010 20:11 673.016 mscript.ocx
2 Datei(en), 1.667.624 Bytes
0 Verzeichnis(se), 353.923.112.960 Bytes frei
the i runned
C:\Windows\System32>regsvr32 mscript.ocx
i get the following error( i translated this because i get the error in german so it might be not be identical to the original english version)
error loading mscript.ocx
ensure the file is saved in the given path, or debug the file to exclude problems with the binary or depending dll files
The modul was not found
i checked also the path:
C:\Windows\System32>path
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x86;C:\Pro
gram Files (x86)\EgisTec\MyWinLocker 3\x64
and windows sytem is in there
i am driving version:
C:\Windows\System32>ver
Microsoft Windows [Version 6.1.7600]
do i miss something ?
Regards
dj[/quote]
I unpacked the sdk again under my user\documents folder
and started
C:\Windows\System32>regsvr32 mscript.ocx from cmd-shell
got an error 0x800040005
I searched and found that this is miising rights for the registering, so u have to start the cmd shaell with admin rights (right clich on the cmd icon and select run as )
running the command again as admin works fine for that step
missing vb6 on my computer i added the ocx to access 2000 (9.0.44 sr1 ) with Vb 6.5 wich works fine until until runnning the following code:
[code]
Function testmacroscheduler()
Dim ms As MScript.MacroScript
Set ms = CreateObject("MScript.MacroScript")
testmacroscheduler = ms.RunCode("mdl>hello world", "")
ms.Cleanup
End Function
[/code]
and A CALL OF THE FUNCTION testmacroscheduler()
cause access to crash
thats how far i came
good night
dj
i downloaded Macroscheduler SDK and unzipped into the installdir of MAchroscheduler 12
Following the macro_script.pdf i copied the mScript.dll and mScript.ocx
to teh windows sytem dir:
C:\Windows\System32>dir mScript*
Datenträger in Laufwerk C: ist ACER
Volumeseriennummer: 8A62-860C
Verzeichnis von C:\Windows\System32
25.08.2010 20:11 994.608 mscript.dll
25.08.2010 20:11 673.016 mscript.ocx
2 Datei(en), 1.667.624 Bytes
0 Verzeichnis(se), 353.923.112.960 Bytes frei
the i runned
C:\Windows\System32>regsvr32 mscript.ocx
i get the following error( i translated this because i get the error in german so it might be not be identical to the original english version)
error loading mscript.ocx
ensure the file is saved in the given path, or debug the file to exclude problems with the binary or depending dll files
The modul was not found
i checked also the path:
C:\Windows\System32>path
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x86;C:\Pro
gram Files (x86)\EgisTec\MyWinLocker 3\x64
and windows sytem is in there
i am driving version:
C:\Windows\System32>ver
Microsoft Windows [Version 6.1.7600]
do i miss something ?
Regards
dj[/quote]
I unpacked the sdk again under my user\documents folder
and started
C:\Windows\System32>regsvr32 mscript.ocx from cmd-shell
got an error 0x800040005
I searched and found that this is miising rights for the registering, so u have to start the cmd shaell with admin rights (right clich on the cmd icon and select run as )
running the command again as admin works fine for that step
missing vb6 on my computer i added the ocx to access 2000 (9.0.44 sr1 ) with Vb 6.5 wich works fine until until runnning the following code:
[code]
Function testmacroscheduler()
Dim ms As MScript.MacroScript
Set ms = CreateObject("MScript.MacroScript")
testmacroscheduler = ms.RunCode("mdl>hello world", "")
ms.Cleanup
End Function
[/code]
and A CALL OF THE FUNCTION testmacroscheduler()
cause access to crash
thats how far i came
good night
dj
-
- Pro Scripter
- Posts: 110
- Joined: Thu Apr 08, 2010 6:11 am
- Location: Hørsholm, Denmark
- Contact:
-
- Newbie
- Posts: 14
- Joined: Fri Aug 20, 2010 9:08 am
-
- Pro Scripter
- Posts: 110
- Joined: Thu Apr 08, 2010 6:11 am
- Location: Hørsholm, Denmark
- Contact:
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
The DLL needs to be in the same location as your binary. I think you have put it in the Windows System folder which will not work. You need mscript.dll in the same folder as your application's executable.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
So for MS Access you need to put a copy of mscript.dll in the same folder as msaccess.exe - in the Access Program folder (e.g. c:\program files\Microsoft Office\Office12)
Then, assuming you have registered the ocx you can use the following code format in an Access module:
Then, assuming you have registered the ocx you can use the following code format in an Access module:
Code: Select all
Sub SDKTest()
Dim mscript
Dim s
Set mscript = CreateObject("Mscript.MacroScript")
mscript.script = "MessageModal>hello"
mscript.init
s = mscript.Run
mscript.cleanup
End Sub
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 14
- Joined: Fri Aug 20, 2010 9:08 am
Hi marcus,
done as u said, dll is in the:
C:\Program Files\Microsoft Office\Office10 folder
the ocx is there also but because i regsitered it earlyer Acces has its path to the user homem where i putted it first
running the exaple (step by step with F8) brings a cannot load mscript.dll error in line
[code]
mscript.Script = "MessageModal>hello"
[/code]
and after any following action (break or next step) the following crash:
Problemsignatur:
Problemereignisname: APPCRASH
Anwendungsname: MSACCESS.EXE
Anwendungsversion: 9.0.0.4506
Anwendungszeitstempel: 39b73a58
Fehlermodulname: StackHash_3c9f
Fehlermodulversion: 0.0.0.0
Fehlermodulzeitstempel: 00000000
Ausnahmecode: c0000005
Ausnahmeoffset: 00000000
Betriebsystemversion: 6.1.7600.2.0.0.768.3
Gebietsschema-ID: 1031
Zusatzinformation 1: 3c9f
Zusatzinformation 2: 3c9fffcafd4a169baa105a8ba17430a7
Zusatzinformation 3: 0321
Zusatzinformation 4: 0321da81ea9974bcc33434ef9b5a8560
[quote="mtettmar"]So for MS Access you need to put a copy of mscript.dll in the same folder as msaccess.exe - in the Access Program folder (e.g. c:\program files\Microsoft Office\Office12)
Then, assuming you have registered the ocx you can use the following code format in an Access module:
[code]Sub SDKTest()
Dim mscript
Dim s
Set mscript = CreateObject("Mscript.MacroScript")
mscript.script = "MessageModal>hello"
mscript.init
s = mscript.Run
mscript.cleanup
End Sub[/code][/quote]
done as u said, dll is in the:
C:\Program Files\Microsoft Office\Office10 folder
the ocx is there also but because i regsitered it earlyer Acces has its path to the user homem where i putted it first
running the exaple (step by step with F8) brings a cannot load mscript.dll error in line
[code]
mscript.Script = "MessageModal>hello"
[/code]
and after any following action (break or next step) the following crash:
Problemsignatur:
Problemereignisname: APPCRASH
Anwendungsname: MSACCESS.EXE
Anwendungsversion: 9.0.0.4506
Anwendungszeitstempel: 39b73a58
Fehlermodulname: StackHash_3c9f
Fehlermodulversion: 0.0.0.0
Fehlermodulzeitstempel: 00000000
Ausnahmecode: c0000005
Ausnahmeoffset: 00000000
Betriebsystemversion: 6.1.7600.2.0.0.768.3
Gebietsschema-ID: 1031
Zusatzinformation 1: 3c9f
Zusatzinformation 2: 3c9fffcafd4a169baa105a8ba17430a7
Zusatzinformation 3: 0321
Zusatzinformation 4: 0321da81ea9974bcc33434ef9b5a8560
[quote="mtettmar"]So for MS Access you need to put a copy of mscript.dll in the same folder as msaccess.exe - in the Access Program folder (e.g. c:\program files\Microsoft Office\Office12)
Then, assuming you have registered the ocx you can use the following code format in an Access module:
[code]Sub SDKTest()
Dim mscript
Dim s
Set mscript = CreateObject("Mscript.MacroScript")
mscript.script = "MessageModal>hello"
mscript.init
s = mscript.Run
mscript.cleanup
End Sub[/code][/quote]
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
If you're getting "cannot load mscript.dll" then mscript.dll is in the wrong location.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?