Page 1 of 1 1
Topic Options
#187084 - 2008-04-18 03:51 PM Need help with Command Prompt code to KixTart
VTC Offline
Fresh Scripter

Registered: 2008-04-17
Posts: 26
Loc: Alexandria, Virginia
I am trying to automate user outlook profile creation. Their is an executable required to complete this but the directions are for the cmd prompt something like this


createZimbraProfile.exe [profile-name] [server-name] [server-port] [0|1 ssl] [username] [userpwd]

Top
#187085 - 2008-04-18 04:24 PM Re: Need help with Command Prompt code to KixTart [Re: VTC]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Not that hard.
All parameters in between square brackets are usually optional. Zimbra might be different not sure.

Usually it is enough to replace the parameter names that are between the brackets. So you would start out with something like this.

 Code:
$cmdline = %comspec%
$cmdline = $cmdline + " createZimbraProfile.exe DefaultProfile Mailserver, etc......
Shell $cmdline


I can't test because we do not use Zimbra but this should be correct.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#187086 - 2008-04-18 05:16 PM Re: Need help with Command Prompt code to KixTart [Re: Mart]
VTC Offline
Fresh Scripter

Registered: 2008-04-17
Posts: 26
Loc: Alexandria, Virginia
Thanks for the immediate response.

A couple questions about it though.

The Quotations after $cmdline + "
I need to make it so that the username is @userid will that still work ?

Top
#187089 - 2008-04-18 06:49 PM Re: Need help with Command Prompt code to KixTart [Re: VTC]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
$cmdline = $cmdline + " createZimbraProfile.exe parm1 parm2 " + @userID + " parm4"
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#187090 - 2008-04-18 07:02 PM Re: Need help with Command Prompt code to KixTart [Re: Les]
VTC Offline
Fresh Scripter

Registered: 2008-04-17
Posts: 26
Loc: Alexandria, Virginia
$cmdline = %comspec%
$cmdline = $cmdline + " CreateZimbraProfile.exe ZimbraProfile mail.server.com 443 1 " + @USERID + $pwd
Shell $cmdline

The exe is inside the kix32 folder.

When I run this I prompt the user to put in the password
AT (15,25) "Password : "
$pwd = AT (15,40) Gets $pwd

when it runs the $cmdline it changes my display and shows the what the command line would C:/Documents and Settings etc.

Top
#187093 - 2008-04-18 08:27 PM Re: Need help with Command Prompt code to KixTart [Re: VTC]
VTC Offline
Fresh Scripter

Registered: 2008-04-17
Posts: 26
Loc: Alexandria, Virginia
indition to my previous problem. My username has to be in the format username@mailserver.com but when ever it do @userid + "@mailserver.com"
it displays User_ID Unknown:mailserver.com


Edited by VTC (2008-04-18 08:30 PM)

Top
#187094 - 2008-04-18 08:30 PM Re: Need help with Command Prompt code to KixTart [Re: VTC]
VTC Offline
Fresh Scripter

Registered: 2008-04-17
Posts: 26
Loc: Alexandria, Virginia
between userid and unknow is a <
Top
#187096 - 2008-04-18 08:35 PM Re: Need help with Command Prompt code to KixTart [Re: VTC]
VTC Offline
Fresh Scripter

Registered: 2008-04-17
Posts: 26
Loc: Alexandria, Virginia
The odd thing is that when request a string input and put in the value i want

GETS $username
input VTC@mail.com
my return value is the same

Which is the same thing as $username = @userID + "@mail.com
but when id do it this way@userid + "@mail.com" i get some wierd display.

Top
#187097 - 2008-04-18 08:47 PM Re: Need help with Command Prompt code to KixTart [Re: VTC]
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
try @userid+'@@mail.com'
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#187099 - 2008-04-18 09:07 PM Re: Need help with Command Prompt code to KixTart [Re: Radimus]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
This will also give a problem
 Quote:
+ @USERID + $pwd

you need to put a space in there
 Code:
+ $UserID +" "+$pwd
_________________________
Today is the tomorrow you worried about yesterday.

Top
#187100 - 2008-04-18 09:41 PM Re: Need help with Command Prompt code to KixTart [Re: Gargoyle]
VTC Offline
Fresh Scripter

Registered: 2008-04-17
Posts: 26
Loc: Alexandria, Virginia
My output still all FUBAR'd. The command listed up in the first thread causes the following from pre command to output.

Attachments
pre-command run.jpg (182 downloads)
Description:

output.jpg (189 downloads)
Description:



Top
#187104 - 2008-04-19 12:59 AM Re: Need help with Command Prompt code to KixTart [Re: VTC]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Please post the code that you are currently using.
_________________________
Today is the tomorrow you worried about yesterday.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 988 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.108 seconds in which 0.081 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org