X@vier Posted June 19, 2006 Share Posted June 19, 2006 Hi all, I have created a tool wich allow me to run task with my standard account but also with my admin account. In this case, i use the Runasset() function (works fine). The problme is the following: I have to use a smartcard with my 2 accounts and it won't be possible to use Runasset() any more. Has anyone a king of workaround or any information for me... Thanx in advance. Xavier Link to comment Share on other sites More sharing options...
Brad Posted July 7, 2006 Share Posted July 7, 2006 I have tried useing RunWait(@ComSpec & " /q /c runas /smartcard cmd") but it just flashes a blank prompt. so i tried RunWait(@ComSpec & " /q /c pause | runas /smartcard cmd") and it opens up a blank prompt that will not go away untill i press a key. for some reason runas /smartcard does not like scripts. i even made a bat file with one line pause | runas.exe /noprofile /smartcard cmd and it does the same thing. but if i open a command prompt then type in pause | runas.exe /noprofile /smartcard cmd it works fine. has anyone else had the same problems, because i have tried this on multiple pc's and had the same problem. i realy want to be able to run the network tools gui i made with my smartcard, but i am hitting a brick wall. any help would be appreciatedThanks Brad.Hi all,I have created a tool wich allow me to run task with my standard account but also with my admin account.In this case, i use the Runasset() function (works fine).The problme is the following:I have to use a smartcard with my 2 accounts and it won't be possible to use Runasset() any more.Has anyone a king of workaround or any information for me...Thanx in advance.Xavier Link to comment Share on other sites More sharing options...
Brad Posted July 7, 2006 Share Posted July 7, 2006 Just noticed something weird. i was getting frustrated, and started running and closing my .bat file over and over, and one of the many times i did it it worked, so i have gotten runas /smartcard to run about 4 times out of 50 runs. that seems a bit screwie to me, dont know if anyone knows about that, or has had the same problem. this also happens to me no mater what pc i am on.I have tried useing RunWait(@ComSpec & " /q /c runas /smartcard cmd") but it just flashes a blank prompt. so i tried RunWait(@ComSpec & " /q /c pause | runas /smartcard cmd") and it opens up a blank prompt that will not go away untill i press a key. for some reason runas /smartcard does not like scripts. i even made a bat file with one line pause | runas.exe /noprofile /smartcard cmd and it does the same thing. but if i open a command prompt then type in pause | runas.exe /noprofile /smartcard cmd it works fine. has anyone else had the same problems, because i have tried this on multiple pc's and had the same problem. i realy want to be able to run the network tools gui i made with my smartcard, but i am hitting a brick wall. any help would be appreciatedThanks Brad. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now