Open a command prompt and then run the following:
SFTMIME QUERY OBJ:APP /SHORT
IT999 2.3
TTEditor 7.1
Paris 3.7
SFTTRAY /EXE cmd.exe /LAUNCH "Paris 3.7"
This will launch the cmd.exe in the package.
Nice.
Tuesday, October 30, 2012
Wednesday, October 24, 2012
Creating a batch file that accepts parameters
We are App-V'ing a bunch of our applications and one of the applications requires a different .ini file depending if it's test, production or training. To get around creating 3 different packages with just a single file, I've written a pre-launch batch file that will auto-create the .ini depending on the parameters passed to it.
:===========================================================================================
: Paris Pre-launch script for App-V
: By Trentent Tye
: 2012-10-24
:
:
: This command file will take numerous parameters for launching the specific type
: of Paris application. It will autogenerate an INI file that Paris uses on
: launch to self configure. If no parameter is passed, it's assumed to be
: commented out in the INI file.
:
: This file should be launched like so:
: paris.cmd PARA request=0 hostname=nice servergroup=development_3861
:
: it will automatically find the variable without an equal sign and assume
: that it is the alias. Everything else gets matched up to the [Host]
: section of the .ini
:1) Pull string off the command line
:2) filter out " and '
:3) break each set out by spaces
:4) save to temp file
:5) iterate through temp file (for) and create variables.
@ECHO OFF
ECHO Launching Paris
SET PARAMS=%*
:NOTE: We are replacing quotations with whitespace characters! Ensure there is no
:whitespace in the parameters, but whitespace *between* parameters.
call set PARAMS=%%PARAMS:"= %%
call set PARAMS=%%PARAMS:'= %%
ECHO %PARAMS%
:Break each set of parameters into it's own set seperated by the equals sign.
:If there is no parameter stored we "breakout"
for /f "tokens=1-26 delims= " %%A IN ("%PARAMS%") DO (
IF '%%A' EQU '' GOTO BREAKOUT
ECHO %%A > "%TEMP%\variables.txt"
IF '%%B' EQU '' GOTO BREAKOUT
ECHO %%B >> "%TEMP%\variables.txt"
IF '%%C' EQU '' GOTO BREAKOUT
ECHO %%C >> "%TEMP%\variables.txt"
IF '%%D' EQU '' GOTO BREAKOUT
ECHO %%D >> "%TEMP%\variables.txt"
IF '%%E' EQU '' GOTO BREAKOUT
ECHO %%E >> "%TEMP%\variables.txt"
IF '%%F' EQU '' GOTO BREAKOUT
ECHO %%F >> "%TEMP%\variables.txt"
IF '%%G' EQU '' GOTO BREAKOUT
ECHO %%G >> "%TEMP%\variables.txt"
IF '%%H' EQU '' GOTO BREAKOUT
ECHO %%H >> "%TEMP%\variables.txt"
IF '%%I' EQU '' GOTO BREAKOUT
ECHO %%I >> "%TEMP%\variables.txt"
IF '%%J' EQU '' GOTO BREAKOUT
ECHO %%J >> "%TEMP%\variables.txt"
IF '%%K' EQU '' GOTO BREAKOUT
ECHO %%K >> "%TEMP%\variables.txt"
IF '%%L' EQU '' GOTO BREAKOUT
ECHO %%L >> "%TEMP%\variables.txt"
)
:BREAKOUT
:Now we iterate through the temp file and auto-create the Paris.ini
for /f "tokens=1-2 delims==" %%A IN ('TYPE "%TEMP%\variables.txt"') DO (
IF /I '%%A' EQU 'REQUEST' set REQUEST=%%B
IF /I '%%A' EQU 'OBJECTNAME' set OBJECTNAME=%%B
IF /I '%%A' EQU 'HOSTNAME' set HOSTNAME=%%B
IF /I '%%A' EQU 'REQUESTBROKER' set REQUESTBROKER=%%B
IF /I '%%A' EQU 'RequestBrokerBackup' set RequestBrokerBackup=%%B
IF /I '%%A' EQU 'ServerGroup' set ServerGroup=%%B
IF /I '%%B' EQU '' set ALIAS=%%A
)
:Now that we have all the parameters for the ini file we can create it.
SET PARISPATH="%TEMP%\paris.ini"
ECHO [PreLogin] >"%PARISPATH%"
ECHO ClientDLL=STAPPClientLogin >>"%PARISPATH%"
ECHO FunctionName=DoLogin >>"%PARISPATH%"
ECHO ServerDLL=STServerLogin >>"%PARISPATH%"
ECHO DataModule=Login >>"%PARISPATH%"
ECHO. >>"%PARISPATH%"
ECHO [PostLogin] >>"%PARISPATH%"
ECHO ServerDLL=STSRVLogin >>"%PARISPATH%"
ECHO DataModule=Login >>"%PARISPATH%"
ECHO. >>"%PARISPATH%"
ECHO [Timer] >>"%PARISPATH%"
ECHO Enabled=0 >>"%PARISPATH%"
ECHO Interval=10000 >>"%PARISPATH%"
ECHO. >>"%PARISPATH%"
ECHO [Host] >>"%PARISPATH%"
if /I "%REQUEST%" EQU "" ECHO #Request=0 >>"%PARISPATH%"
if /I "%REQUEST%" NEQ "" ECHO Request=%REQUEST% >>"%PARISPATH%"
if /I "%OBJECTNAME%" EQU "" ECHO #objectname=I4AppServer >>"%PARISPATH%"
if /I "%OBJECTNAME%" NEQ "" ECHO objectname=%OBJECTNAME% >>"%PARISPATH%"
if /I "%HOSTNAME%" EQU "" ECHO #hostname=AComputerName >>"%PARISPATH%"
if /I "%HOSTNAME%" NEQ "" ECHO hostname=%HOSTNAME% >>"%PARISPATH%"
if /I "%REQUESTBROKER%" EQU "" ECHO #RequestBroker=AComputerName >>"%PARISPATH%"
if /I "%REQUESTBROKER%" NEQ "" ECHO RequestBroker=%REQUESTBROKER% >>"%PARISPATH%"
if /I "%RequestBrokerBackup%" EQU "" ECHO #RequestBrokerBackup=AnotherComputerName >>"%PARISPATH%"
if /I "%RequestBrokerBackup%" NEQ "" ECHO RequestBrokerBackup=%RequestBrokerBackup% >>"%PARISPATH%"
if /I "%ServerGroup%" EQU "" ECHO #ServerGroup=AnotherComputerName >>"%PARISPATH%"
if /I "%ServerGroup%" NEQ "" ECHO ServerGroup=%ServerGroup% >>"%PARISPATH%"
ECHO. >>"%PARISPATH%"
ECHO [Settings] >>"%PARISPATH%"
ECHO MaxLookup=200 >>"%PARISPATH%"
ECHO NotifyInterval=30000 >>"%PARISPATH%"
ECHO #Interval between refresh of InBox screen (1second=1000) >>"%PARISPATH%"
ECHO Helpfile=paris1.chm >>"%PARISPATH%"
:ADD COPY COMMAND
:ADD LAUNCH COMMAND
:copy /y "%PARISPATH%" "B:\In4tek_Paris_37_MNT\Paris\bin\STAPPParisShellDCOM.INI"
ECHO "B:\In4tek_Paris_37_MNT\Paris\bin\STAPPParisShellDCOM.exe -alias %ALIAS%
type "%PARISPATH%"
Thursday, September 13, 2012
ESXi 5.1 on MacBook 4,1
Well... I got ESXi 5.0 installed on the MacBook but I was unable to get Mountain Lion to work. VMWare just came out with ESXi 5.1 which supports Mountain Lion so I attempted to install ESXi 5.1 on a USB key and get it up and running on my MacBook. 5.1 was a little different from 5.0 as the installerhelper.sh appears to operate differently...? Anyways, what I had to do was slipstream the sky2 driver into the ESXi 5.1 image, boot into "ESXi 'No Network Adapters Found'" then Fn-Option-F1 into the console. I then typed the following commands:
vmkload_mod sky2
esxcfg-init -n
vmkload_mod lvmdriver
install
Without the lvmdriver the install would not see the storage (USB or HDD)
I am now installing ESXi 5.1 onto my MacBook. Hopefully, I'll be able to run Mountain Lion from it :)
vmkload_mod sky2
esxcfg-init -n
vmkload_mod lvmdriver
install
Without the lvmdriver the install would not see the storage (USB or HDD)
I am now installing ESXi 5.1 onto my MacBook. Hopefully, I'll be able to run Mountain Lion from it :)
Tuesday, September 04, 2012
ESXi 5 on older MacBook 4,1
I'm looking to get my MacBook 4,1 under a little more utilization and I thought playing with VMWare's ESXi-5 on it would be interesting. As well, I'm hoping that I'll be able to install a virtualized Mountain Lion in there (unsupported natively on this MacBook). My first attempt at installing ESXi 5U1 was a miserable disaster. ESXi won't let you complete the installation process without a NIC. This triggered a search to find what NIC was in my MacBook (Marvell Yukon 88E8055 VEN_11AB&DEV_436A) and a requirement to get it working.
I found this thread:
http://www.vm-help.com/forum/viewtopic.php?f=25&t=3558&start=10
It got me started on the path I needed to enable the drivers for my MacBook. I found that the Marvell driver is already included but it is only enabled for two device ID's and neither were the same as my macbook's; but they were from the same family.
http://www.vm-help.com/esx41/sky2_driver.php
I later found that the driver supports my device ID but you need to edit a text file in the VMWare driver files to enable it. This will not work though, because VMWare signs their files and if there is a mismatch it will error out (unable to boot or corrupt image or some such). To get around this we need to inject the driver into the ESXi installer.
In order to do this I needed to understand how to make a driver injectable. It appears whatever you make will overwrite files during the unpacking process when ESXi is booting. I was able to "sort-of" confirm this by packing up the sky2 driver and including my Device ID in the ESXi driver ID file. When I packed up the sky2 binary driver in addition to the text files the install would error out. Since it's redundant to include the driver as well, I just tried including the driver text file that enables the deviceID. This file could be located here:
"\etc\vmware\driver.map.d\sky2.map"
To also make this more complicated I did everything on Windows and had to install UnxUtils and UnxUpdates and some Cygwin tools to do the archiving/unarchiving.
By editing sky2.map I could add my device ID:
regtype=linux,bus=pci,id=11ab:4354 0000:0000,driver=sky2,class=network
regtype=linux,bus=pci,id=11ab:4362 0000:0000,driver=sky2,class=network
regtype=linux,bus=pci,id=11ab:436A 0000:0000,driver=sky2,class=network
I compressed the file into a .tgz (bsdtar -cvzf sky2.tgz "etc") and then used ESXi Customizer 2.7 to inject it into a generic ESXi 5.0U1 image. I then used Linux Live USB Creator to move the ISO to a USB key that was made bootable.
I could now boot my MacBook4,1 off the USB key. At least, it worked to a point. I got to a stage where I was notified that I had no Network Adapters Found. At this point I dropped into the ESXi console (Fn-Option-F1), logged in to root and ran the following commands:
vmkload_mod sky2
#loads the sky2 driver
lspci -p
#confirms sky2 driver is loaded for 436A DEV ID
esxcfg-init -n
#initializes network for default settings
installerhelper.sh
#preps install command
install
The install command kicked me out to the default console where I was sitting at the "Network Adapters Not Found" screen. Simply Fn-Option-F1 to return to the console and run through the install prompts. Choose the same USB key you used earlier (or choose a new one if you prefer) and do the install. Once it's complete; restart onto the USB key. You should go into a full ESXi install but the network (for me anyways) was still no working correctly. I had to enable the console through the "GUI" of the text screen, drop into the console and run vmkload_mod sky2 and I had network again and was up and running. Once I can figure out how to automatically run that command I will come back and update this post. But for now I have ESXi working on a old MacBook and hopefully I'll be able to install Mountain Lion on this old workstation :)
I found this thread:
http://www.vm-help.com/forum/viewtopic.php?f=25&t=3558&start=10
It got me started on the path I needed to enable the drivers for my MacBook. I found that the Marvell driver is already included but it is only enabled for two device ID's and neither were the same as my macbook's; but they were from the same family.
http://www.vm-help.com/esx41/sky2_driver.php
I later found that the driver supports my device ID but you need to edit a text file in the VMWare driver files to enable it. This will not work though, because VMWare signs their files and if there is a mismatch it will error out (unable to boot or corrupt image or some such). To get around this we need to inject the driver into the ESXi installer.
In order to do this I needed to understand how to make a driver injectable. It appears whatever you make will overwrite files during the unpacking process when ESXi is booting. I was able to "sort-of" confirm this by packing up the sky2 driver and including my Device ID in the ESXi driver ID file. When I packed up the sky2 binary driver in addition to the text files the install would error out. Since it's redundant to include the driver as well, I just tried including the driver text file that enables the deviceID. This file could be located here:
"\etc\vmware\driver.map.d\sky2.map"
To also make this more complicated I did everything on Windows and had to install UnxUtils and UnxUpdates and some Cygwin tools to do the archiving/unarchiving.
By editing sky2.map I could add my device ID:
regtype=linux,bus=pci,id=11ab:4354 0000:0000,driver=sky2,class=network
regtype=linux,bus=pci,id=11ab:4362 0000:0000,driver=sky2,class=network
regtype=linux,bus=pci,id=11ab:436A 0000:0000,driver=sky2,class=network
I compressed the file into a .tgz (bsdtar -cvzf sky2.tgz "etc") and then used ESXi Customizer 2.7 to inject it into a generic ESXi 5.0U1 image. I then used Linux Live USB Creator to move the ISO to a USB key that was made bootable.
I could now boot my MacBook4,1 off the USB key. At least, it worked to a point. I got to a stage where I was notified that I had no Network Adapters Found. At this point I dropped into the ESXi console (Fn-Option-F1), logged in to root and ran the following commands:
vmkload_mod sky2
#loads the sky2 driver
lspci -p
#confirms sky2 driver is loaded for 436A DEV ID
esxcfg-init -n
#initializes network for default settings
installerhelper.sh
#preps install command
install
The install command kicked me out to the default console where I was sitting at the "Network Adapters Not Found" screen. Simply Fn-Option-F1 to return to the console and run through the install prompts. Choose the same USB key you used earlier (or choose a new one if you prefer) and do the install. Once it's complete; restart onto the USB key. You should go into a full ESXi install but the network (for me anyways) was still no working correctly. I had to enable the console through the "GUI" of the text screen, drop into the console and run vmkload_mod sky2 and I had network again and was up and running. Once I can figure out how to automatically run that command I will come back and update this post. But for now I have ESXi working on a old MacBook and hopefully I'll be able to install Mountain Lion on this old workstation :)
Monday, July 09, 2012
Enable RemoteApp on Server 2008/Windows 7
We have two Citrix farms, a XenApp 5 farm and a XenApp 6 farm. XenApp 6 only supports 64bit OS's.
Step 1
Run regedit (registry editor) and locate the key TsAppAllowList
a) New Key, Applications.
b) Under Applications, create New Key, 1234567 (the key name is not important, we just need any key for next two steps)
c) In the new key, Create New -> String Value, Name. Set value to Notepad
d) Also in the new key, Create New -> String Value, Path. Set to c:\windows\system32\Notepad.exe
b) Under Applications, create New Key, 1234567 (the key name is not important, we just need any key for next two steps)
c) In the new key, Create New -> String Value, Name. Set value to Notepad
d) Also in the new key, Create New -> String Value, Path. Set to c:\windows\system32\Notepad.exe
a) Edit fDisableAllowList value, and set to 1
Step 2 – Creating the RDP file to access the RemoteApp
Now the guest operating system has a RemoteApp created we need to use a Remote Desktop Connection to access that application.
1. Run remote desktop connection, setup your desired settings as you would in a normal connection
2. Save the settings to an RDP file.
3) Use Notepad to open the RDP file to edit the configuration file,
a) Modify the setting; remoteapplicationmode:i:0 to remoteapplicationmode:i:1
b) Add the setting; remoteapplicationprogram:s:Notepad
c) Add the setting; disableremoteappcapscheck:i:1
d) Add the setting; alternate shell:s:rdpinit.exe
e) Save the RDP file
Final thought
Similar to VirtualBox seamless mode, you will not be able to move the floating guest application window between monitors, unless you save the RDP to use all monitors available. Either set this option prior to saving the RDP file, or edit the RDP setting multimon:i:1.
Subscribe to:
Posts (Atom)