25 July 2014

MSI Error 1325: is not a valid short file name

This error in my case was being caused because the MSI was being executed through SCCM. The MSI file had to be executed locally and not from a network source. It would install with no issues if you double-clicked on the MSI. It only happened when SCCM tried to install it. During my troubleshooting, I tried a few different alternatives:

  • I use a PowerShell script to install the package. I thought it could be causing the issue, so I created a new SCCM package that only executed the MSI with the following command line, but the error persisted: msiexec.exe /I iDocID_for_32bit_Office.msi /qb-
  • I created a GPO that installed the MSI

These options did not resolve the issue. I then decided that if the issue was because the MSI needs to execute locally, then why not use psexec? I created the following command line to incorporate into an SCCM program. It failed the first time I ran it. The second time was successful after I went back into the environment tab and ran it with user rights. Basically this executes the package on the local machine under the user profile of the logged on user but runs the installer with the SCCM admin account. This resolved my issue.


\\    <network share>\psexec.exe \\%computername% -accepteula -u <username> -p <password> cmd.exe /c "echo . | powershell.exe -executionpolicy bypass -file <network share>\install.ps1"

07 July 2014

Adjust Screen Resolution during Build

Sometimes the screen resolution in a build does not set to the maximum. Resolution can be set with PowerShell, but the scripting requirements and complexity is too much, IMO. AutoIT offers an easy way to automate this process. I have written this script to do just that. There is documentation within the script. You will need to have the AutoIT compiler for this. Here is the link to download it.


 #Region ;**** Directives created by AutoIt3Wrapper_GUI ****  
 #AutoIt3Wrapper_Outfile=install.exe  
 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****  
 ; Open Screen Resolution  
 Run( "control desk.cpl" )  
 Sleep( 2000 )  
 ; Tab to Resolution  
 Send( "{TAB}" )  
 Sleep( 250 )  
 Send( "{TAB}" )  
 Sleep( 250 )  
 ; Open Resolution Drop Down  
 Send( "{Enter}" )  
 Sleep( 250 )  
 ; Move Resolution Up to max. You may need to add more up arrows.  
 Send( "{UP}" )  
 Sleep( 250 )  
 Send( "{UP}" )  
 Sleep( 250 )  
 Send( "{UP}" )  
 Sleep( 250 )  
 Send( "{UP}" )  
 Sleep( 250 )  
 Send( "{UP}" )  
 Sleep( 250 )  
 Send( "{UP}" )  
 Sleep( 250 )  
 Send( "{UP}" )  
 Sleep( 250 )  
 Send( "{UP}" )  
 Sleep( 250 )  
 Send( "{UP}" )  
 Sleep( 250 )  
 Send( "{UP}" )  
 Sleep( 250 )  
 ; Accept resolution  
 Send( "{Enter}" )  
 Sleep( 250 )  
 ; Move to OK button  
 Send( "{TAB}" )  
 Sleep( 250 )  
 Send( "{TAB}" )  
 Sleep( 250 )  
 Send( "{TAB}" )  
 Sleep( 250 )  
 Send( "{TAB}" )  
 Sleep( 250 )  
 Send( "{TAB}" )  
 Sleep( 250 )  
 ; Apply New Resolution  
 Send( "{Enter}" )  
 Sleep( 5000 )  
 ; Accept New Resolution  
 Send( "k" )