Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Registry setting not imported

Featured Replies

Hi, I am using windows 7 64bit

case 1

I applied "disable Open File Security Warning.reg", reboot the computer, and I will not get Open File Security Warning.

==========================================================

Windows Registry Editor Version 5.00

; Created by: Shawn Brink

; http://www.sevenforums.com

; Tutorial: Open File Security Warning - Enable or Disable

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments]

"SaveZoneInformation"=dword:00000001

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Associations]

"LowRiskFileTypes"=".avi;.bat;.com;.cmd;.exe;.htm;.html;.lnk;.mpg;.mpeg;.mov;.mp3;.msi;.m3u;.rar;.re g;.txt;.vbs;.wav;.zip;"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Attachments]

"SaveZoneInformation"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Associations]

"LowRiskFileTypes"=-

==========================================================

case 2

But using WPI (windows post installation wizard ) to install the game and apply the registry, I still get this nag message refer to the picture.

WPI code

{REGEDIT} "%wpipath%\\disable Program Compatibility Assistant.reg"

{REBOOT 3}

I know I can always uncheck the box "Always ask before opening this file". But I want to create an auto installer of the game with all the configurations.

please advice and thanks.

post-31401-0-40084400-1371488689_thumb.j

A workaround, if we want integrate this registry keys is to use RunOnceEx method, like this example:

1 - Create a batch file:

Assistant.bat


@echo off

REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
SET KEY=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY%\010 /V 1 /D "REGEDIT /S %systemroot%\Setup\scripts\Assistant.reg" /f

shutdown.exe /r /t 10
EXIT

2 - Inside your %Distribution_Folder%, create $OEM$\$$\Setup\scripts (inside :.\sources)

3 - Copy your Registry file inside the folder scripts:

Assistant.reg (added more values)


Windows Registry Editor Version 5.00
; Created by: Shawn Brink
; http://www.sevenforums.com
; Tutorial: Open File Security Warning - Enable or Disable

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments]
"SaveZoneInformation"=dword:00000001

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Associations]
"LowRiskFileTypes"=".avi;.bat;.com;.cmd;.exe;.htm;.html;.lnk;.mpg;.mpeg;.mov;.mp3;.msi;.m3u;.rar;.reg;.txt;.vbs;.wav;.zip"

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Download]
"CheckExeSignatures"="no"
"RunInvalidSignatures"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Attachments]
"SaveZoneInformation"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Associations]
"LowRiskFileTypes"=-

4 - Using Execute after with WPI inside Options wizard Tools (checked)

5a - You can use and write: {BATCH}

5b - And browse to the path where you set the batch file:

example: {BATCH} C:\WPI_v8.6.6\Install\Tweaks\Assistant.bat

WPI_Log.txt

lundi 17 juin 2013 21:18:47

Programme: Execute After

ID unique: EXECUTE_AFTER

Ordre: 0

Catégorie: WPI Built In

lundi 17 juin 2013 21:18:47 - cmd1 Succès (Code de retour 0): "cmd.exe" /C "C:\WPI_v8.6.6\Install\Tweaks\Assistant.bat"

lundi 17 juin 2013 21:18:48 - Installation terminée.

6 - The registry file will take effect when the computer restarts

Tested and works fine!

*Edit: Check if you have unlocked the exe file first

Edited by myselfidem

  • Author

*Edit: Check if you have unlocked the exe file first

Thanks for the code and you are absolutely right, I did not unlock the exe file.

I never encounter such situation of a file being locked.

Thank you once again . :thumbup

Edited by illusions

NOTE:

However if you use WPI on your computer and exit without using a new time 'Execute after'

the settings about the registry keys will be erased and saved as default with security values!


; Key removed
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Associations]
"LowRiskFileTypes"=".avi;.bat;.com;.cmd;.exe;.htm;.html;.lnk;.mpg;.mpeg;.mov;.mp3;.msi;.m3u;.rar;.reg;.txt;.vbs;.wav;.zip"


; Key restored with default value
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Download]
"RunInvalidSignatures"=dword:00000000

Regards

*Edit: We can see how works inside WPI:

Inside WPI.hta


WriteRegKey("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Download\\CheckExeSignatures","no","REG_SZ");
WriteRegKey("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Download\\RunInvalidSignatures",1,"REG_DWORD");
WriteRegKey("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Associations\\LowRiskFileTypes",".js;.zip;.rar;.nfo;.txt;.exe;.bat;.com;.cmd;.reg;.msi;.hta;.htm;.html;.gif;.bmp;.jpg;.avi;.mpg;.mpeg;.mov;.mp3;.m3u;.wav;.ade;.adp;.bas;.chm;.cpl;.crt;.dll;.hlp;.inf;.ins;.isp;.jse;.lnk;.mdb;.mde;.msc;.msp;.mst;.pcd;.pif;.scr;.sct;.shs;.url;.vb;.vbe;.vbs;.wsc;.wsf;.wsh","REG_SZ");

And inside core.js

On line 543:

WriteRegKey("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Download\\RunInvalidSignatures",0,"REG_DWORD");

And from line 593:


if (!ExitBeforeInstall)
{
RestoreRegistryKeys();

if (getOSver()=="XP" || getOSver()=="Vista" || getOSver()=="Win7" || getOSver()=="Win8")
{
DeleteRegKey("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Associations\\LowRiskFileTypes");
DeleteRegKey("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Associations\\");
}

Edited by myselfidem

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.