How to get wmic out put in inno setup - cpu

wmic cpu get ProcessorId
wmic diskdrive get model,serialnumber (This is giving all the hard disk serial, require only the OS installed hard disk serial)
Im trying to create a unique hw id for a system where my app is going to install. For that I have to get hard disk serial (Serial of hard disk where Windows is installed) and Processor ID

Related

Windows 10 Installation on a SSD error: " We couldn't create a new partition..."

I have an Acer Nitro 5 with a Gigabyte 512gb ssd and a WD 1TB hhd.
Recently after installing Ubuntu on my hdd (because i didn't want to change the sata mode), I also wanted a clean Windows install. So I created a boot usb from
media creation tool and go forward with it.
It didn't work. I got the "We couldn't create a new partition or locate an existing one" error, which i spent a significant amount of time trying to search for a solution.
Stuffs i tried:
- Format my ssd
- use diskpart to clean, convert my ssd partition table to gpt, etc like every guide online recommends.
- Make another boot usb, this time with rufus. Didn't work.
Stuffs I didn't try:
- Temporarily disconnect my hdd. I don't have the tools to do that physically, and my acer uefi has zero options regarding this, like most guides suggests.
- Change to bios-legacy boot mode. There's no option in the uefi.
I think it would be fine if i try to install windows on my hdd though, but haven't try it yet. All I know is installing windows on a ssd is much harder but didn't expect it to produce this much annoyance.
I heard there's an option to install on a HDD, the. use a third party tool to copy it to a SSD, but i haven't look into it.
Thanks for any help given..
Assuming you have Windows 10 installed and working on your SSD go to Settings > Update & Security > Recovery > Reset this PC > Get started and then select if you want your files kept you want clean reinstall. Again - from your post I assume the latter so just click Remove everything" confirm and wait. It will take (depending on the machine) 1-2 hours.
I've found this to be the easiest way to have clean install without wondering how do I get it installed on my laptop/pc.
My recommendation though - back up your ubuntu partition - I can't guarantee that windows installer won't clean up HDD you have (it's supposed to clean only SSD but better be safe than sorry).
Here's the link to detailed instructions. It's based on 1903 compilation - if your's older it will still look very similar.
If your windows isn't working then use diskpart to clean the drive, boot the computer from USB windows installation stick and choose the drive for your installation - it will/should create appropriate partitions and start installing.
If it won't change boot order so the SSD is first on the list and HDD next and repeat the previous step.

Running SAS 9.4 from a flash drive

I have downloaded the SAS 9.4 suite on a flash drive. However, I do not have enough space on my hard disk to install SAS on my laptop.
Is there a way I can run SAS from my flash drive, instead of installing it on my laptop?
Operating system : Windows 10
Sort of? I have an external drive I've formatted (SSD/Flash) with an entire OS on it including SAS.
So I have VMware installed on my computer and it accesses the image file stored on the flash drive/SSD to run. You may even be able to do this with SAS UE. But you can also just use Academics on Demand which is cloud-based, assuming it's non-commercial usage and for learning.
EDIT: It's on a (256GB) flash drive that I keep on my computer because I don't really use the SD slot for anything else. It has Windows 10 on it because my main machine is a MacBook.

Unable to install windows from usb flash, I get an error "setup was unable to create new system partition"

I have CD with window 7, I can install windows from this cd, but disc is't mine. So, I want to make a copy on my usb flash drive. I made iso copy of cd disc with WinISO, then I wrote this iso file on my flash drive with "Iso to Usb".
Now I try to install windows from this flash. I have 1tb hdd, I created 100gb partition and get 100gb partition, but when I did the same with with Windows cd disc, it creates 100 gb primary partition and 100 mb system partition.
So, when I tried to install windows in 100 gb partition from cd it installed, but when I tried to install from usb I got exception: "setup was unable to create new system partition".
Why so? Why I do the same steps and I can install from cd, but can't install from usb?
Why usb windows didn't create system partition? And how to fix it?
When installing using a flash-drive perform the following steps:
Step by step instruction:
When the boot setup starts from USB drive
Press Shift+F10
The command prompt will open.
In console type diskpart.exe and press enter. In this program execute following:
select disk=0. Disk 0 is your destination drive, so be careful, all information on this drive will be removed.
create partition primary size=xxx, where xxx – is the size of new partition
select partition=1
active
format fs=ntfs quick
assign
exit
4.exit
5.Now close the setup and restart.
This should solve your problem as it did mine.
Windows usually creates a partition with enought space for the system.
You can try to just take the 1tb HDD as target for installation, and windows will create a partition automatically.
Otherwise, your ISO-Copy may be corrupted.
You could easily download the ISO-Files from here.
Option: Make a Copy of the CD and try with that one?
Having installed windows 7 from a USB drive many times, I've found that if you're trying to install using a USB 3.0 flash drive, then you will get the "setup was unable to create new system partition" error message.
Since I couldn't find any solutions to this at the time, I was fiddling with everything to try to make it work. Eventually I found out an interesting (but strange) solution:
Go through the install process until you get to the screen that asks you to select a partition for the windows installation
Make sure your desired partition is listed, and that its formatted correctly
Unplug the USB drive
Press 'Refresh' (ONCE) to refresh the partition list/window (ONLY press refresh)
Plug the USB drive back in (use the same port as before)
Select the destination partition for the Windows installation, and try to begin the installation
I've done this a few times now on different machines, and it's worked like a charm.
I believe it has something to do with Windows 7 not natively supporting USB 3.0 and/or USB drives with SSD controllers.
Windows is probably seeing the USB drive as the main hard drive, because you have probably made it the first boot device in the BIOS. This will result in Windows trying to install to the install drive.
To solve this problem, make the internal HDD the first boot device, then press F12 or whatever key for boot device selection your BIOS requires.

Get CPU RAM HDD load from Windows registry

I Is it possible to get this values from windows registry:
Total CPU load and for each core
RAM utilization
HDD Utilization
Network upload and download speed
Number of services on the system.
I suppose that this information is stored somewhere in Windows registry.

Boot a native OS on a hard disk as a virtual machine

I'm searching for a solution to boot a native OS on a hard disk as a virtual machine.
It's like what VMware Fusion did on a Mac which boots Windows in Boot Camp as a virtual machine.
In detail, I have Windows installed on /dev/sda2 and Ubuntu 11.10 on /dev/sda5.
Is there anyway to use a virtual machine software to boot the Windows on /dev/sda2 as a virtual machine while I'm using Ubuntu?
Yes, I did this long ago following this guide:
https://lists.ubuntu.com/archives/ubuntu-us-nm/2008-February/000521.html
of course, always backup and be careful!
Essentially:
Used a USB 3.5 HD enclosure and connect the XP drive to it.
If the drive was shutdown uncleanly you may need to manually
mount it with the following command.
sudo mount ntfs-3g /dev/whereyourdriveis /mount/somemountpoint -o
force
Once the drive is mounted under linux contiunue to step 2.
Launch VMWare.
Go to File -> New -> New Virtual Machine.
Select "Custom"
Select Next
Select your operating system (i.e. Win XP)
Select Next
Give it a name like "WindowsXP"
Select Next
Specify processor One or Two
Select Next
Choose public or private (on a single-user machine this doesn't
matter)
Select Next
Select the memory to devote to the virtual machine. 512 MB is a
pretty useful number.
Select your network connection
Select Next.
Leave SCSI set to BusLogic
Select Next
Select Use Physical Disk
Select Next
Select Use Entire Drive
Select Next
Specify the place to save the VM
At this point you're done Select Power On to boot the Physical drive
in VMWare!
More Info: I should add, I have successfully done this, but I also had success using this method years even years before. So there are at least two known and tested ways for accomplishing this that I can tell you.
You can do this via VirtualBox raw disk access.
(http://www.virtualbox.org/manual/ch09.html)
It basically creates a "virtual" disk file that points to the actual partition and loads it as a disk drive in the VM. I've installed Linux guest in VB on Windows host in such a way, and the installation can boot from the VM or by itself.
As answered, this also can be done in VirtualBox, this is the way that works for me
Always, make sure that you are running as Administrator(Windows) or Sudo(Linux), any changes that you do will write to the REAL disk, so be carefull
In Windows
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands createrawvmdk -filename "E:\virtualbox\linuxhd.vmdk" -rawdisk "\\.\PhysicalDrive1"
RAW host disk access VMDK file E:\virtualbox\linuxhd.vmdk created successfully.
In Linux
$ VBoxManage internalcommands createrawvmdk -filename "~/linuxhd.vmdk" -rawdisk "/dev/sda"
It will create a file with something around 1kb that is a link to the physical hard drive.
Then create a Virtual Machine as ever you do.
If you want to map only a partition
At Windows
\\.\Physicaldrive1 -partitions 1
(Disk start with 0, partitions
with 1)
At Linux (Much more intuitive)
/dev/sda1
/dev/sda2
etc.
Eventually you can get resolution issues
Eventually you can get resolution issues even after install vboxadditions, in my experience the problem is your /etc/X11/xorg.conf it is configured to your specific real hardware specs(I have a offboard GPU for example), least in my case I solve it simply removing this file (xorg auto configure at boot, only will not work if you set some specific setting), so run:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.original && sudo rm /etc/X11/xorg.conf
Reference
http://www.virtualbox.org/manual/ch09.html#rawdisk
https://forums.virtualbox.org/viewtopic.php?f=6&t=36694
https://romaimperator.com/?p=29

Resources