Windows 7 issues

Started by MW4, May 13, 2014, 01:22:39 PM

Previous topic - Next topic

MW4

We have just converted over to Win 7 from XP, and we are starting to see assorted issues with old Winbatch scripts that are breaking.

Seems like there is no detailed error listing like the old XP ones, just a "...stopped working"
Also, the failures are not consistent, sometimes they work, other times not.

Is there a way to get better error info than Debug trace?
Is there a comprehensive windows 7 "gotchas" list of things to fix from older xp scripts?

As always, any help is appreciated.

JTaylor

The BIG thing will be UAC and all that entails.   Not knowing what the script does makes it hard to offer much in the way of specifics but if it is things which require "permission" then you will need to read through the documentation on Manifests and such things.  The active thread related to "Run as Administrator" has links to information on this topic.   

Jim

Deana

Quote from: MW4 on May 13, 2014, 01:22:39 PM
We have just converted over to Win 7 from XP, and we are starting to see assorted issues with old Winbatch scripts that are breaking.

Seems like there is no detailed error listing like the old XP ones, just a "...stopped working"
Also, the failures are not consistent, sometimes they work, other times not.

Is there a way to get better error info than Debug trace?
Is there a comprehensive windows 7 "gotchas" list of things to fix from older xp scripts?

As always, any help is appreciated.

There have been a number of changes between the Windows XP and the Windows 7 operating system.

First and foremost make sure that you are running WinBatch 2009C or newer on Windows 7.

Probably the most challenging part to updating scripts is the introduction of UAC ( User Account Control) in Windows. Whether or not your script will be affected by UAC depends on the scripts current state. In a number of cases, no changes will be necessary to comply with Microsoft Windows Security requirements. However, some scripts, may require changes to their install, function, and update processes to properly work in a Windows UAC environment.

Resources:
Understanding UAC: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/UAC+!!~Understanding~UAC~!!.txt
UAC Help: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/UAC+UAC~Help.txt
http://msdn.microsoft.com/en-us/library/aa480152.aspx#appcomp_topic5

Also if you are now running on a 64-bit rather than a 32-bit platform, you will need to keep that in mind when designing your script. See "File Redirection" and  "Registry Virtualization":

Resources:
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/64-bit+32~Bit~WinBatch~on~64~Bit~Systems.txt
http://msdn.microsoft.com/en-us/library/windows/desktop/aa965884(v=vs.85).aspx




Error Reporting should no have changed in any way. WinBatch still reports errors the same way it did in Windows XP. Are you suppressing errors using ErrorMode or IntControl 73? You will need to make sure you are handling errors properly. here is a nice tutorial that should help: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+Tutorials+Trap~Errors.txt




Also DebugTrace should be logging any errors. Have you inspected them? If so and you have a question about the output. Please share it here.

Deana F.
Technical Support
Wilson WindowWare Inc.

MW4

OK, I was just able to identify one perplexing problem....
This script has worked for like 6 years without fail on XP.


THIS WORKS with one recipient:

AddExtender("wwmap44i.dll")   
recip_email="mw@mw.com"
ret=mSendMailEx(recip_email,"Test log","test","","outlook")
Exit


THIS DOESNT with two recipients:

AddExtender("wwmap44i.dll")
recip_email="mw@mw.com;mw4@gmail.com"
ret=mSendMailEx(recip_email,"Test log","test","","outlook")
Exit


Fails using all these formats with two recipieents...with one it works:
[SMTP:USER@DOMAIN.COM]
SMTP:USER@DOMAIN.COM
USER@DOMAIN.COM



************************************************************

*** Debug Initialized ***

==============================
Tue 5/13/2014 2:13:03 PM
WinBatch 32 2014A
WIL DLL 6.14ana
C:\WBT\email w gmail.wbt
Windows platform: NT, version: 6.1, build: 7601 (Service Pack 1)
ErrorMode: @CANCEL
Valid Code Signature: Yes
UAC Manifest Settings: level="highestAvailable" uiAccess="true"
UAC Elevation Level: Standard User or Disabled
==============================

----- Extender loaded: C:\Program Files\WinBatch\System\wwmap44i.dll (file version: 44011,0,0,0)

AddExtender("wwmap44i.dll")
(33806) VALUE INT => 1

recip_email="[SMTP:mw@mw.com];[SMTP:mw4nc@gmail.com]"
(33806) VALUE STRING => "[SMTP:mw@mw.com];[SMTP:mw4nc@gmail.com]"

Deana

Are you by chance running Outlook 2007? If so, we have found that it no longer contains the Messaging API (MAPI) client as a part of the base product installation. As a result, there is functionality missing that the MAPI Extender depends on!

Reference:
http://www.microsoft.com/en-us/download/details.aspx?id=1004
http://blogs.msdn.com/b/nayan/archive/2009/04/07/outlook-2007-and-simple-mapi.aspx

Your options are to download and install the Messaging API (MAPI) client or to abandon MAPI and use the Postie Extender to handle sending email.

Personally I recommend using the Postie Extender to send email. The code would look something like this:

Code (winbatch) Select

AddExtender("WWPST44I.DLL")
host="mail.mw.com"
fromaddr="mw@mw.com"
tolist="mw@mw.com|mw4@gmail.com"
kInit(host,fromaddr,"","","")
kDest(tolist,"","")
ret = kSendText("Test Log","test","","")
If ret == 0
   errline=kStatusInfo()
   Message("ErrLine",errline)
EndIf


Deana F.
Technical Support
Wilson WindowWare Inc.

MW4

That was it...solved by uninstalling Outlook 2007 and reinstalling Outlook 2003.

Progress...it's 2014 and I'm installing 2003...because it works LOL
Seems like someone could write an outlook express replacement pretty easily.


On another note, does this look all in order??

Valid Code Signature: Yes
UAC Manifest Settings: level="highestAvailable" uiAccess="true"
UAC Elevation Level: Standard User or Disabled

Deana

I suspect the AsInvoker requested execution level should be sufficient to send email using MAPI. AsInvoker is recommended for standard user applications. HighestAvailable is also okay.
Deana F.
Technical Support
Wilson WindowWare Inc.