1

Task scheduler opens an Excel application. Sometimes appears at starting the excel instance a window in saying "The last time you opened " ...name of the file...", it caused a serious error. Do you still want to open it?" I need to click on YES manually. After that excel runs normally. I found this has to deal with the registry in this link: https://www.utteraccess.com/forum/index.php?showtopic=2045211.

How to "clear" or change the registry before launching Excel to prevent an appearing the pop-up window? (vbs, cmd)Thanks enter image description here

kabarto
  • 75
  • 1
  • 14
  • 3
    Could be just me, but it seems anything but *fixing the file so that it stops causing serious errors* would be a band-aid. – Mathieu Guindon Oct 16 '19 at 15:20
  • 1
    That said, this community can help you figure out what's wrong with a script that's blowing up or otherwise not behaving as it should, but we're not here to *provide* any code to anyone, let alone a solution in any one of X wildly different languages/technologies. Consider researching "vbs edit registry" or "batch edit registry" or "powershell edit registry", depending on what type of scripted solution you're looking for... and I'm sure you'll find [an existing post](https://stackoverflow.com/q/28416995/1188513) that has everything you need. – Mathieu Guindon Oct 16 '19 at 15:28
  • It is not about "how do I perform the change" but "what do I have to change in registry"... – kabarto Oct 16 '19 at 15:49
  • 1
    Ok, but you're still asking for someone to write the code for you. Also, seriously consider addressing the real problem instead of patching it up with registry hacks – Mathieu Guindon Oct 16 '19 at 15:51
  • this web is about coding, the majority of the answers are in snippets....I do not understand where are you aiming... – kabarto Oct 16 '19 at 15:55
  • 1
    I'm just saying, Reddit, Facebook, and other platforms/forums might be perfectly fine with questions asking for code that does XYZ in whatever language answerers want to supply code for, but here it is expected (see [ask] and, perhaps more importantly, **[help/on-topic]**) that you ask about a *specific* programming problem; as it stands your question will likely end up closed as "too broad". – Mathieu Guindon Oct 16 '19 at 16:06
  • 1
    In addition to what Mathieu has said: It's not really a good idea to be changing this setting on a user's machine... The last answer in the link provided does mention this. It's for this kind of reason that unattended automation of Office applications is *not supported*. You might look into working with the Office Open XML of the file, rather than opening it in Excel if there's no user interaction... Also, in that link a tool to find the Registry entry is mentioned. If you're looking for code to change the registry I'm sure some searching will turn up code examples. – Cindy Meister Oct 16 '19 at 18:02

0 Answers0