4
votes
2answers
596 views

Need to truncate the %username% variable in windows 7 to seven characters

I use a script that generates a session name for out AS400 sessions based on the system %username%, the problem is that if the username is over 7 characters long the connection will fail. The session ...
1
vote
1answer
250 views

Which linux environment varaiable gives the path to the users desktop?

It turns out that different languages can have a path to the desktop folder. ~/Desktop is ~/Työpöytä in Finnish What way via the shell can I get access to the translated folder?
1
vote
1answer
5k views

Set Permanent System variable through bat file

This is a follow-up to Set Permanent Environmental Variable in Windows XP. I want to change System variables in XP through running a bat file. But when I run it I get the error "Too many command-line ...
6
votes
1answer
12k views

Set Permanent Environmental Variable in Windows XP

I want to set environmental variables permanently through a batch file. Is there a command to set Permanent Environmental Variable (other than SETX) for Windows XP service pack 3? command SETX ...
1
vote
2answers
110 views

Security issues related to storing secrets in scripts

Let's say you have a program you want to run unattended, as root, which requires a secret (such as a passphrase; something you don't want other people to find out), which can be read from an ...