Sign in to follow this  
Followers 0
Qual-IT London

start

4 posts in this topic

im having problems with envset and runwait @comspec /c ...

RunWait(@ComSpec & ' /C' & @tempdir & "\Adobe\Acrobat\runtime.bat", @tempdir & "\Adobe\Acrobat",@SW_MINIMIZE)

i dont think the runtime.bat gets env variables set by the script that calls it because of running a new command interpreter @comspec

without @comspec it doesnt work at all!

Share this post


Link to post
Share on other sites



im having problems with envset and runwait @comspec /c ...

RunWait(@ComSpec & ' /C' & @tempdir & "\Adobe\Acrobat\runtime.bat", @tempdir & "\Adobe\Acrobat",@SW_MINIMIZE)

i dont think the runtime.bat gets env variables set by the script that calls it because of running a new command interpreter @comspec

without @comspec it doesnt work at all!

works for me

example script:

EnvSet("MYENV", "this is a test")
Run(@ComSpec & ' /k test.bat ')

example test.bat

@echo off
echo %MYENV%

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

maybe

$Location = FileGetShortName(@ProgramFilesDir & "\Adobe\Acrobat\runtime.bat")
$Work_dir = FileGetShortName( @ProgramFilesDir & "\Adobe\Acrobat")

RunWait(@ComSpec & ' /C' & $Location, $Work_dir,@SW_MINIMIZE)

1

@TempDir = Documents and Settings\User Name\Local Settings\Temp

i dont think that was your intention

2

Run/Dos does not like spaces in the locations

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

but it does like a space after the /c and quotes around the path :)

RunWait(@ComSpec & ' /C "' & @tempdir & '\Adobe\Acrobat\runtime.bat"', @tempdir & "\Adobe\Acrobat",@SW_MINIMIZE)

Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0