illusions Posted June 17, 2013 Posted June 17, 2013 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.
myselfidem Posted June 17, 2013 Posted June 17, 2013 (edited) 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 offREG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceExSET KEY=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY%\010 /V 1 /D "REGEDIT /S %systemroot%\Setup\scripts\Assistant.reg" /fshutdown.exe /r /t 10EXIT2 - 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.txtlundi 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 restartsTested and works fine!*Edit: Check if you have unlocked the exe file first Edited June 18, 2013 by myselfidem
illusions Posted June 17, 2013 Author Posted June 17, 2013 (edited) *Edit: Check if you have unlocked the exe file firstThanks 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 . Edited June 17, 2013 by illusions
myselfidem Posted June 18, 2013 Posted June 18, 2013 (edited) 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:00000000Regards*Edit: We can see how works inside WPI:Inside WPI.htaWriteRegKey("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.jsOn 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 June 18, 2013 by myselfidem
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now