Title: Message
Hi Rafal,
 
(Sorry for the double msg, accidentally sent the last one *sigh*) 
 
How are you calling this script? Given that the environment variables set only scope to the current DOS promt...
 
Cheers,
Mark.

Hello Everybody,

 

i have a Idea for a better Keys.bat with is use a .csv-File for the keys of Office and more

You can enter more Keys for one Product, it will use the computername to select the right key.

 

keys.bat

:: You need the Keys.csv where you can input the keys for the Software like Office, Visual Studio, Nero ...

:: Every Key can be bind to a computername or set as Default.

:: The keys.csv looks like this

:: "COMPUTERNAME","SOFTWARE","PRODUKT KEY"

:: for Default Keys it's looks like that

:: "$Default","SOFTWARE","PRODUKT KEY"

 

@ECHO OFF

 

FOR /F "eol=# tokens=1,2,3* delims=," %%i IN (%Z%\site\keys.csv) DO (

if $Default==%%~i (set %%~j=%%~k)

)

 

FOR /F "eol=# tokens=1,2,3* delims=," %%i IN (%Z%\site\keys.csv) DO (

if %computername%==%%~i (set %%~j=%%~k)

)

 

 

keys.csv

"$Default","office2k","xxxxxxx"

"$Default","officexp","xxxxxxx"

"$Default","office2k3","xxxxxxx"

"$Default","vs6","xxxxxxx"

"$Default","nero6","xxxxxxx"

"AMD2400","office2k3","AAAAABBBBBCCCCCDDDDDEEEEE"

"AMD2400","nero6","AAAA-BBBB-CCCC-DDDD-EEEE-FFFF"

 

Bye

  Rafal Welk 



--

This e-mail message may contain confidential or privileged information.

Recipients are requested to preserve this confidentiality and to advise

the sender immediately of any error in transmission.


Any views/opinions expressed in this email are that of the author and

may not reflect the views of Salamis Group - www.salamis.com


Reply via email to