Click here to Skip to main content
15,898,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am having a issue with WMI. I am starting a process on a remote computer using it. First I copy the application(.exe/.NET 2.0) and then I use WMI and Win32_Process Create method to start it. And, it starts, it runs correctly, but there is one problem. I make changes to my deployed application from time to time. But for some reason the process that starts on the remote system is the outdated one. It runs the 'old' version. The file that is copied remotely is 100% the new one (I check the date attribute).

Can anyone help with this one? How to force WMI run the 'fresh' deployed application?


Many thanks,
Marius Jigoreanu
Posted

1 solution

Hi,

I got it. I was testing the tool in two different ways. With psexec and WMI. psexec copies the file to system32 and with the WMI I copy it to windows(admin$) folder. It seems that WMI was trying to executing the file found at system32 first (not always the updated one), so it ignored the one in windows folder. If the file in system32 is missing, then it executes the one in windows folder.

Thanks for the ones who took a look at this one,

Cheers,
Marius Jigoreanu
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900