Link to home
Start Free TrialLog in
Avatar of Peter Chan
Peter ChanFlag for Hong Kong

asked on

Problem with CMD

Hi,
It seems there is problem to run CMD within Citrix. How to execute these 2 lines below?

    Command0 = "cmd /c delete /y """ & Application.ActiveWorkbook.Path & "\Departure List (of People already left).xls" & """ "
    Shell (Command0)

Open in new window

User generated image
Avatar of Qlemo
Qlemo
Flag of Germany image

You should be able to use a FileSystemObject, and call fhe DeleteFile method with the path.
Avatar of Peter Chan

ASKER

I get
User generated image
due to last line below. Why?
    Dim Name0 As String
    Name0 = Application.ActiveWorkbook.Path & "\Departure List (of People already left).xls"
    FileSystemObject.DeleteFile Name0

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You need to allow the cmd host or script to run within AppSense Application Manager, which is what is blocking it judging by that dialog box.