/build/static/layout/Breadcrumb_cap_w.png

Help setting up a bat/batch script.

I need some help setting up a script for writing a text to a specific file.

I want this text:
<?xml version="1.0" encoding="UTF-8" ?>
- <AdobeUpdater>
<LastDateCheck>2005-05-13</LastDateCheck>
<AutoCheck>0</AutoCheck>
<DownloadDir>C:\Program Files\Adobe\Updater</DownloadDir>
<ShowNewProducts>0</ShowNewProducts>
<AutoCheckType>0</AutoCheckType>
- <ApplicationsEnabled>
<MapPrefEntry MapPrefKey="bridge1">0</MapPrefEntry>
<MapPrefEntry MapPrefKey="creativesuite2-en_US">0</MapPrefEntry>
<MapPrefEntry MapPrefKey="golive8-en_US-LIC">0</MapPrefEntry>
<MapPrefEntry MapPrefKey="helpcenter1">0</MapPrefEntry>
<MapPrefEntry MapPrefKey="illustrator12-en_inatl-LIC">0</MapPrefEntry>
<MapPrefEntry MapPrefKey="indesign4-en_GB-NONDEBUG,LIC">0</MapPrefEntry>
<MapPrefEntry MapPrefKey="photoshop9-en_US-LIC">0</MapPrefEntry>
<MapPrefEntry MapPrefKey="stockphotos1">0</MapPrefEntry>
<MapPrefEntry MapPrefKey="versioncue2-en_US-CS">0</MapPrefEntry>
</ApplicationsEnabled>
</AdobeUpdater>

In this file:
%appdata%\Adobe\Updater\AdobeUpdaterPrefs.dat

This is a script wich is supposed to run on first login for users in AD.

Thanks in advance.

- Robert Hagen

0 Comments   [ + ] Show comments

Answers (3)

Posted by: AngelD 18 years ago
Red Belt
0
Why use a script when you just can copy the "new" file to the location through a logon script?
Posted by: WiseUser 18 years ago
Fourth Degree Brown Belt
0
Since this forum relates to MSI, here's an "MSI" answer...

1) Copy the file with a (per-machine) msi package - under the "AppDataFolder" directory.

2) Include an "HKCU" registry key (make one up) within the same component and make this key the "keypath" for the component.

3) Include an empty vbscript file within the same feature (maybe in the INSTALLDIR folder) with an advertised shortcut in the "StartUpFolder" directory.

Everytime a user logs on the advertised VBScript will run (it will do nothing because it's empty) but all components within the same feature will first be checked by the shell before it is executed. If the "HKCU" key is not there (first time), the component will be deemed "broken" and will therefore be repaired (including your file).

Remember that the original MSI source must be available at all times for this to work. Although there is a "trick" that can be used to avoid this (using a duplicate file).

It is even possible to remove the cancel button from the resulting repair progress dialog, or even to hide it altogether.
Posted by: babaloui 18 years ago
Yellow Belt
0
Okay i put together a little command to do it which i put in a cmd file.

The command is the following:
xcopy "\\server\share\AdobeUpdaterPrefs.dat" "%appdata%\Adobe\Updater\" /K /Y /R /Q

But the cmd file wich i have gpo loading on logon for users wont start...

Any ideas why it wont run the cmd file on logon?

- Robert
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ