|
-
Apr 19th, 2017, 12:53 PM
#1
[RESOLVED] The system cannot find the file specified - but I can
Hey all,
I'm putting together a method to switch users on a kiosk app and am trying to use this code...
Code:
Const fName = "C:\Windows\System32\tsdiscon.exe"
Process.Start(fName)
When I run that, I get a Win32Exception on the call to Process.Start saying the file cannot be found. If however I copy and paste the file name into a cmd prompt it runs fine. Just for giggles, I tried using Shell, but get similar results.
So if the file is there why is it not there?
Can anyone reproduce it or is it just me?
Maybe a security setting on my machine?
I've tried starting VS2013 with admin rights but it makes no difference.
Please note that if you are going to try this code, you will (should) be disconnected and shown the switch user screen from which you can log right back in.
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|