Page 1 of 1 1
Topic Options
#27618 - 2002-08-22 09:43 PM executing a command without having a drive mapped
rbenz27 Offline
Lurker

Registered: 2002-08-22
Posts: 2
Is there a way for kixtart to execute a command line without having to map a drive first just like in a winnt script?

If i use this it works:
shell "%comspec% /e:1024 /c r:\temp\scan32.exe"

But if i use this it doesn't:
shell "%comspec% /e:1024 /c \\servername\test\scan32.exe"

the first one works because i mapped the drive but i want to execute the file without having to map the drive. Is this possible in kixtart? If so, can you please tell me how? Thanks.

Top
#27619 - 2002-08-22 09:49 PM Re: executing a command without having a drive mapped
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Generally, this should work under Windows NT/2000/XP if the application supports it. However, there might be applications that cannot be run through a UNC share and that require a driveletter.
_________________________
There are two types of vessels, submarines and targets.

Top
#27620 - 2002-08-22 10:45 PM Re: executing a command without having a drive mapped
rbenz27 Offline
Lurker

Registered: 2002-08-22
Posts: 2
Hmm..
If i simply put:
\\servername\temp\scan32.exe

on the WINNT login script such as myscript.bat
it works but it does not work with kixtart.

[ 22. August 2002, 22:47: Message edited by: rbenz27 ]

Top
#27621 - 2002-08-22 11:06 PM Re: executing a command without having a drive mapped
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You need to put it into quotes if the path contains spaces. Other than that, It sure look correct.
_________________________
There are two types of vessels, submarines and targets.

Top
#27622 - 2002-08-23 02:52 PM Re: executing a command without having a drive mapped
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
We do this all the time with Kixtart.

Jens is correct, we do this with NT-Class machines.

code:
$hklms = 'HKEY_LOCAL_MACHINE\SOFTWARE'

$vscanlocation = "\\SERVER\is\IS_apps\Software_Applications\McAfee\antivirus\vscan4.5"
$vscansp1 = "\\SERVER\IS\IS_apps\Software_Applications\McAfee\antivirus\vscan4.5Sp1"

GOSUB NEWVSCAN
GOSUB VSCANSP1

;Install new version of McAFee VirusScan
:newvscan
;$ReturnCode = ExistKey($HKLMS+"\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx")
;$ReturnCode = ExistKey($HKLMS+"\Network Associates\TVD\Shared Components\Events")
$returncode = ExistKey($hklms+"\Network Associates\TVD\VirusScan")
;$ReturnCode = ExistKey($HKLMS+"\McAfee\VirusScan")
IF $returncode = 0
RETURN
ELSE
;~~ DO NOT UPDATE LEIF
IF @wksta = "1004"
RETURN
ELSE
CLS
AT ( 9,3) "There is a new version of VirusScan being installed."
AT (10,3) "It may take several minutes to complete."
AT (11,3) "Your system will also restart."
AT (12,3) "Please be patient."
SLEEP 2

RUN ($vscanlocation+"\SETUP.EXE ADDLOCAL=ALL REMOVE=SendVirus REMOVEINCOMPATIBLESOFTWARE=True REBOOT=F /q /i")
$result=setconsole('show')
$logshare='\\LogServer\VSDATLOG'
$logdata=@date + "," + @time + "," + @userid + "," + @wksta + ",WiNNT" + Chr(13) + Chr(10)
$logfile=$logshare+'\NEWSCAN.TXT'
GOTO LOGGER
GOTO OUT
ENDIF
ENDIF


;Install VirusScan SP-1
:vscansp1
;After Vscan SP-1 is installed, we want to set screen splash to be off
$skipsplash = Readvalue("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\On Access Scanner\Vshield\System Scan\General","bSkipSplash")
;$SkipSplash = Readvalue("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\On Access Scanner\Vshield\System Scan\General","bShowTaskbarIcon")
IF @error = 0
;Value is found - Check for modification
IF $skipsplash <> 1
$rc = WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\On Access Scanner\Vshield\System Scan\General","bSkipSplash", "1", "REG_DWORD")
ENDIF
ENDIF
;Are they running SP-1?
$scanverl = Readvalue("HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\VirusScan","szVshwin32EXE")
;Get the version of the .EXE File
$scanver = GETFILEVERSION($scanverl,"FILEVERSION")
;4.5.496.0 - Version of Vshield before updating
;4.5.534.0 - Version of Vshield after updating
IF $scanver = "4.5.496.0"
;Install the Application and restart the system.
;CLS
;?"We are installing SP-1 for VirusScan"
;?"Your system will restart."
;?"Thanks!"
;Sleep 2
RUN ($vscansp1+"\VSC45SP1.exe /silent")
;Log the user
$result=setconsole('show')
$logshare='\\LOGSERVER\VSDATLOG'
$logdata=@date + "," + @time + "," + @userid + "," + @wksta + ",WiNNT" + Chr(13) + Chr(10)
$logfile=$logshare+'\VSCANSP1.TXT'
GOTO LOGGER
ELSE
;Running the SP or not running
RETURN
ENDIF

:logger
;-- Log the user into a file
$result=0
$n=0
DO
$result=Open(1, $logfile, 5)
IF $result<>0
IF $n=0
;First wait
? "Please wait"
ELSE
;follow waits
"."
ENDIF
SLEEP 3
ELSE
$result=WriteLine(1, $logdata)
$result=Close(1)
ENDIF
$n=$n+1
UNTIL $result=0 OR $n=5
RETURN

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#27623 - 2002-08-26 02:10 PM Re: executing a command without having a drive mapped
Rocco Capra Offline
Hey THIS is FUN
*****

Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
Is that AuditWizard?

Try this...
code:
;==============================================================================
;Running AuditWizard Scanner...
;==============================================================================
:AUDIT
? "[ Running AuditWizard Scanner ]"
RUN "\\appcitrix1w2\Scanners\netlogon\SCAN32.EXE"
;==============================================================================

Rocco
_________________________
I Love this board!! -------------------- My DEV PC is running KIX 4.22 WINXP Pro

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 641 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.058 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

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