Excel disable warning - Some files can contain viruses

Page 2 of 2 FirstFirst 12

  1. Posts : 16,966
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #11

    Do you also get warnings for internet hyperlinks? I don't.
    Here's a sample spreadsheet.
    Tutorial Index - TenForums - Direct download


    Denis



    Oh, welcome to TenForums.

    It's really worth making time to browse through the Tutorial index - there's a shortcut to it at the top of every page.
    - At the foot of the Tutorial index is a shortcut to download it as a spreadsheet.
    - I download a new copy each month.
    - By downloading it as a spreadsheet I can benefit from Excel's excellent filtering capabilities when I search for topics of interest.
    - Tutorials are also listed by category at Tutorials - there's also a shortcut to that at the top of every page.
    - Both tutorial lists are searchable.
    - You can also search for TenForumsTutorials in many general search engines, such as Google, by adding site:tenforums.com/tutorials after your search term. For example,
    taskbar toolbars site:tenforums.com/tutorials

    You can search TenForums using the search box in the top-right corner of all TenForums webpages or using Advanced Search - TenForums
    - You can also search TenForums threads in many general search engines, such as Google, by adding site:tenforums.com after your search term. For example,
    Search for drivers by HardwareID site:tenforums.com
    - [This is what the search box in the top-right corner of TenForums webpages does automatically]
      My Computer


  2. Posts : 16,966
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #12

    There are no doubt several ways to use VBA for the job.
    An example line from mine is
    Code:
    Shell Chr(34) & "C:\Tools\BlahBlahBlah\StartSyncSelected.bat" & Chr(34) & " """ & ActiveWorkbook.FullName & """", 7


    Have you considered writing all those links into an htm file instead? I don't suppose that would generate any warnings.


    Best of luck,
    Denis
      My Computer


  3. Posts : 30
    Windows 10
    Thread Starter
       #13

    Try3 said:
    Have you considered writing all those links into an htm file instead? I don't suppose that would generate any warnings.
    Idea is to have it all in one place in Excel rather than switch between different apps.

    Try3 said:
    Do you also get warnings for internet hyperlinks? I don't.
    Here's a sample spreadsheet.
    Tutorial Index - TenForums - Direct download
    Links open without warnings.

    Managed to open .bat without warning by taking ownership of notepad.exe inside windows\system32 then replacing it with conhost.exe (renamed to notepad.exe) and adding following to registry to make Excel think .bat files are text files.

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Classes\.bat]
    @="txtfile"
    Last edited by captainJack; 13 Mar 2024 at 13:09.
      My Computer


  4. Posts : 16,966
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #14

    What an imaginative & very neat solution.

    Can I just check I have understood you correctly?
    1 You took ownership of notepad.exe
    2 You made a copy of conhost.exe, renamed it notepad.exe & pasted it into C:\Windows\System32 to overwrite the real notepad.exe
    3 You created that .bat Registry key as shown in your post.

    I can see on my Office 2021 computer that a set of file extensions exists in that Classes key.
    So, taking what you've done into account, I think that list is telling Office what type of file each file extension is [independently of Windows file associations] and hence how to handle them.
    Imaginative, very neat & quite ingenious. I'll make sure to note all this in case I need to solve the same problem in the future.

    It also seems to me, from the links we studied earlier in your thread, that you might be the only one to have solved this problem.


    Denis
      My Computer


  5. Posts : 16,966
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #15

    Oh, it just occurred to me ...

    Notepad is one of those components that can be 'rescued' and used as a portable app.
    So you could still use Notepad if you needed to. The files can be copied out of an old system image.
    Rescue Old Windows 10 Applications from Oblivion [the Ed Tittel method] - Windows Enterprise Desktop
    I don't attempt to substitute them for the current versions. I stick them within a protected C:\Tools folder along with all my other scripts & portable apps and I run them from shortcuts in my TaskbarToolbar.


    Denis
      My Computer


  6. Posts : 30
    Windows 10
    Thread Starter
       #16

    Try3 said:
    Can I just check I have understood you correctly?
    1 You took ownership of notepad.exe
    2 You made a copy of conhost.exe, renamed it notepad.exe & pasted it into C:\Windows\System32 to overwrite the real notepad.exe
    3 You created that .bat Registry key as shown in your post.
    Yes this exactly what i did, forgot to mention that conhost.exe was actually renamed to notepad.exe.

    I rarely ever use windows built in notepad as i always use Notepad++.

    - - - Updated - - -

    Found another solution using IFEO hack, to not double post i described it here.
      My Computer


  7. Posts : 16,966
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #17

    cmd.exe /k "%1" "C:\Windows\system32\notepad.exe" d:\bat.bat

    Code:
    cmd.exe /k ""%1" "C:\Windows\system32\notepad.exe" d:\bat.bat"
    or
    Code:
    cmd.exe /k ""%1" C:\Windows\system32\notepad.exe d:\bat.bat"
    unless there are no spaces or special characters in %1 in which case
    Code:
    cmd.exe /k "%1 C:\Windows\system32\notepad.exe d:\bat.bat"
    would do.

    The whole of what comes after the /k [or /c] should be wrapped in quotation marks. To cmd, they are all a single statement of what is to be run.
    Here is a simple example
    Code:
    cmd.exe /k "C:\Windows\System32\sfc.exe /ScanNow & Title SFC complete"
    and here is an example with a similarly convoluted set of quotation marks
    Code:
    cmd.exe /c "%windir%\system32\findstr.exe /c:"[SR] Repair" %windir%\Logs\CBS\CBS.log >"F:\Outputs\%ComputerName%-SFCResults-Repairs.Log""


    I have only learnt this through experience. MSLearn & SS64 give examples that imply what I do is only required in particular cases.
    CMD - SS64
    cmd - MSLearn


    Thanks for the rep,
    Denis
    Last edited by Try3; 13 Mar 2024 at 14:57.
      My Computer


  8. Posts : 30
    Windows 10
    Thread Starter
       #18

    Try3 said:
    Code:
    cmd.exe /k ""%1" "C:\Windows\system32\notepad.exe" d:\bat.bat"
    or
    Code:
    cmd.exe /k ""%1" C:\Windows\system32\notepad.exe d:\bat.bat"
    unless there are no spaces or special characters in %1 in which case
    Code:
    cmd.exe /k "%1 C:\Windows\system32\notepad.exe d:\bat.bat"
    would do.
    I am bit confused are you suggesting this code to be used where?
      My Computer


  9. Posts : 16,966
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #19

    Sorry, I was referring to your comment
    Found another solution using IFEO hack, to not double post i described it here.
    and hence to that other thread.
    I believe your problem with
    cmd.exe /k "%1" "C:\Windows\system32\notepad.exe" d:\bat.bat
    was because of where you were using quotation marks.


    Denis
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:47.
Find Us




Windows 10 Forums