Error With Token Replacement In Embedded Script
[font="]As a simple explanation of this, the first line is JUST a comment. The second line, though it looks like a comment is actually interpreted by the Deployment Server as command to do the actual customization of the SYSPREP.INF file. The third line places the file on the system. The variables ARE case-sensitive, and you should use all caps for them.[/font] [font="]REM Token Replacement Task for Sysprep.inf http://www.symantec.com/connect/forums/replacetokens-does-not-work-when-run-script-file-option-used file[/font] [font="]REM Replacetokens .\temp\SYSPREP.TXT .\temp\%ID%.INF[/font] [font="]FIRM Copy F:\temp\%ID%.INF PROD:\sysprep\sysprep.inf[/font] Nick, Mar 13, 2005 #1 JeremyDallas SVS Scholar Thanks! Closing Thread JeremyDallas, Mar 17, 2005 #2 LarryDay New Member Replacetokens - not working: PAIN !! It looks simple in all the postings and Atiris white papers. BUt I can't get the turkey http://www.altirigos.com/forums/threads/token-replacement-for-ds-example.264/ to create the output file from the Replacetokens "command". Here is a copy of my environment, as I posted to Altiris forums...sorry about the repetition... ReplaceTokens not working (in Deploy Image using Sysprep) but returning a Zero return code. Can't find any documentation on syntax and how it works, either. Attempting to convert Image Deployment tasks from SIDgen to Sysprep, per Altiris' recommendation. Environment: RDP 1.6 Deployment Server Console 6.1.375 SP1 Hotfix-E Proliant Integration Module 1.6 RDP server: Windows 2003 Server (no Service Packs) all current security patches applied Server attempting to Deploy Image to: Windows 2003 Server, SP1 (...because SIDgen won't work on W2K3-SP1) Script: REM Token Replacement Task for Sysprep.inf REM ReplaceTokens .\Scripts\SYSPREP.TXT .\Temp\%ID%.INF FIRM Copy F:\temp\%ID%.INF PROD:sysprep\sysprep.inf Error Code returned: Zero I have read all the postings and the feedback from other users. I have read the recommended documents from Altiris: Using Sysprep with Altiris Deployment Solu
Sign in Pricing Blog Support Search GitHub This repository Watch 112 Star 1,298 Fork 430 schambers/fluentmigrator Code Issues 84 Pull requests 34 Projects 0 Wiki Pulse Graphs New issue Token https://github.com/schambers/fluentmigrator/issues/625 replacement for scripts #625 Open zendever opened this Issue Jul 9, 2015 · 8 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 2 participants zendever commented Jul 9, 2015 Not 100% sure the best approach here, or if there was some sort of mechanism for passing parameters to Execute.Script, but it would certainly be nice if scripts error with could be tokenized (maybe using $(token) or something, and then as an optional parameter, you could pass in a Dictionary that would replace token values. For data in scripts that may require the token format, they could be "escaped" by using something like $$((token)) which would set it back to what it would be in the data. I've already forked this and updated, so let me error with token know if you want a pull request. Collaborator tommarien commented Jul 9, 2015 @zendever Can you give me some clear use case explaining examples ? zendever commented Jul 9, 2015 It's mainly for simplicity...yes, you could embed all scripts into Execute.Sql statements, thus giving you access to config/build specific parameters, but it's much easier to model and then export database creation/alter scripts. Given property "Config" is the environment-specific app.config and "create.sql" looks something like: CREATE DATABASE [$(Catalog)] CONTAINMENT = NONE ON PRIMARY (NAME = N'$(Catalog)', FILENAME = N'$(FileGroupLocation)\$(Catalog).mdf', SIZE = 4096KB, MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB) LOG ON (NAME = N'$(Catalog)_log', FILENAME = N'$(FileGroupLocation)\$(Catalog)_log.ldf', SIZE = 1024KB, MAXSIZE = 2048GB, FILEGROWTH = 10%) GO ALTER DATABASE [$(Catalog)] SET COMPATIBILITY_LEVEL = 110 GO IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled')) BEGIN EXEC [$(Catalog)].[dbo].[sp_fulltext_database] @action = 'enable' END GO ALTER DATABASE [$(Catalog)] SET ANSI_NULL_DEFAULT OFF GO ALTER DATABASE [$(Catalog)] SET ANSI_NULLS OFF GO ... INSERT INTO dbo.tblTemplateData (SomeTemplateData) VALUES('Catalog = $$((Catalog))') ... Usage would be something like: Execute.Script("create.sql", new Dictionary