Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Registry setting not imported

- - - - -

  • Please log in to reply
3 replies to this topic

#1
illusions

illusions

    Junior

  • Member
  • Pip
  • 78 posts
  • Joined 18-September 04
  • OS:Windows 7 x64
  • Country: Country Flag
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.

Attached Files

  • Attached File  nag.jpg   44.83KB   1 downloads



How to remove advertisement from MSFN

#2
myselfidem

myselfidem

    Member

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • Joined 06-January 10
  • OS:Windows 7 x64
  • Country: Country Flag
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, 18 June 2013 - 03:10 AM.

For Windows 7 OS: SetProductKey.rar (fr-FR/en-US. Integrate keys).

#3
illusions

illusions

    Junior

  • Member
  • Pip
  • 78 posts
  • Joined 18-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

*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, 17 June 2013 - 05:14 PM.


#4
myselfidem

myselfidem

    Member

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • Joined 06-January 10
  • OS:Windows 7 x64
  • Country: Country Flag
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, 18 June 2013 - 07:13 AM.

For Windows 7 OS: SetProductKey.rar (fr-FR/en-US. Integrate keys).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users