in reply to System command with quotes and variables
How are you quoting that string? I recommend putting together a list form of the arguments. The bare string '/user:domain\$user' is unlikely to do right. If interpolated, the '$' will be taken as literal because '\' escapes the '$'. I don't know what string is meant there. Try,
The peculiar and logic is because system returns false on success. Most of perl isn't like that. I don't know what 'runas' looks for in its arguments, so you need to use your familiarity with that program to get this right.system 'runas', "/user:domain/$user", 'c:\Program Files\Internet Explorer\iexplore.exe', '"c:\"' and die $?;
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: System command with quotes and variables
by mellin (Scribe) on Apr 16, 2007 at 06:47 UTC | |
by cdarke (Prior) on Apr 16, 2007 at 07:57 UTC |