Here is my code, I only want to copy the file if the registry key value is Surface
startup_folder = Shell.GetFolder(SHF_STARTUP);
StatusDlg.Show(MB_ICONNONE, false);
-- Test to see if registry key is Surface, if so,copy the file
IsSurface = Registry.GetValue(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\BIOS\\SystemFa mily ", "Surface", true);
if IsSurface = Surface
then
File.Copy(SessionVar.Expand("%AppFolder%\\eSCOPE ELITE Pen.exe"), startup_folder, true, true, false, true, nil);
else
end
result = File.Run(SessionVar.Expand("%AppFolder%\\Setup_You Tube.exe"), "", "", SW_SHOWNORMAL, true);
File.Delete("C:\\atstemp\\*.*", true, false, true, nil);
startup_folder = Shell.GetFolder(SHF_STARTUP);
StatusDlg.Show(MB_ICONNONE, false);
-- Test to see if registry key is Surface, if so,copy the file
IsSurface = Registry.GetValue(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\BIOS\\SystemFa mily ", "Surface", true);
if IsSurface = Surface
then
File.Copy(SessionVar.Expand("%AppFolder%\\eSCOPE ELITE Pen.exe"), startup_folder, true, true, false, true, nil);
else
end
result = File.Run(SessionVar.Expand("%AppFolder%\\Setup_You Tube.exe"), "", "", SW_SHOWNORMAL, true);
File.Delete("C:\\atstemp\\*.*", true, false, true, nil);
Comment