Category Archives: Windows

Running a command with system account

The simplest way to run a command with a system account – for example testing the installation process of an installation script – is using PsExec.

Syntax:
PSEXEC -i -s cmd.exe

This will open a new Cmd-window as system.

C:\>whoami
nt authority\system

Advertisements

Return codes

When performing a silent install, catching the return code is useful for troubleshooting.

For a list of Return Codes (= Exit Codes / Windows System Error Codes), see below links from Microsoft and Symantec:

https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382%28v=vs.85%29.aspx

http://www.symantec.com/connect/articles/windows-system-error-codes-exit-codes-description

Overview of Windows Installer error codes (from Microsoft):

https://support.microsoft.com/en-us/kb/304888

Note that exit codes may be different.
Examples:

Return code for Office 2010 updates:

https://technet.microsoft.com/en-us/library/cc179058%28v=office.14%29.aspx

The installer of SAP GUI will generate different exit codes.  See link below:

http://wiki.scn.sap.com/wiki/display/Basis/SAP+GUI+Packaging+and+Installation

Uninstalling Linux with GRUB2 on dual-boot Linux-Windows 8.1

After some testing with Linux I figured I didn’t need it on this machine.  As a 128GB SSD is not that gigantic I wanted to reclaim the diskspace it used.
The configuration was pretty basic: 2 partitions for Windows 8.1 (350MB system reserved partition and a large Windows partition) and 2 partitions for Linux (swap and ext4).  Simply deleting the Linux partition rendered the system to an unbootable state.  After resizing the Windows partition again and reinstalling Linux the system booted again.

Some time later I continued my quest for disk space reclaiming.  Basically I used the procedure on techmesto.com.

To be a little more on the safe time now I removed GRUB2 first: I booted from my Windows 8.1 USB install disk.  When the first dialog came up (language selection) I pressed Shift-F10 to open a Cmd prompt.  I ran the “bootrec.exe /fixmbr” command and after reboot GRUB2 was indeed gone.

I deleted the Linux partitions with the Windows Disk Management.  Then I booted from a Linux Live USB disk and increased the Windows partition size again with GParted.