Difference between revisions of "SCCM tips and info"

From WolfTech
Jump to navigation Jump to search
 
(33 intermediate revisions by the same user not shown)
Line 1: Line 1:
* Cache location
+
__NOTOC__
:32-bit - C:\Windows\System32\CCM\Cache
+
* Cache location - C:\Windows\ccmcache
:64-bit - C:\Windows\SYSWOW64\CCM\Cache
 
  
* Logs
+
* Logs - C:\Windows\CCM\Logs
:[http://technet.microsoft.com/en-us/library/bb892800.aspx| list of logs]
+
:[http://technet.microsoft.com/en-us/library/bb892800.aspx list of logs]
:32-bit - C:\Windows\System32\CCM\Logs
 
:64-bit - C:\Windows\SYSWOW64\CCM\Logs
 
  
 
* Clear Cache manually
 
* Clear Cache manually
Line 14: Line 11:
 
:Control Panel > System and Security > Configuration Manager > Actions Tab  
 
:Control Panel > System and Security > Configuration Manager > Actions Tab  
 
:Run "Machine Policy Retrieval and Evaluation Cycle"
 
:Run "Machine Policy Retrieval and Evaluation Cycle"
 +
 +
*Config file
 +
:C:\Windows\SMSCFG.ini
 +
:Deleting this file and letting computer re-create it can sometimes resolve issues (must restart after deleting)
 +
:Last resort before uninstalling client?
  
 
* Remove SCCM client
 
* Remove SCCM client
:32-bit - C:\Windows\System32\ccmsetup\ccmsetup.exe /uninstall
+
:C:\Windows\ccmsetup\ccmsetup.exe /uninstall
:64-bit - C:\Windows\ccmsetup\ccmsetup.exe /uninstall
 
  
 
* Troubleshooting
 
* Troubleshooting
:[http://blogs.technet.com/b/configmgrteam/archive/2010/01/14/troubleshooting-client-content-download-in-configuration-manager-2007.aspx| Client content downloading troubleshooting guide (sorta helpful)]
+
:[http://blogs.technet.com/b/configmgrteam/archive/2010/01/14/troubleshooting-client-content-download-in-configuration-manager-2007.aspx Client content downloading troubleshooting guide (sorta helpful)]
  
 
==== Silent Installs ====
 
==== Silent Installs ====
* Winzip Self-extractors: [filename].exe /auto <directory>
+
 
* MikTex:  [basic miktex installer].exe --shared --unattended
+
http://unattended.sourceforge.net/installers.php
* Texmaker: texmakerwin32_install.exe /S
+
 
* Ghostscript: gs902w32.exe /S
+
* Agilent ADS:  [ads installer].exe -f installer.properties
* COMSOL:  setup.exe -s [setupfile].ini
+
** 2011.05 doesn't install licensing tools, so have to install them separately. Told it should be fixed in next release in Dec.
** Version 4.2: Must copy com.comsol.resources_1.0.0.jar (created during install of software) to /plugins directory of install media.  Silent install fails without it.
+
** Fixed with 2011.10 release
 +
** Agilent ICCAP can be installed same way as ADS (need different response file, obviously)
 +
*** Seems like you can only run the newest ICCAP. Older versions can't get a license.
 +
* Ansoft apps:  setup.exe -s setup.iss
 +
** setup.exe -r to create response file.
 +
** Webupdate is currently broken, so have to manually apply updates. Updates require separate setup.iss files, but possible to re-use across multiple updates
 +
* BASIC Stamp - [installer].exe /s /v"/qb"
 
* Cadence:  setup.exe !quiet=silentinstall.ini
 
* Cadence:  setup.exe !quiet=silentinstall.ini
 +
** Need to set working directory to Disk1\ AND start command line as Disk1\setup.exe, otherwise will not find ini file
 
** Cadence hotfix:  [hotfixfile].exe -s setup.iss
 
** Cadence hotfix:  [hotfixfile].exe -s setup.iss
 
*** Use [hotfixfile].exe -r to create setup.iss response file  
 
*** Use [hotfixfile].exe -r to create setup.iss response file  
* Quartus II:
+
* CCS 3.3:
* Synopsys Saber:
+
** Modified setup.ini file to use /QB flag and TRANSFORMS flag (to put in C2400 files)
* Synopsys HSPICE:
+
* CCS 5: [ccs setup].exe /response-file [path to file]
* Agilent ADSads2011_XX_rXXX_windows.exe -f installer.properties
+
** /test  (fake install, does not copy any files)
** 2011.05 doesn't install licensing tools, so have to install them separatelyTold it should be fixed in next release in Dec.
+
** /save-response-file [path to file]
 +
** v5.2 - need firewall exception for C:\ti\ccsv5\eclipse\jre\bin\java.exe for silent install to work
 +
* COMSOLsetup.exe -s [setupfile].ini
 +
** Version 4.2: Must copy com.comsol.resources_1.0.0.jar (created during install of software) to /plugins directory of install media.  Silent install fails without it.  (Not necessary for v4.3)
 +
* CST Suite:  msiexec /qb /i "CST Studio Suite 20xx.msi" ADDLOCAL=CST_STUDIO_SERIES_Files,Examples
 +
** Also need to run Catia VC9 installer in <CST media>\Bin\.  x64 requires x64 Catia and x64 vcredist as well.
 +
** HKLM\Software\CST AG\CST DESIGN ENVIRONMENT\2012\ - LICENSESERVER = <licenseserver>
 +
** To autoupdate:  %programfiles%\Auto_Update_Control.exe updatefromdir:"<path to update file>"
 +
* Ghostscript:  [gs installer].exe /S
 +
*IrfanView: [irfanview setup].exe /silent /folder="%programfiles%\IrfanView" /group=1 /allusers=1 /ini="%APPDATA%\IrfanView"
 +
* Mathematica:  setup.exe /norestart /silent /suppressmsgboxes
 +
** Doesn't overwrite older versions.
 +
** Copy mathpass file manually to C:\ProgramData\Mathematica\Licensing\
 +
** Not sure if "/norestart" is necessary.
 +
* Microsoft Office 2013:
 +
** Does NOT install on Windows XP
 +
** Upgrades 2010 without issue, seems to require a logoff though
 +
** [http://technet.microsoft.com/en-us/library/cc178982(v=office.15).aspx Deploying Office 2013]
 +
** [http://technet.microsoft.com/en-us/library/ee460874(v=office.15).aspx Customizing Setup]
 +
** [http://technet.microsoft.com/en-us/library/dd630736(v=office.15).aspx Using the Office Customization Wizard]
 +
* MikTex:  [basic miktex installer].exe --shared --unattended
 +
* Modelsim:  (uses Mentor installer batch optionsemi-terrible)
 +
** [https://supportnet.mentor.com/portal?do=reference.technote&id=MG542770 Creating a batch file]
 +
*** You should technically be able to just run the batch file by itself, but seems like it only works if you've hardcoded paths to the installer into the file.  Since SCCM source paths can change, better to run the installer with the batch option.
 +
** install.exe -silent -batch [batchfile].bat < [answerfile].txt
 +
*** the answer file is just a text file with 'D' on one line and 'yes' on the second
 +
** install.exe -silent -batchremove [batchfile].bat
 +
* MPLAB:  msiexec.exe /qb /i [MPLAB Tools].msi
 +
** setup.exe doesn't seem to do anything other than call the msi.  And couldn't get the usual silent methods to work, so just running the msi install.
 +
* MPLAB X:  [MPLAB X installer].exe --mode unattended
 +
** Unattended is completely silent by default.  Add --unattendedmodeui minimal for a progress bar.
 +
** Has its own uninstaller in the program files dir, use --mode unattended for a silent uninstall
 
* OptiSystem:  '''should''' be setup.exe /SILENT, but doesn't work.  They've disabled the automated install.
 
* OptiSystem:  '''should''' be setup.exe /SILENT, but doesn't work.  They've disabled the automated install.
 
** Copy in edited hasplm.ini file to %programfiles%\common files\aladdin shared\hasp\ before installing.
 
** Copy in edited hasplm.ini file to %programfiles%\common files\aladdin shared\hasp\ before installing.
* Xilinx 13.xBatch install requires you to agree to two EULAs, the second one being massiveAn alternative is to copy the installed files to another machine and run a batch file to add in shortcuts.  I've used 7-zip to compress and archive the installed files (from 13GB to ~4)
+
* PLECS:  [plecs blockset installer].exe /extract ./ to extract MSI file, then msiexec /qb /i [plecs blockset].msi ALLUSERS=1 INSTALLDIR="%programfiles%\Plexim\Plecs Blockset <version> (<arch>)\"
 +
** Doesn't seem to be possible to silently install exe to program files. Might work when run as SYSTEM?
 +
* PSCADcan create response file for silent install, but always get prompt to input license server midway through
 +
** Also get prompts from Sentinel usbdriver install.  Can avoid it by running the Sentinel installer beforehand though.
 +
** Gave up and re-packaged
 +
* Quartus II: altera_installer_cmd.exe --source=./[downloads files dir] --target=C:\altera\[version] --install=quartus --exclude_quartus_64bit
 +
** MUST extract files from altera_installer.external.exe in order to get access to altera_installer_cmd.exe (or launch external installer, then cancel it and grab files from your %TEMP% dir)
 +
** Alternate: Can edit .setup_args to contain --source, --target, etc and then simply launch setup.exe.
 +
*** Still requires extracting files from the downloaded installer
 +
*** Unsure if .setup_args can be called  (UPDATE: Doesn't seem so).  If not, means would have to duplicate install files and have a modified .setup_args for x64
 +
** Installation directory CANNOT have spaces
 +
** Remove "--exclude_quartus_64bit" for 64bit installs
 +
* SIMetrix/SIMPLIS:  [installer].exe /s for 32bit, [x64 installer].exe /s /b"%TEMP%" for 64bit
 +
** Use [installer].exe /r to create setup.iss response file.  Need separate files for 32 and 64bit.
 +
** Wanted to use a MST with this installer like with TracePro, but doesn't work for some reason.  Brings up an error msg about "logging started", then installer stops after you click OK.  Running the msi with the mst works fine, but using the mst with the setup.exe doesn't.  No idea why.
 +
*** Figured out why.  Installer doesn't know where to find MST because it's not where the extracted MSI is.  No good way to get around it.  Tracepro installer is built better, I suppose?
 +
* Synopsys Saber: Saber_<version>_win.exe -f installer.properties
 +
** Installer can return either 0 or 1 for a success.  1 means succeeded but there was a warning.  Silent installs seem to exit with 1 most of the time.
 +
*** Patch installers seem to be the ones that flake out during silent installs.  Main installer is fine.
 +
** silent install doesn't seem to work for updates.  runs but makes no changes.
 +
* Texmaker:  texmakerwin32_install.exe /S
 +
* TracePro:  [tracepro installer].exe /s /v"/qn", for a completely silent install.  use /qb for progress bar
 +
** If using a MST file, need to use /v"/qn TRANSFORMS=[filename].mst"
 +
** License info is per-user.  Currently using a cmd script that is copied to Startup folder to copy in INI file to User's Appdata folder to setup licensing. (UPDATE: switched to using GPOs)
 +
** 64bit install issue resolved.  need /b"<path>" to specify where the installer should extract the MSI.  So 64bit is [tracepro installer x64].exe /s /b"%TEMP%" /v"/qn TRANSFORMS=[filename].mst"
 +
* Winzip Self-extractors:  [filename].exe /auto <directory>
 +
* Xilinx: bin\nt\batchxsetup.exe -batch ece.bat <eula.txt
 +
** Xilinx's batch install is horrendous garbage.
 +
*** "bin\nt\batchxsetup.exe" - necessary because you cannot cd to bin\nt and run it from there.  It will fail because it cannot find the idata dir that's in the root of the install files.  Your working dir must be the root.
 +
*** Use -samplebatchscript <batch_file_name> to create your batch file
 +
*** <eula.txt - This gets you past the idiotic EULAs.  eula.txt is nothing more than 5000 lines of 'y'.  It gets piped in by cmd.exe and advances and accepts the EULAs.  (Yes, it really has to be an insane number of lines.  Two few and it won't get past the EULA.)
 +
*** In order for all this to work, it has to be launched by cmd.exe.  So if going through SCCM, use cmd.exe /c bin\nt\batchxsetup.exe
 +
*** Finally, the installer tries to locate some image files near the end, but because of how it's done it's looking on C:\ instead of in the install filesHave to copy \idata\usenglish\idata\isebillboards\ to C:\ (full path and all)
 +
** Old method:  Copy the installed files to another machine and run a batch file to add in shortcuts.  I've used 7-zip to compress and archive the installed files (from 13GB to ~4)
 
** 7z.exe x [Xilinx archive] -o%SYSTEMDRIVE%
 
** 7z.exe x [Xilinx archive] -o%SYSTEMDRIVE%
** Then run shortcutsSetup.bat in the bin folder
+
** Then run shortcutsSetup.bat in the bin folder (UPDATE: this batch file no longer seems to work)
* CST Suite: msiexec /qb /i "CST Studio Suite 20xx.msi" ADDLOCAL=CST_STUDIO_SERIES_Files,Examples
+
 
** x64 also requires: <CST 20xx DVD Image>\Bin\vcredist_x64.exe /Q
+
====Powershell====
** To autoupdate: %programfiles%\Auto_Update_Control.exe updatefromdir:"<path to update file>"
+
 
 +
* Operators
 +
: -eq (equals)
 +
: -ne (does not equal)
 +
: -like (can use wildcards with this)
 +
 
 +
* Start-Process -File <path to file> -ArgumentList "<all arguments>" -wait
 +
 
 +
* $LastExitCode - exit code of last run program
 +
** Doesn't really work if you run the program using Start-Process. Never gets updated, so is either null or last previous value.
 +
 
 +
* Sets $var to be the path where your script is being run from
 +
:$Invocation = (Get-Variable MyInvocation -Scope 0).Value<br>
 +
:$var = Split-Path $Invocation.MyCommand.Path
 +
 
 +
* Sets var to the version number of the running OS. Can use to check for XP or Vista/7 (hm, what about server...?)
 +
** XP is 5.1.xxxx, Vista is 6.0.xxxx, 7 is 6.1.xxxx, 8 is 6.2.xxxx
 +
:$var = (Get-WmiObject -Class win32_OperatingSystem).Version<br>
 +
:if ($var -like "6.*")<br>
 +
:if ($var -like "5.1.*")
 +
 
 +
* creates “myY” of category “User”, and set the value to “"la la"”
 +
:[Environment]::SetEnvironmentVariable("myY", "la la", "User")
 +
 
 +
* example of adding a path to PATH
 +
:[System.Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";C:\Program Files (x86)\PHP", "Machine")
 +
 
 +
====VBScript====
 +
 
 +
* Notification Prompt - Waits for input
 +
Set objArgs = WScript.Arguments<br>
 +
messageText = objArgs(0)<br>
 +
MsgBox messageText,64,"WolfTech Self-Service"
 +
 
 +
* Timed notification prompt, quits after input or after 60 seconds
 +
Set objShell = CreateObject("Wscript.Shell")<br>
 +
Set objArgs = WScript.Arguments
 +
 
 +
messageText = objArgs(0)<br>
 +
intReturn = objShell.Popup(messageText, 60, "WolfTech Self-Service", 0 + 64)
 +
 
 +
Wscript.Quit 0
 +
 
 +
====AutoIT bits====
 +
 
 +
* Setting SYSTEM env variable
 +
$result = RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "SYSTEM_TEST_VAR", "REG_SZ", "Test")<br>
 +
If $result = 1 Then<br>
 +
: EnvUpdate()<br>
 +
EndIf
  
====Advertisements and Task Sequences====
+
====Other====
* TS: Install Multiple Applications option
 
** Define Task Sequence Variables for each application to install
 
** Variable names must be in format XXX001, XXX002, XXX003 etc, where XXX is the base name (no known restriction on base name)
 
** Define variables first, then add "Install Software" step, choose option to install multiple applications, and input the base name of the TSVs
 
** ''Unconfirmed'': Only works if TS advertisement is set to access content directly from the DP
 
  
* TS: Using multiple "Install Software" steps to install multiple applications in one TS
+
* Disabling file redirection in 64bit windows?
** Appears to mis-report required disk space if installing multiple programs from the same package
+
http://msdn.microsoft.com/en-us/library/aa365743(v=vs.85).aspx

Latest revision as of 13:08, 26 August 2014

  • Cache location - C:\Windows\ccmcache
  • Logs - C:\Windows\CCM\Logs
list of logs
  • Clear Cache manually
Control Panel > System and Security > Configuration Manager > Advanced Tab
  • Update machine policy manually
Control Panel > System and Security > Configuration Manager > Actions Tab
Run "Machine Policy Retrieval and Evaluation Cycle"
  • Config file
C:\Windows\SMSCFG.ini
Deleting this file and letting computer re-create it can sometimes resolve issues (must restart after deleting)
Last resort before uninstalling client?
  • Remove SCCM client
C:\Windows\ccmsetup\ccmsetup.exe /uninstall
  • Troubleshooting
Client content downloading troubleshooting guide (sorta helpful)

Silent Installs

http://unattended.sourceforge.net/installers.php

  • Agilent ADS: [ads installer].exe -f installer.properties
    • 2011.05 doesn't install licensing tools, so have to install them separately. Told it should be fixed in next release in Dec.
    • Fixed with 2011.10 release
    • Agilent ICCAP can be installed same way as ADS (need different response file, obviously)
      • Seems like you can only run the newest ICCAP. Older versions can't get a license.
  • Ansoft apps: setup.exe -s setup.iss
    • setup.exe -r to create response file.
    • Webupdate is currently broken, so have to manually apply updates. Updates require separate setup.iss files, but possible to re-use across multiple updates
  • BASIC Stamp - [installer].exe /s /v"/qb"
  • Cadence: setup.exe !quiet=silentinstall.ini
    • Need to set working directory to Disk1\ AND start command line as Disk1\setup.exe, otherwise will not find ini file
    • Cadence hotfix: [hotfixfile].exe -s setup.iss
      • Use [hotfixfile].exe -r to create setup.iss response file
  • CCS 3.3:
    • Modified setup.ini file to use /QB flag and TRANSFORMS flag (to put in C2400 files)
  • CCS 5: [ccs setup].exe /response-file [path to file]
    • /test (fake install, does not copy any files)
    • /save-response-file [path to file]
    • v5.2 - need firewall exception for C:\ti\ccsv5\eclipse\jre\bin\java.exe for silent install to work
  • COMSOL: setup.exe -s [setupfile].ini
    • Version 4.2: Must copy com.comsol.resources_1.0.0.jar (created during install of software) to /plugins directory of install media. Silent install fails without it. (Not necessary for v4.3)
  • CST Suite: msiexec /qb /i "CST Studio Suite 20xx.msi" ADDLOCAL=CST_STUDIO_SERIES_Files,Examples
    • Also need to run Catia VC9 installer in <CST media>\Bin\. x64 requires x64 Catia and x64 vcredist as well.
    • HKLM\Software\CST AG\CST DESIGN ENVIRONMENT\2012\ - LICENSESERVER = <licenseserver>
    • To autoupdate: %programfiles%\Auto_Update_Control.exe updatefromdir:"<path to update file>"
  • Ghostscript: [gs installer].exe /S
  • IrfanView: [irfanview setup].exe /silent /folder="%programfiles%\IrfanView" /group=1 /allusers=1 /ini="%APPDATA%\IrfanView"
  • Mathematica: setup.exe /norestart /silent /suppressmsgboxes
    • Doesn't overwrite older versions.
    • Copy mathpass file manually to C:\ProgramData\Mathematica\Licensing\
    • Not sure if "/norestart" is necessary.
  • Microsoft Office 2013:
  • MikTex: [basic miktex installer].exe --shared --unattended
  • Modelsim: (uses Mentor installer batch option. semi-terrible)
    • Creating a batch file
      • You should technically be able to just run the batch file by itself, but seems like it only works if you've hardcoded paths to the installer into the file. Since SCCM source paths can change, better to run the installer with the batch option.
    • install.exe -silent -batch [batchfile].bat < [answerfile].txt
      • the answer file is just a text file with 'D' on one line and 'yes' on the second
    • install.exe -silent -batchremove [batchfile].bat
  • MPLAB: msiexec.exe /qb /i [MPLAB Tools].msi
    • setup.exe doesn't seem to do anything other than call the msi. And couldn't get the usual silent methods to work, so just running the msi install.
  • MPLAB X: [MPLAB X installer].exe --mode unattended
    • Unattended is completely silent by default. Add --unattendedmodeui minimal for a progress bar.
    • Has its own uninstaller in the program files dir, use --mode unattended for a silent uninstall
  • OptiSystem: should be setup.exe /SILENT, but doesn't work. They've disabled the automated install.
    • Copy in edited hasplm.ini file to %programfiles%\common files\aladdin shared\hasp\ before installing.
  • PLECS: [plecs blockset installer].exe /extract ./ to extract MSI file, then msiexec /qb /i [plecs blockset].msi ALLUSERS=1 INSTALLDIR="%programfiles%\Plexim\Plecs Blockset <version> (<arch>)\"
    • Doesn't seem to be possible to silently install exe to program files. Might work when run as SYSTEM?
  • PSCAD: can create response file for silent install, but always get prompt to input license server midway through
    • Also get prompts from Sentinel usbdriver install. Can avoid it by running the Sentinel installer beforehand though.
    • Gave up and re-packaged
  • Quartus II: altera_installer_cmd.exe --source=./[downloads files dir] --target=C:\altera\[version] --install=quartus --exclude_quartus_64bit
    • MUST extract files from altera_installer.external.exe in order to get access to altera_installer_cmd.exe (or launch external installer, then cancel it and grab files from your %TEMP% dir)
    • Alternate: Can edit .setup_args to contain --source, --target, etc and then simply launch setup.exe.
      • Still requires extracting files from the downloaded installer
      • Unsure if .setup_args can be called (UPDATE: Doesn't seem so). If not, means would have to duplicate install files and have a modified .setup_args for x64
    • Installation directory CANNOT have spaces
    • Remove "--exclude_quartus_64bit" for 64bit installs
  • SIMetrix/SIMPLIS: [installer].exe /s for 32bit, [x64 installer].exe /s /b"%TEMP%" for 64bit
    • Use [installer].exe /r to create setup.iss response file. Need separate files for 32 and 64bit.
    • Wanted to use a MST with this installer like with TracePro, but doesn't work for some reason. Brings up an error msg about "logging started", then installer stops after you click OK. Running the msi with the mst works fine, but using the mst with the setup.exe doesn't. No idea why.
      • Figured out why. Installer doesn't know where to find MST because it's not where the extracted MSI is. No good way to get around it. Tracepro installer is built better, I suppose?
  • Synopsys Saber: Saber_<version>_win.exe -f installer.properties
    • Installer can return either 0 or 1 for a success. 1 means succeeded but there was a warning. Silent installs seem to exit with 1 most of the time.
      • Patch installers seem to be the ones that flake out during silent installs. Main installer is fine.
    • silent install doesn't seem to work for updates. runs but makes no changes.
  • Texmaker: texmakerwin32_install.exe /S
  • TracePro: [tracepro installer].exe /s /v"/qn", for a completely silent install. use /qb for progress bar
    • If using a MST file, need to use /v"/qn TRANSFORMS=[filename].mst"
    • License info is per-user. Currently using a cmd script that is copied to Startup folder to copy in INI file to User's Appdata folder to setup licensing. (UPDATE: switched to using GPOs)
    • 64bit install issue resolved. need /b"<path>" to specify where the installer should extract the MSI. So 64bit is [tracepro installer x64].exe /s /b"%TEMP%" /v"/qn TRANSFORMS=[filename].mst"
  • Winzip Self-extractors: [filename].exe /auto <directory>
  • Xilinx: bin\nt\batchxsetup.exe -batch ece.bat <eula.txt
    • Xilinx's batch install is horrendous garbage.
      • "bin\nt\batchxsetup.exe" - necessary because you cannot cd to bin\nt and run it from there. It will fail because it cannot find the idata dir that's in the root of the install files. Your working dir must be the root.
      • Use -samplebatchscript <batch_file_name> to create your batch file
      • <eula.txt - This gets you past the idiotic EULAs. eula.txt is nothing more than 5000 lines of 'y'. It gets piped in by cmd.exe and advances and accepts the EULAs. (Yes, it really has to be an insane number of lines. Two few and it won't get past the EULA.)
      • In order for all this to work, it has to be launched by cmd.exe. So if going through SCCM, use cmd.exe /c bin\nt\batchxsetup.exe
      • Finally, the installer tries to locate some image files near the end, but because of how it's done it's looking on C:\ instead of in the install files. Have to copy \idata\usenglish\idata\isebillboards\ to C:\ (full path and all)
    • Old method: Copy the installed files to another machine and run a batch file to add in shortcuts. I've used 7-zip to compress and archive the installed files (from 13GB to ~4)
    • 7z.exe x [Xilinx archive] -o%SYSTEMDRIVE%
    • Then run shortcutsSetup.bat in the bin folder (UPDATE: this batch file no longer seems to work)

Powershell

  • Operators
-eq (equals)
-ne (does not equal)
-like (can use wildcards with this)
  • Start-Process -File <path to file> -ArgumentList "<all arguments>" -wait
  • $LastExitCode - exit code of last run program
    • Doesn't really work if you run the program using Start-Process. Never gets updated, so is either null or last previous value.
  • Sets $var to be the path where your script is being run from
$Invocation = (Get-Variable MyInvocation -Scope 0).Value
$var = Split-Path $Invocation.MyCommand.Path
  • Sets var to the version number of the running OS. Can use to check for XP or Vista/7 (hm, what about server...?)
    • XP is 5.1.xxxx, Vista is 6.0.xxxx, 7 is 6.1.xxxx, 8 is 6.2.xxxx
$var = (Get-WmiObject -Class win32_OperatingSystem).Version
if ($var -like "6.*")
if ($var -like "5.1.*")
  • creates “myY” of category “User”, and set the value to “"la la"”
[Environment]::SetEnvironmentVariable("myY", "la la", "User")
  • example of adding a path to PATH
[System.Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";C:\Program Files (x86)\PHP", "Machine")

VBScript

  • Notification Prompt - Waits for input

Set objArgs = WScript.Arguments
messageText = objArgs(0)
MsgBox messageText,64,"WolfTech Self-Service"

  • Timed notification prompt, quits after input or after 60 seconds

Set objShell = CreateObject("Wscript.Shell")
Set objArgs = WScript.Arguments

messageText = objArgs(0)
intReturn = objShell.Popup(messageText, 60, "WolfTech Self-Service", 0 + 64)

Wscript.Quit 0

AutoIT bits

  • Setting SYSTEM env variable

$result = RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "SYSTEM_TEST_VAR", "REG_SZ", "Test")
If $result = 1 Then

EnvUpdate()

EndIf

Other

  • Disabling file redirection in 64bit windows?

http://msdn.microsoft.com/en-us/library/aa365743(v=vs.85).aspx