Or you could try using the "UVRunCommand()" function instead of "dos
/c".
This was introduced (in 10.1 IIRC) as a result of an E-case I opened,
but is documented only in the 10.2 GCI manual.
Usage is:
!-----------------------------------------------------------------------
---
DECLARE GCI UVRunCommand
!-----------------------------------------------------------------------
---
DOSString = <your DOS command>
MyStatus = UVRunCommand('c:\WINDOWS\system32\cmd.exe /c
':DOSString)
IF MyStatus NE 0 THEN
<handle an error>
END
!-----------------------------------------------------------------------
---
The major advantage of "UVRunCommand()" over "DOS /c" is that it handles
quoted strings correctly. "DOS /c" scrambles a quoted string.
Regards
Mike
________________________________
From: [email protected]
[mailto:[email protected]] On Behalf Of Brian Leach
Sent: Tuesday, 2 June 2009 11:30 p.m.
To: 'U2 Users List'
Subject: Re: [U2] Odd permissions error running a vb script using dos
/ccommand
Hi Dave
It should take the permissions of whatever user you have logged into
UniVerse with.
At the risk of asking the obvious, have you logged in as that admin
user?
Also, it shouldn't make any difference but do you get the same error if
you create a verb pointer directly to CSCRIPT.EXE instead of shelling
via DOS /C ?
Brian
________________________________
From: [email protected]
[mailto:[email protected]] On Behalf Of Dave Greer
Sent: 01 June 2009 19:40
To: [email protected]
Subject: [U2] Odd permissions error running a vb script using
dos /c command
I have a vb script that updates a filezilla configuration file
on another server given a username and password. Universe 10.2 is
running on a Windows 2003 Server. The Universe Server has administrator
permissions on the other server. If I run the script from the windows
command line of the Universe server, it works perfectly. If I run the
script from TCL or execute it from Unibasic it throws up a permissions
error pointing to the write line of the vbscript.
When running from the windows command line, I'm running:
cscript.exe d:\newage\createftp.vbs "Username" "Password"
From UV, I'm running dos /c cscript.exe createftp.vbs "UserName"
"Password"
Windows messages are:
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights
reserved.
[Create FTP v2005.2.0]
D:\NEWAGE\CREATEFTP.VBS(542, 3) Microsoft VBScript runtime
error: Permission denied
The information contained in this Internet Email message is intended
for the addressee only and may contain privileged information, but not
necessarily the official views or opinions of the New Zealand Defence Force.
If you are not the intended recipient you must not use, disclose, copy or
distribute this message or the information in it.
If you have received this message in error, please Email or telephone
the sender immediately.
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users