by chas521 » Sun Dec 16, 2012 9:27 pm
Saw this regarding MioPocket and your device:
I changed the script to test if toolhelp.dll was needed before it copied it everywhere. That's fixed my problem with the NAVMAN MY75T.
I suspect what actually fixed it was just the checking process SupportsProcHandling(). My theory is that this command forced the toolhelp.dll to be loaded and allowed all the other proc handling code to work.
For Reference I changed the lines in mioautorun.mscr (auto.mscr for Navman devices) that copy toolhelp, to the following lines of code.
WriteFile(InstallLogFile, "MioAutoRun.mscr: Checking the System Supports process Handling...^NL^", TRUE)
WriteFile(InstallLogFile, "MioAutoRun.mscr: SupportsProcHandling = " & SupportsProcHandling() & " ...^NL^", TRUE)
If (SupportsProcHandling()=TRUE)
WriteFile(InstallLogFile, "MioAutoRun.mscr: INFO: The System Supports process Handling...^NL^", TRUE)
Else
WriteFile(InstallLogFile, "MioAutoRun.mscr: Warning: The System Does Not Support process Handling...^NL^", TRUE)
#Copy toolhelp.dll to \Windows so that the ProcExists commands in this script will work
If(SystemVersion("major") = 6)
WriteFile(InstallLogFile, "MioAutoRun.mscr: Copying CE6 version of toolhelp.dll to the system...^NL^", TRUE)
Copy(SystemFolder\"CE6\toolhelp.dll", "\Windows\toolhelp.dll", TRUE)
Else
WriteFile(InstallLogFile, "MioAutoRun.mscr: Copying toolhelp.dll to the system...^NL^", TRUE)
Copy(SystemFolder\"toolhelp.dll", "\Windows\toolhelp.dll")
EndIf
EndIf
If(SystemVersion("major") = 6)
#If CE6, replace all copies of toolhelp.dll with the CE6 version, since MortScript crashes with the pre-CE6 version
WriteFile(InstallLogFile, "MioAutoRun.mscr: Copying CE6 versions of toolhelp.dll to miopocket...^NL^", TRUE)
Copy(SystemFolder\"CE6\toolhelp.dll", ProgramsFolder\"toolhelp.dll", TRUE)
Copy(SystemFolder\"CE6\toolhelp.dll", ProgramsFolder\"MortScript\toolhelp.dll", TRUE)
Copy(SystemFolder\"CE6\toolhelp.dll", ScriptsFolder\"toolhelp.dll", TRUE)
Copy(SystemFolder\"CE6\toolhelp.dll", SystemFolder\"toolhelp.dll", TRUE)
Copy(SystemFolder\"CE6\toolhelp.dll", SystemFolder\"Extra\toolhelp.dll", TRUE)
If(FileExists(SkinFolder\"SystemInformation\MyApps\toolhelp.dll"))
Copy(SystemFolder\"CE6\toolhelp.dll", SkinFolder\"SystemInformation\MyApps\toolhelp.dll", TRUE)
EndIf
Else
#If not CE6, restore all copies of toolhelp.dll back to the CE4 version
#(in case you have both a CE5 and CE6 device using the same SD card)
WriteFile(InstallLogFile, "MioAutoRun.mscr: Copying CE4 versions of toolhelp.dll to miopocket...^NL^", TRUE)
Copy(SystemFolder\"CE4\toolhelp.dll", ProgramsFolder\"toolhelp.dll", TRUE)
Copy(SystemFolder\"CE4\toolhelp.dll", ProgramsFolder\"MortScript\toolhelp.dll", TRUE)
Copy(SystemFolder\"CE4\toolhelp.dll", ScriptsFolder\"toolhelp.dll", TRUE)
Copy(SystemFolder\"CE4\toolhelp.dll", SystemFolder\"toolhelp.dll", TRUE)
Copy(SystemFolder\"CE4\toolhelp.dll", SystemFolder\"Extra\toolhelp.dll", TRUE)
If(FileExists(SkinFolder\"SystemInformation\MyApps\toolhelp.dll"))
Copy(SystemFolder\"CE4\toolhelp.dll", SkinFolder\"SystemInformation\MyApps\toolhelp.dll", TRUE)
EndIf
EndIf
Thanks to tonyfussell
If it ain't broke don't fix it!
ALWAYS BACK-UP YOUR FILES/FOLDERS BEFORE MAKING EDITING CHANGES!
Please do NOT post any thanks. Simply press the hand icon with the "thumb up" which is the thank you button.