C:\Windows\System32\drivers\etc\hosts
/etc/hosts
using System.Diagnostics;
if (Process.GetProcessesByName("CalculatorApp").Length > 0)
Console.WriteLine("калькулятор запущен");
else
Console.WriteLine("калькулятор не запущен");
На вирусы проверял,ничего нету,так же как и проблем с мышкой(вторая также работала плохо)хорошо сформулированный вопрос, содержит не менее половины ответа (с)...
0. close all open programs or documents on any partition on the disk to pass-through
1. run DISKPART (command line utility)*
2. select hard drive carefully using SELECT DISK. disk numbering starts at zero. you can roughly verify your selection with LIST PARTITION if you know what your partitions should look like or LIST DISK to see disk sizes.
3. offline the disk using OFFLINE DISK. all volumes will disappear from windows explorer.
4. ATTRIBUTES DISK CLEAR READONLY
5. verify with ATTRIBUTES DISK
6. create VMDK file as shown in several howtos on the web
7. enjoy
From https://forums.virtualbox.org/viewtopic.php?f=6&t=...
cd "C:\Program Files\Oracle\VirtualBox"
VBoxManage internalcommands createrawvmdk -filename c:\disk.vmdk -rawdisk \\.\PhysicalDrive1
From https://toster.ru/q/531700?e=6527977#answer_item_1...>
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace ff.links
{
static partial class Program
{
static IEnumerable<string> scan(this IEnumerable<string> ds)
{
var files = new List<string>();
foreach (var d in ds)
try { files.add2my(d.here()).add2my(d.subdirs()); }
catch (Exception e) { Console.WriteLine($"{pfx}Scan \"{d}\" - {e.Message}"); }
return files;
}
static List<string> add2my(this List<string> l, IEnumerable<string> r) { l.AddRange(r); return l; }
static IEnumerable<string> here(this string d) => Directory.EnumerateFiles(d).Where(f => f.isTarget());
static IEnumerable<string> subdirs(this string d) => Directory.EnumerateDirectories(d).Where(p => !p.isIgnored()).scan();
static void print(this string s, string pfx = "", string sfx = "") => Console.WriteLine(pfx + s + sfx);
static void print(this IEnumerable<string> sa, string pfx = "", string sfx = "") => sa.ToList().ForEach(s => s.print(pfx, sfx));
static bool isTarget(this string p) => targets.Contains(p.Split(backSlashDelimiter).Last());
static string[] targets => new string[] { ffBinary, ffProfileSign, fflConfig };
const string fflConfig = "ff.links.cfg.json";
const string ffBinary = "firefox.exe";
const string ffProfileSign = "compatibility.ini";
const string skipd = ".default";
static bool isIgnored(this string p) => ignored.Contains(p.Split(backSlashDelimiter, StringSplitOptions.RemoveEmptyEntries).Last());
static string[] ignored => new string[]
{
"TorBrowser", "Microsoft", "MICROSOFT", "WindowsApps", "Windows", "WINDOWS",
"ProgramData", "All Users", "Documents and Settings", //"Users",
"My Documents", "My Pictures", "My Music", "My Videos", "Application Data",
"Start Menu", "Local Settings", "Cookies", "NetHood", "PrintHood", "Recent", "SendTo", "Templates",
"CrashReports", "WindowsImageBackup", "System Volume Information", "$Recycle.Bin", "$RECYCLE.BIN",
"root", "Default User"
};
static char[] backSlashDelimiter = new char[] { backSlash };
const char backSlash = '\\';
static IEnumerable<string> fromRoot() => Environment.GetLogicalDrives().Where(p => !p.isIgnored());
static IEnumerable<string> fromSysDrive() { yield return @"c:\"; }
static IEnumerable<string> fromTypical()
{
var path = $@"{Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)}\Mozilla Firefox";
yield return path;
int p;
if ((p=path.IndexOf(" (x86)")) >= 0)
yield return path = path.Remove(p, 6);
path = $@"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)}\Mozilla\Firefox\Profiles";
yield return path;
}
}
}
using System;
using System.Diagnostics;
using System.Linq;
namespace ff.links
{
static partial class Program
{
static void Main(string[] args)
{
var sw = new Stopwatch();
sw.Start();
"let's begin...".print();
var finds = fromTypical().scan();
"found targets is ".print(pfx, finds.Count().ToString());
//finds.print();
var bro = finds.Where(b => b.Contains(ffBinary));
"found browsers is ".print(pfx, bro.Count().ToString());
bro.print(pfx);
var cfg = finds.Where(b => b.Contains(fflConfig));
"found configs is ".print(pfx, cfg.Count().ToString());
cfg.print(pfx);
var profiles = finds.Where(b => (b.Contains(ffProfileSign) && !b.Contains(skipd)));
"found profiles is ".print(pfx, profiles.Count().ToString());
//profiles.print();
profiles.buildLinks(bro.First());
//profiles.prefsApplay();
//links2start();
sw.Stop();
var ts = sw.Elapsed;
$"RunTime {ts.Hours:00}:{ts.Minutes:00}:{ts.Seconds:00}.{ts.Milliseconds:000}".print();
//#if DEBUG
// "press any key to continue...".print();
// Console.ReadKey();
//#endif
}
const string pfx = " ::> ";
}
}
var finds = @"C:\".scan();
Функция Windows To Go удалена из операционных систем Windows 10 версии 2004 и более поздних версий. Этот компонент не поддерживает обновление компонентов и, следовательно, не позволяет сохранять актуальность версии. Кроме того, для него необходим определенный тип USB, который многие изготовители оборудования больше не поддерживают.