FAQ: TIPS: WINDOWS: How to find all the process details for a particular executable using command line

wmic process where name=”cmd.exe” get executablepath,Com


 Caption CommandLine                   ExecutablePath
 cmd.exe "C:\Windows\system32\cmd.exe" C:\Windows\system32\cmd.exe
 cmd.exe "C:\Windows\system32\cmd.exe" C:\Windows\system32\cmd.exe
 cmd.exe "C:\Windows\system32\cmd.exe" C:\Windows\system32\cmd.exe

New MSI Interview Questions.

  1. How to add font files in an MSI package without using Wise Package Studio’s File Display Section.
  2. Difference between deferred & immediate custom action.
  3. What will you do if you can’t solve a issue in a package.
  4. How to add shortcuts to startup folder.
  5. Which applications should not be repackaged in MSI
  6. Which & why files are stored in C:\Windows\Installer
  7. What are the differences between patching, update & upgrade
  8. How to view to installation log files, which third party tools can be used for this task.
  9. Where can I find the schema of MSI file.
  10. How will you get the table details by using MSI SDK but not using ORCA.
  11. How can Network Shortcuts be added in an MSI Package.
  12. How to install certifications using MSI
  13. What are the advantages of admin install
  14. What condition on CA will allow to “Install” and “repair” but not at “uninstall”
  15. How to create nested MSI Installation
  16. How to create MST file from two MSI files.
  17. How to ensure that MSI gets installed only on WinXPSP3, win 7 and IE 8

updated MSI Questions. Ver.: Alpha 4

Hello all,

I have updated the MSI Interview Questions, the updated document can be downloaded from http://sourceforge.net/projects/mayadeploy/files/FAQ/FAQ%20on%20MSI%20packaging%20and%20repackaging_0.0_1Beta4.pdf/download.

Enjoy solving the last 3 questions.

As always the questions & answers might be wrong.

🙂 so please correct me if that is the case :).


Mayank Johri

Imaging WinXP using Knoppix

  1. Boot from knoppix
  2. Repartition your drive
    1. Base Partition – This is were your winXP is installed
    2. Image Partition – this is were your image of windows xp will be copied
  3. mount the  image partition: mount /dev/sda2 /media/img
  4. Use the command to create the img: ntfsclone -s -o /media/img/winxp.img /dev/sda1
  5. use the command to restore the img: ntfsclone  –restore-image -O /dev/sda1  /media/img/winxp.img
  6. Enjoy

Note: It is a good idea to have ext3 as filesystem for your image partition so that the image file is not deleted accidentally and also it overwrites the FAT32 2GB filesize limit.

Get the windows service state using Python

following code can be used to find if any service is installed and if so then return the state of the service.

import wmi

class servicePython():
    def __init__(self, serviceName):
        self.c = wmi.WMI ()
        self.serviceName = serviceName

    def setServiceName(self, serviceName):
        self.serviceName = serviceName

    def getStatus(self):    
        srv = c.Win32_Service (name=self.serviceName)
        if srv != []:
            return c.Status
        return False

Add Context Menu for a FileType


Windows Registry Editor Version 5.00
"Content Type"="application/softricity-osd"
@="\"C:Program Files\\AddTabsToOSD\\addTabsToOSD.exe\" \"%1\""

The above reg key will add UpdateOSD menu for .osd file type

Adding Network shortcuts in MSI packages


  1. Create a property eg. INSTDIR in Property table
  2. Populate it with the network directory
  3. Create a property eg SHORTCUT1 in Property table /* IF not using Wise
  4. Polulate it with the full UNC path along with the executable name  /* IF not using Wise.
  5. Create a shortcut using the shortcut under the shortcut table
  6. Update the WkDir coloum in Shorcut table with INSTDIR (no NOT add brakets [] before and after INSTDIR).